21 INLINE CollisionLevelStateBase::
22 CollisionLevelStateBase(
const NodePath &node_path) :
23 _node_path(node_path),
24 _colliders(get_class_type()),
35 INLINE CollisionLevelStateBase::
37 _node_path(parent._node_path, child),
38 _colliders(parent._colliders),
39 _include_mask(parent._include_mask),
40 _local_bounds(parent._local_bounds)
49 INLINE CollisionLevelStateBase::
51 _node_path(copy._node_path),
52 _colliders(copy._colliders),
53 _include_mask(copy._include_mask),
54 _local_bounds(copy._local_bounds),
55 _parent_bounds(copy._parent_bounds)
64 INLINE
void CollisionLevelStateBase::
66 _node_path = copy._node_path;
67 _colliders = copy._colliders;
68 _include_mask = copy._include_mask;
69 _local_bounds = copy._local_bounds;
70 _parent_bounds = copy._parent_bounds;
92 return _node_path.
node();
100 INLINE
int CollisionLevelStateBase::
101 get_num_colliders()
const {
102 return _colliders.size();
111 get_collider(
int n)
const {
112 nassertr(n >= 0 && n < (
int)_colliders.size(), NULL);
114 return _colliders[n]._collider;
123 get_collider_node(
int n)
const {
124 nassertr(n >= 0 && n < (
int)_colliders.size(), NULL);
126 return _colliders[n]._node;
134 INLINE
NodePath CollisionLevelStateBase::
135 get_collider_node_path(
int n)
const {
138 return _colliders[n]._node_path;
150 nassertr(n >= 0 && n < (
int)_colliders.size(), NULL);
151 nassertr(n >= 0 && n < (
int)_local_bounds.size(), NULL);
158 return *(_local_bounds + n);
174 nassertr(n >= 0 && n < (
int)_colliders.size(), NULL);
175 nassertr(n >= 0 && n < (
int)_parent_bounds.size(), NULL);
178 return *(_parent_bounds + n);
197 _include_mask = include_mask;
211 return _include_mask;
A basic node of the scene graph or data graph.
PandaNode * node() const
Returns the node traversed to so far.
NodePath get_node_path() const
Returns the NodePath representing the node instance we have traversed to.
CollideMask get_include_mask() const
Returns the mask that is applied to the into CollideMask of nodes in the scene graph before testing f...
The abstract base class for all things that can collide with other things in the world, and all the things they can collide with (except geometry).
void set_include_mask(CollideMask include_mask)
Specifies the mask that is applied to the into CollideMask of nodes in the scene graph before testing...
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
NodePath get_node_path() const
Constructs and returns an actual NodePath that represents the same path we have just traversed...
static NodePath fail()
Creates a NodePath with the ET_fail error type set.
const GeometricBoundingVolume * get_local_bound(int n) const
Returns the bounding volume of the indicated collider, transformed into the current node's transform ...
const GeometricBoundingVolume * get_parent_bound(int n) const
Returns the bounding volume of the indicated collider, transformed into the previous node's transform...
A node in the scene graph that can hold any number of CollisionSolids.
This is the state information the CollisionTraverser retains for each level during traversal...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
PandaNode * node() const
Returns the PandaNode pointer of the node we have traversed to.