Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DBVHNode< T > Class Template Reference

The U4DBVHNode class represents a node in a BVH tree and is used for Broad-Phase collision. More...

Inherits U4DEngine::U4DEntityNode< U4DBVHNode< T > >.

Public Member Functions

 U4DBVHNode ()
 Constructor for the class.
 
 ~U4DBVHNode ()
 Destructor for the class.
 
std::vector< T * > getModelsContainer ()
 Method which returns container with 3D model entities that are part of the tree node. More...
 
void addModelToContainer (T *uAction)
 Method which adds 3D models to the node container. More...
 
void addModelToContainerAtIndex (int uIndex, T *uAction)
 Method which add a 3D model at a particular index. More...
 
void copyModelsContainer (std::vector< T * > uActionsContainer)
 Method which makes a copy of the model container. More...
 
U4DAABBgetAABBVolume ()
 Method which returns a pointer to the AABB holding volume information about the tree node. More...
 
void setSplitIndex (int uSplitIndex)
 Method which sets a tree node split index. More...
 
int getSplitIndex ()
 Method which returns the tree node split index. More...
 
- Public Member Functions inherited from U4DEngine::U4DEntityNode< U4DBVHNode< T > >
 U4DEntityNode ()
 Constructor for the class.
 
 U4DEntityNode (std::string uNodeName)
 
 ~U4DEntityNode ()
 Destructor for the class.
 
void addChild (U4DBVHNode< T > *uChild)
 Method which adds a child node to a scenegraph. More...
 
void addChild (U4DBVHNode< T > *uChild, U4DBVHNode< T > *uNext)
 
void addChild (U4DBVHNode< T > *uChild, int uZDepth)
 Method which adds a child entity to a scenegraph at a particular location. More...
 
void removeChild (U4DBVHNode< T > *uChild)
 Method which removes a child node from the scenegraph. More...
 
void changeLastDescendant (U4DBVHNode< T > *uNewLastDescendant)
 Method which changes the node's last descendant in the scenegraph. More...
 
U4DBVHNode< T > * getFirstChild ()
 Method which returns the node's first child in the scenegraph. More...
 
U4DBVHNode< T > * getLastChild ()
 Method which returns the node's last child in the scenegraph. More...
 
U4DBVHNode< T > * getNextSibling ()
 Method which returns the node's next sibling in the scenegraph. More...
 
U4DBVHNode< T > * getPrevSibling ()
 Method which returns the node's previous sibling in the scenegraph. More...
 
U4DBVHNode< T > * prevInPreOrderTraversal ()
 Method which returns the node's previous sibling in pre-order traversal order. More...
 
U4DBVHNode< T > * nextInPreOrderTraversal ()
 Method which returns the node's next pointer in pre-order traversal order. More...
 
bool isLeaf ()
 Method which returns true if the node represents a leaf node in the scenegraph. More...
 
bool isRoot ()
 Method which returns true if the node represents a root node in the scenegraph. More...
 
U4DBVHNode< T > * getParent ()
 Gets the parent to the entity. More...
 
U4DBVHNode< T > * getRootParent ()
 Gets the root parent (top parent in the scenegraph) of the entity. More...
 
U4DBVHNode< T > * searchChild (std::string uName)
 

Additional Inherited Members

- Public Attributes inherited from U4DEngine::U4DEntityNode< U4DBVHNode< T > >
U4DBVHNode< T > * parent
 Tree parent pointer.
 
U4DBVHNode< T > * prevSibling
 Tree previous sibling pointer.
 
U4DBVHNode< T > * next
 Tree next pointer.
 
U4DBVHNode< T > * lastDescendant
 Tree last descendant pointer.
 

Detailed Description

template<typename T>
class U4DEngine::U4DBVHNode< T >

The U4DBVHNode class represents a node in a BVH tree and is used for Broad-Phase collision.

Member Function Documentation

◆ addModelToContainer()

template<typename T>
void U4DEngine::U4DBVHNode< T >::addModelToContainer ( T *  uAction)

Method which adds 3D models to the node container.

Parameters
uActionDynamic action

◆ addModelToContainerAtIndex()

template<typename T>
void U4DEngine::U4DBVHNode< T >::addModelToContainerAtIndex ( int  uIndex,
T *  uAction 
)

Method which add a 3D model at a particular index.

Parameters
uIndexindex
uActionDynamic action

◆ copyModelsContainer()

template<typename T>
void U4DEngine::U4DBVHNode< T >::copyModelsContainer ( std::vector< T * >  uActionsContainer)

Method which makes a copy of the model container.

Parameters
uActionsContainerModel container

◆ getAABBVolume()

template<typename T >
U4DAABB * U4DEngine::U4DBVHNode< T >::getAABBVolume ( )

Method which returns a pointer to the AABB holding volume information about the tree node.

Returns
Returns a pointer to the AABB holding volume information about the tree node

◆ getModelsContainer()

template<typename T >
std::vector< T * > U4DEngine::U4DBVHNode< T >::getModelsContainer ( )

Method which returns container with 3D model entities that are part of the tree node.

Returns
Returns container with 3D model entities that are part of the tree node

◆ getSplitIndex()

template<typename T >
int U4DEngine::U4DBVHNode< T >::getSplitIndex ( )

Method which returns the tree node split index.

Returns
Returns the tree node split index

◆ setSplitIndex()

template<typename T >
void U4DEngine::U4DBVHNode< T >::setSplitIndex ( int  uSplitIndex)

Method which sets a tree node split index.

Parameters
uSplitIndexSplit index