17 INLINE CollisionLevelStateBase::
18 CollisionLevelStateBase(
const NodePath &node_path) :
19 _node_path(node_path),
20 _colliders(get_class_type()),
28 INLINE CollisionLevelStateBase::
30 _node_path(parent._node_path, child),
31 _colliders(parent._colliders),
32 _include_mask(parent._include_mask),
33 _local_bounds(parent._local_bounds)
40 INLINE CollisionLevelStateBase::
42 _node_path(copy._node_path),
43 _colliders(copy._colliders),
44 _include_mask(copy._include_mask),
45 _local_bounds(copy._local_bounds),
46 _parent_bounds(copy._parent_bounds)
53 INLINE
void CollisionLevelStateBase::
55 _node_path = copy._node_path;
56 _colliders = copy._colliders;
57 _include_mask = copy._include_mask;
58 _local_bounds = copy._local_bounds;
59 _parent_bounds = copy._parent_bounds;
75 return _node_path.
node();
81 INLINE
int CollisionLevelStateBase::
82 get_num_colliders()
const {
83 return _colliders.size();
90 get_collider(
int n)
const {
91 nassertr(n >= 0 && n < (
int)_colliders.size(),
nullptr);
93 return _colliders[n]._collider;
100 get_collider_node(
int n)
const {
101 nassertr(n >= 0 && n < (
int)_colliders.size(),
nullptr);
103 return _colliders[n]._node;
109 INLINE
NodePath CollisionLevelStateBase::
110 get_collider_node_path(
int n)
const {
113 return _colliders[n]._node_path;
122 nassertr(n >= 0 && n < (
int)_colliders.size(),
nullptr);
123 nassertr(n >= 0 && n < (
int)_local_bounds.size(),
nullptr);
129 return *(_local_bounds + n);
140 nassertr(n >= 0 && n < (
int)_colliders.size(),
nullptr);
141 nassertr(n >= 0 && n < (
int)_parent_bounds.size(),
nullptr);
144 return *(_parent_bounds + n);
158 _include_mask = include_mask;
169 return _include_mask;
This is the state information the CollisionTraverser retains for each level during traversal.
const GeometricBoundingVolume * get_parent_bound(int n) const
Returns the bounding volume of the indicated collider, transformed into the previous node's transform...
PandaNode * node() const
Returns the PandaNode pointer of the node we have traversed to.
const GeometricBoundingVolume * get_local_bound(int n) const
Returns the bounding volume of the indicated collider, transformed into the current node's transform ...
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...
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...
A node in the scene graph that can hold any number of CollisionSolids.
The abstract base class for all things that can collide with other things in the world,...
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
static NodePath fail()
Creates a NodePath with the ET_fail error type set.
A basic node of the scene graph or data graph.
PandaNode * node() const
Returns the node traversed to so far.
get_node_path
Constructs and returns an actual NodePath that represents the same path we have just traversed.