Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
AABBTreeToBuffer< TriangleCodec, NodeCodec > Class Template Reference

Conversion algorithm that converts an AABB tree to an optimized binary buffer. More...

#include <AABBTreeToBuffer.h>

Public Types

using NodeHeader = typename NodeCodec::Header
 Header for the tree.
 
using TriangleHeader = typename TriangleCodec::TriangleHeader
 Header for the triangles.
 

Public Member Functions

bool Convert (const Array< IndexedTriangle > &inTriangles, const Array< AABBTreeBuilder::Node > &inNodes, const VertexList &inVertices, const AABBTreeBuilder::Node *inRoot, bool inStoreUserData, const char *&outError)
 Convert AABB tree. Returns false if failed.
 
const ByteBufferGetBuffer () const
 Get resulting data.
 
ByteBufferGetBuffer ()
 Get resulting data.
 
const NodeHeaderGetNodeHeader () const
 Get header for tree.
 
const TriangleHeaderGetTriangleHeader () const
 Get header for triangles.
 
const void * GetRoot () const
 Get root of resulting tree.
 

Static Public Attributes

static const int HeaderSize = NodeCodec::HeaderSize
 Size in bytes of the header of the tree.
 
static const int NumChildrenPerNode = NodeCodec::NumChildrenPerNode
 Maximum number of children per node in the tree.
 
static const int TriangleHeaderSize = TriangleCodec::TriangleHeaderSize
 Size in bytes of the header for the triangles.
 

Detailed Description

template<class TriangleCodec, class NodeCodec>
class AABBTreeToBuffer< TriangleCodec, NodeCodec >

Conversion algorithm that converts an AABB tree to an optimized binary buffer.

Member Typedef Documentation

◆ NodeHeader

template<class TriangleCodec , class NodeCodec >
using AABBTreeToBuffer< TriangleCodec, NodeCodec >::NodeHeader = typename NodeCodec::Header

Header for the tree.

◆ TriangleHeader

template<class TriangleCodec , class NodeCodec >
using AABBTreeToBuffer< TriangleCodec, NodeCodec >::TriangleHeader = typename TriangleCodec::TriangleHeader

Header for the triangles.

Member Function Documentation

◆ Convert()

template<class TriangleCodec , class NodeCodec >
bool AABBTreeToBuffer< TriangleCodec, NodeCodec >::Convert ( const Array< IndexedTriangle > &  inTriangles,
const Array< AABBTreeBuilder::Node > &  inNodes,
const VertexList inVertices,
const AABBTreeBuilder::Node inRoot,
bool  inStoreUserData,
const char *&  outError 
)
inline

Convert AABB tree. Returns false if failed.

◆ GetBuffer() [1/2]

template<class TriangleCodec , class NodeCodec >
ByteBuffer & AABBTreeToBuffer< TriangleCodec, NodeCodec >::GetBuffer ( )
inline

Get resulting data.

◆ GetBuffer() [2/2]

template<class TriangleCodec , class NodeCodec >
const ByteBuffer & AABBTreeToBuffer< TriangleCodec, NodeCodec >::GetBuffer ( ) const
inline

Get resulting data.

◆ GetNodeHeader()

template<class TriangleCodec , class NodeCodec >
const NodeHeader * AABBTreeToBuffer< TriangleCodec, NodeCodec >::GetNodeHeader ( ) const
inline

Get header for tree.

◆ GetRoot()

template<class TriangleCodec , class NodeCodec >
const void * AABBTreeToBuffer< TriangleCodec, NodeCodec >::GetRoot ( ) const
inline

Get root of resulting tree.

◆ GetTriangleHeader()

template<class TriangleCodec , class NodeCodec >
const TriangleHeader * AABBTreeToBuffer< TriangleCodec, NodeCodec >::GetTriangleHeader ( ) const
inline

Get header for triangles.

Member Data Documentation

◆ HeaderSize

template<class TriangleCodec , class NodeCodec >
const int AABBTreeToBuffer< TriangleCodec, NodeCodec >::HeaderSize = NodeCodec::HeaderSize
static

Size in bytes of the header of the tree.

◆ NumChildrenPerNode

template<class TriangleCodec , class NodeCodec >
const int AABBTreeToBuffer< TriangleCodec, NodeCodec >::NumChildrenPerNode = NodeCodec::NumChildrenPerNode
static

Maximum number of children per node in the tree.

◆ TriangleHeaderSize

template<class TriangleCodec , class NodeCodec >
const int AABBTreeToBuffer< TriangleCodec, NodeCodec >::TriangleHeaderSize = TriangleCodec::TriangleHeaderSize
static

Size in bytes of the header for the triangles.


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