Panda3D
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
CollisionLevelStateBase Class Reference

This is the state information the CollisionTraverser retains for each level during traversal. More...

#include "collisionLevelStateBase.h"

Inheritance diagram for CollisionLevelStateBase:
CollisionLevelState< MaskType >

Classes

class  ColliderDef
 

Public Member Functions

 CollisionLevelStateBase (const CollisionLevelStateBase &copy)
 
 CollisionLevelStateBase (const CollisionLevelStateBase &parent, PandaNode *child)
 This constructor goes to the next child node in the traversal.
 
 CollisionLevelStateBase (const NodePath &node_path)
 
void clear ()
 
const CollisionSolidget_collider (int n) const
 
CollisionNodeget_collider_node (int n) const
 
NodePath get_collider_node_path (int n) const
 
CollideMask get_include_mask () const
 Returns the mask that is applied to the into CollideMask of nodes in the scene graph before testing for bits in common with the from CollideMask of colliders.
 
const GeometricBoundingVolumeget_local_bound (int n) const
 Returns the bounding volume of the indicated collider, transformed into the current node's transform space.
 
NodePath get_node_path () const
 Returns the NodePath representing the node instance we have traversed to.
 
int get_num_colliders () const
 
const GeometricBoundingVolumeget_parent_bound (int n) const
 Returns the bounding volume of the indicated collider, transformed into the previous node's transform space, but not transformed by the current node's transform.
 
PandaNodenode () const
 Returns the PandaNode pointer of the node we have traversed to.
 
void operator= (const CollisionLevelStateBase &copy)
 
void prepare_collider (const ColliderDef &def, const NodePath &root)
 Adds the indicated Collider to the set of Colliders in the current level state.
 
void reserve (int num_colliders)
 Indicates an intention to add the indicated number of colliders to the level state.
 
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 for bits in common with the from CollideMask of colliders.
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 

Friends

class CollisionTraverser
 

Detailed Description

This is the state information the CollisionTraverser retains for each level during traversal.

The CollisionLevelStateBase is the non-template base class. The template version further specifies this on CurrentMask type.

Definition at line 43 of file collisionLevelStateBase.h.

Constructor & Destructor Documentation

◆ CollisionLevelStateBase() [1/3]

CollisionLevelStateBase::CollisionLevelStateBase ( const NodePath & node_path)
inline

Definition at line 17 of file collisionLevelStateBase.I.

◆ CollisionLevelStateBase() [2/3]

CollisionLevelStateBase::CollisionLevelStateBase ( const CollisionLevelStateBase & parent,
PandaNode * child )
inline

This constructor goes to the next child node in the traversal.

Definition at line 28 of file collisionLevelStateBase.I.

◆ CollisionLevelStateBase() [3/3]

CollisionLevelStateBase::CollisionLevelStateBase ( const CollisionLevelStateBase & copy)
inline

Definition at line 40 of file collisionLevelStateBase.I.

Member Function Documentation

◆ clear()

void CollisionLevelStateBase::clear ( )

Definition at line 27 of file collisionLevelStateBase.cxx.

◆ get_class_type()

static TypeHandle CollisionLevelStateBase::get_class_type ( )
inlinestatic

Definition at line 90 of file collisionLevelStateBase.h.

◆ get_collider()

const CollisionSolid * CollisionLevelStateBase::get_collider ( int n) const
inline

Definition at line 89 of file collisionLevelStateBase.I.

◆ get_collider_node()

CollisionNode * CollisionLevelStateBase::get_collider_node ( int n) const
inline

Definition at line 99 of file collisionLevelStateBase.I.

◆ get_collider_node_path()

NodePath CollisionLevelStateBase::get_collider_node_path ( int n) const
inline

Definition at line 109 of file collisionLevelStateBase.I.

◆ get_include_mask()

CollideMask CollisionLevelStateBase::get_include_mask ( ) const
inline

Returns the mask that is applied to the into CollideMask of nodes in the scene graph before testing for bits in common with the from CollideMask of colliders.

See set_include_mask().

Definition at line 167 of file collisionLevelStateBase.I.

◆ get_local_bound()

const GeometricBoundingVolume * CollisionLevelStateBase::get_local_bound ( int n) const
inline

Returns the bounding volume of the indicated collider, transformed into the current node's transform space.

Definition at line 120 of file collisionLevelStateBase.I.

◆ get_node_path()

NodePath CollisionLevelStateBase::get_node_path ( ) const
inline

Returns the NodePath representing the node instance we have traversed to.

Definition at line 65 of file collisionLevelStateBase.I.

References WorkingNodePath::get_node_path.

◆ get_num_colliders()

int CollisionLevelStateBase::get_num_colliders ( ) const
inline

Definition at line 81 of file collisionLevelStateBase.I.

◆ get_parent_bound()

const GeometricBoundingVolume * CollisionLevelStateBase::get_parent_bound ( int n) const
inline

Returns the bounding volume of the indicated collider, transformed into the previous node's transform space, but not transformed by the current node's transform.

This is appropriate for testing against the bounding volume of the current node (which does not have its own transform applied to it).

Definition at line 138 of file collisionLevelStateBase.I.

◆ init_type()

static void CollisionLevelStateBase::init_type ( )
inlinestatic

Definition at line 93 of file collisionLevelStateBase.h.

◆ node()

PandaNode * CollisionLevelStateBase::node ( ) const
inline

Returns the PandaNode pointer of the node we have traversed to.

Definition at line 73 of file collisionLevelStateBase.I.

References WorkingNodePath::node().

◆ operator=()

void CollisionLevelStateBase::operator= ( const CollisionLevelStateBase & copy)
inline

Definition at line 53 of file collisionLevelStateBase.I.

◆ prepare_collider()

void CollisionLevelStateBase::prepare_collider ( const ColliderDef & def,
const NodePath & root )

Adds the indicated Collider to the set of Colliders in the current level state.

Definition at line 48 of file collisionLevelStateBase.cxx.

References GeometricBoundingVolume::extend_by(), NodePath::get_parent, NodePath::get_pos_delta(), and NodePath::get_transform().

Referenced by CollisionLevelState< MaskType >::prepare_collider().

◆ reserve()

void CollisionLevelStateBase::reserve ( int num_colliders)

Indicates an intention to add the indicated number of colliders to the level state.

Definition at line 38 of file collisionLevelStateBase.cxx.

◆ set_include_mask()

void CollisionLevelStateBase::set_include_mask ( CollideMask include_mask)
inline

Specifies the mask that is applied to the into CollideMask of nodes in the scene graph before testing for bits in common with the from CollideMask of colliders.

This is normally all bits on, but you may set it to some other mask to restrict certain bits from consideration.

This is used by the CollisionTraverser to restrict collision with geometry except under the lowest level of LOD.

Definition at line 156 of file collisionLevelStateBase.I.

Friends And Related Symbol Documentation

◆ CollisionTraverser

friend class CollisionTraverser
friend

Definition at line 100 of file collisionLevelStateBase.h.


The documentation for this class was generated from the following files: