VRUT::BVHNode Class Reference

Data container for BVH node. More...

#include <bvhnode.h>

Inheritance diagram for VRUT::BVHNode:

CollisionDetectionNamespace::CollisionDetection_BVHNode

List of all members.

Public Member Functions

 BVHNode ()
 Class constructor.
virtual ~BVHNode ()
 Class destructor.
bool IsLeaf () const
bool IsValid () const
 Is node valid?
BVHNodeGetLChild () const
 Get left child.
BVHNodeGetRChild () const
 Get right child.
BVHNodeGetParent () const
 Get parent node.
const AABBGetAABB () const
 Get AABB.
const BSphereGetBSphere () const
 Get bounding sphere.
const int GetLastOut () const
 Get last out flag.
int & LastOut ()
NODE_ID GetSceneNodeID () const
 Get associated scene node's ID.
virtual wxString ToString () const
 Get string with node's properties.

Public Attributes

int id
 unique ID of the node in the BVH - used for various lookups

Private Attributes

bool valid
 Is aabb and sphere properly updated?
AABB aabb
 Axis aligned bounding box.
BSphere bSphere
 Bounding sphere (approximate).
NODE_ID sceneNodeID
 Dcene graph node ID.
BVHNodelChild
 Left BVHNode subnode.
BVHNoderChild
 Right BVHNode subnode.
int lastOut
 Index of plane for which VF intersection test returned OUTSIDE in previous frame.
BVHNodeparent
 Parent node.

Friends

class BVH


Detailed Description

Data container for BVH node.

Definition at line 22 of file bvhnode.h.


Constructor & Destructor Documentation

VRUT::BVHNode::BVHNode (  )  [inline]

Class constructor.

Definition at line 47 of file bvhnode.h.

00048               {
00049                      valid = false;
00050                      lastOut = 0;
00051                      parent = (BVHNode *)NULL;
00052                      lChild = rChild = (BVHNode *)NULL;
00053                      sceneNodeID = NODE_ID_NONE;
00054               }

virtual VRUT::BVHNode::~BVHNode (  )  [inline, virtual]

Class destructor.

Definition at line 56 of file bvhnode.h.

00057               {
00058                      SAFE_DELETE(lChild);
00059                      SAFE_DELETE(rChild);
00060               }


Member Function Documentation

bool VRUT::BVHNode::IsLeaf (  )  const [inline]

Definition at line 62 of file bvhnode.h.

00062                              {
00063               return sceneNodeID != NODE_ID_NONE;
00064          }

bool VRUT::BVHNode::IsValid (  )  const [inline]

Is node valid?

Definition at line 67 of file bvhnode.h.

00068               {
00069                      return valid;
00070               }

BVHNode* VRUT::BVHNode::GetLChild (  )  const [inline]

Get left child.

Definition at line 72 of file bvhnode.h.

00073               {
00074                      return lChild;
00075               }

BVHNode* VRUT::BVHNode::GetRChild (  )  const [inline]

Get right child.

Definition at line 77 of file bvhnode.h.

00078               {
00079                      return rChild;
00080               }

BVHNode* VRUT::BVHNode::GetParent (  )  const [inline]

Get parent node.

Definition at line 82 of file bvhnode.h.

00083               {
00084                      return parent;
00085               }

const AABB* VRUT::BVHNode::GetAABB (  )  const [inline]

Get AABB.

Definition at line 87 of file bvhnode.h.

00088               {
00089                      return &aabb;
00090               }

const BSphere* VRUT::BVHNode::GetBSphere (  )  const [inline]

Get bounding sphere.

Definition at line 92 of file bvhnode.h.

00093               {
00094                      return &bSphere;
00095               }

const int VRUT::BVHNode::GetLastOut (  )  const [inline]

Get last out flag.

Definition at line 97 of file bvhnode.h.

00098               {
00099                      return lastOut;
00100               }

int& VRUT::BVHNode::LastOut (  )  [inline]

Definition at line 101 of file bvhnode.h.

00102          {
00103               return lastOut;
00104          }

NODE_ID VRUT::BVHNode::GetSceneNodeID (  )  const [inline]

Get associated scene node's ID.

Definition at line 107 of file bvhnode.h.

00108               {
00109                      return sceneNodeID;
00110               }

virtual wxString VRUT::BVHNode::ToString (  )  const [inline, virtual]

Get string with node's properties.

Definition at line 112 of file bvhnode.h.

00113               {
00114                      return wxString::Format(wxT("%s\nSceneNode ID: %i\n"),
00115                             aabb.ToString().c_str(), sceneNodeID);
00116               }


Friends And Related Function Documentation

friend class BVH [friend]

Definition at line 118 of file bvhnode.h.


Member Data Documentation

bool VRUT::BVHNode::valid [private]

Is aabb and sphere properly updated?

Reimplemented in CollisionDetectionNamespace::CollisionDetection_BVHNode.

Definition at line 26 of file bvhnode.h.

Axis aligned bounding box.

Reimplemented in CollisionDetectionNamespace::CollisionDetection_BVHNode.

Definition at line 28 of file bvhnode.h.

Bounding sphere (approximate).

Reimplemented in CollisionDetectionNamespace::CollisionDetection_BVHNode.

Definition at line 30 of file bvhnode.h.

Dcene graph node ID.

Definition at line 32 of file bvhnode.h.

Left BVHNode subnode.

Reimplemented in CollisionDetectionNamespace::CollisionDetection_BVHNode.

Definition at line 34 of file bvhnode.h.

Right BVHNode subnode.

Reimplemented in CollisionDetectionNamespace::CollisionDetection_BVHNode.

Definition at line 36 of file bvhnode.h.

int VRUT::BVHNode::lastOut [private]

Index of plane for which VF intersection test returned OUTSIDE in previous frame.

Definition at line 38 of file bvhnode.h.

Parent node.

Definition at line 40 of file bvhnode.h.

unique ID of the node in the BVH - used for various lookups

Definition at line 44 of file bvhnode.h.


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

Generated on Tue Mar 10 14:41:41 2009 for VRUT by  doxygen 1.5.5