47 #ifndef CCollisionAABBH 48 #define CCollisionAABBH 86 enum cCollisionAABBState
88 C_AABB_STATE_TEST_CURRENT_NODE,
89 C_AABB_STATE_TEST_LEFT_NODE,
90 C_AABB_STATE_TEST_RIGHT_NODE,
91 C_AABB_STATE_POP_STACK
94 struct cCollisionAABBStack
97 cCollisionAABBState m_state;
134 const double a_radius = 0.0);
144 int buildTree(
const int a_indexFirstNode,
const int a_indexLastNode,
const int a_depth);
This class implements a 3D vector.
Definition: CVector3d.h:88
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition: CRenderOptions.h:82
Implements general math utility functions.
int m_numElements
Number of elements inside tree.
Definition: CCollisionAABB.h:157
void initialize(const cGenericArrayPtr a_elements, const double a_radius=0.0)
This method initializes and builds the AABB collision tree.
Definition: CCollisionAABB.cpp:111
int buildTree(const int a_indexFirstNode, const int a_indexLastNode, const int a_depth)
Definition: CCollisionAABB.cpp:262
cGenericArrayPtr m_elements
Pointer to the list of elements in the object.
Definition: CCollisionAABB.h:160
This class implements an axis-aligned bounding box collision detector.
Definition: CCollisionAABB.h:84
This class implements a base class for collision detection.
Definition: CGenericCollision.h:101
virtual void render(cRenderOptions &a_options)
This method renders a visual representation of the collision tree.
Definition: CCollisionAABB.cpp:543
virtual bool computeCollision(cGenericObject *a_object, cVector3d &a_segmentPointA, cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings)
This method computes all collisions between a segment passed as argument and the attributed 3D object...
Definition: CCollisionAABB.cpp:393
Implements a base class for programming collision detectors that identify intersections between segme...
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition: CGenericObject.h:112
cCollisionAABB()
Constructor of cCollisionAABB.
Definition: CCollisionAABB.cpp:63
This class implements a collision detection recorder that stores all collision events that are report...
Definition: CCollisionBasics.h:185
int m_maxDepth
Maximum depth of tree.
Definition: CCollisionAABB.h:169
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition: CCollisionBasics.h:242
double m_radius
Collision shell radius around elements.
Definition: CCollisionAABB.h:154
virtual void update()
This methods updates the collision detector and should be called if the 3D model it represents is mod...
Definition: CCollisionAABB.cpp:246
Implements an axis-aligned bounding box collision tree (AABB)
std::vector< cCollisionAABBNode > m_nodes
List of nodes.
Definition: CCollisionAABB.h:163
int m_rootIndex
Index number of root node.
Definition: CCollisionAABB.h:166
Definition: CAudioBuffer.cpp:56
std::shared_ptr< cGenericArray > cGenericArrayPtr
Definition: CGenericArray.h:70
virtual ~cCollisionAABB()
Destructor of cCollisionAABB.
Definition: CCollisionAABB.cpp:89