Newton Dynamics  4.00
ndAabbPolygonSoup Class Reference

Base class for creating a leafless bounding box hierarchy for queering a polygon list index list mesh. More...

Inheritance diagram for ndAabbPolygonSoup:
ndPolygonSoupDatabase ndClassAlloc ndShapeStatic_bvh

Classes

class  ndNode
 
class  ndNodeBuilder
 
class  ndSplitInfo
 

Public Member Functions

virtual D_CORE_API void GetAABB (ndVector &p0, ndVector &p1) const
 get the root node bounding box of the mesh.
 
virtual D_CORE_API void Serialize (const char *const path) const
 writes the entire database to a binary file named path.
 
virtual D_CORE_API void Deserialize (const char *const path)
 Reads a previously saved database binary file named path.
 
ndNodeGetRootNode () const
 Get the root node of the hierarchy.
 
ndNodeGetBackNode (const ndNode *const node) const
 Returns the back child node of the hierarchy. More...
 
ndNodeGetFrontNode (const ndNode *const node) const
 Returns the front child node of the hierarchy. More...
 
void GetNodeAabb (const ndNode *const node, ndVector &p0, ndVector &p1) const
 Returns the bounding box of node in point p0 and p1.
 
- Public Member Functions inherited from ndPolygonSoupDatabase
ndFloat32 GetRadius () const
 
ndInt32 GetVertexCount () const
 
ndInt32 GetStrideInBytes () const
 
ndFloat32 * GetLocalVertexPool () const
 
ndUnsigned32 GetTagId (const ndInt32 *const face, ndInt32 indexCount) const
 
void SetTagId (const ndInt32 *const face, ndInt32 indexCount, ndUnsigned32 newID) const
 
- Public Member Functions inherited from ndClassAlloc
 ndClassAlloc ()
 Empty default constructor.
 
 ~ndClassAlloc ()
 Empty.
 

Protected Member Functions

D_CORE_API void Create (const ndPolygonSoupBuilder &builder)
 
D_CORE_API void CalculateAdjacent ()
 
virtual D_CORE_API ndVector ForAllSectorsSupportVertex (const ndVector &dir) const
 
virtual D_CORE_API void ForAllSectorsRayHit (const ndFastRay &ray, ndFloat32 maxT, ndRayIntersectCallback callback, void *const context) const
 
virtual D_CORE_API void ForAllSectors (const ndFastAabb &obbAabb, const ndVector &boxDistanceTravel, ndFloat32 maxT, ndAaabbIntersectCallback callback, void *const context) const
 
virtual D_CORE_API void ForThisSector (const ndAabbPolygonSoup::ndNode *const node, const ndFastAabb &obbAabb, const ndVector &boxDistanceTravel, ndFloat32 maxT, ndAaabbIntersectCallback callback, void *const context) const
 
- Protected Member Functions inherited from ndPolygonSoupDatabase
 ndPolygonSoupDatabase (const char *const name=nullptr)
 

Friends

class ndContactSolver
 

Additional Inherited Members

- Static Public Member Functions inherited from ndClassAlloc
D_OPERATOR_NEW_AND_DELETE static D_CORE_API void * Malloc (size_t size)
 Generic allocation for any function subclass from ndClassAlloc.
 
static D_CORE_API void Free (void *const ptr)
 Generic destruction for any function subclass from ndClassAlloc.
 
- Protected Attributes inherited from ndPolygonSoupDatabase
ndInt32 m_vertexCount
 
ndInt32 m_strideInBytes
 
ndFloat32 * m_localVertex
 

Detailed Description

Base class for creating a leafless bounding box hierarchy for queering a polygon list index list mesh.

Member Function Documentation

◆ GetBackNode()

ndNode* ndAabbPolygonSoup::GetBackNode ( const ndNode *const  node) const
inline

Returns the back child node of the hierarchy.

Return nullptr if node was a leaf.

◆ GetFrontNode()

ndNode* ndAabbPolygonSoup::GetFrontNode ( const ndNode *const  node) const
inline

Returns the front child node of the hierarchy.

Return nullptr if node was a leaf.