47#ifndef CCollisionAABBTreeH
48#define CCollisionAABBTreeH
123 void render(
int a_depth = -1);
Implements an axis-aligned bounding box collision tree (AABB)
Implements an axis-aligned bounding box collision tree (AABB)
Implements basic data structures for storing collision events.
This class implements a collision detection recorder that stores all collision events that are report...
Definition CCollisionBasics.h:186
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition CGenericObject.h:113
Definition CAudioBuffer.cpp:57
cAABBNodeType
Internal AABB Node Types.
Definition CCollisionAABBTree.h:69
@ C_AABB_NODE_LEAF
Definition CCollisionAABBTree.h:71
@ C_AABB_NODE_INTERNAL
Definition CCollisionAABBTree.h:70
@ C_AABB_NOT_DEFINED
Definition CCollisionAABBTree.h:72
This structure implements the boundary nodes of an axis-aligned bounding box.
Definition CCollisionAABBBox.h:85
This structure implements a tree node inside an AABB collision tree.
Definition CCollisionAABBTree.h:87
bool computeCollision(cGenericObject *a_owner, cVector3d &a_segmentPointA, cVector3d &a_segmentDirection, cCollisionAABBBox &a_lineBox, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings)
This method determines whether a line segment intersects any elements covered by this node.
virtual ~cCollisionAABBNode()
Destructor of cCollisionAABBNode.
Definition CCollisionAABBTree.h:98
cCollisionAABBNode()
Constructor of cCollisionAABBNode.
Definition CCollisionAABBTree.cpp:60
cCollisionAABBBox m_bbox
Bounding box for this node.
Definition CCollisionAABBTree.h:141
int m_leftSubTree
Left child node index.
Definition CCollisionAABBTree.h:150
cAABBNodeType m_nodeType
Node type.
Definition CCollisionAABBTree.h:147
void render(int a_depth=-1)
This method draws the edges of the boundary box for this node, if at the given depth.
Definition CCollisionAABBTree.cpp:182
void fitBBox(double a_radius, cVector3d &a_vertex0)
This method creates a boundary box for a point.
Definition CCollisionAABBTree.cpp:79
int m_rightSubTree
Right child node index.
Definition CCollisionAABBTree.h:153
int m_depth
Depth of this node in the collision tree.
Definition CCollisionAABBTree.h:144
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition CCollisionBasics.h:243
This class implements a 3D vector.
Definition CVector3d.h:89