Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
NodeCodecQuadTreeHalfFloat< Alignment >::EncodingContext Class Reference

This class encodes and compresses quad tree nodes. More...

#include <NodeCodecQuadTreeHalfFloat.h>

Public Member Functions

uint GetPessimisticMemoryEstimate (uint inNodeCount) const
 Get an upper bound on the amount of bytes needed for a node tree with inNodeCount nodes. More...
 
uint NodeAllocate (const AABBTreeBuilder::Node *inNode, Vec3Arg inNodeBoundsMin, Vec3Arg inNodeBoundsMax, Array< const AABBTreeBuilder::Node * > &ioChildren, Vec3 outChildBoundsMin[NumChildrenPerNode], Vec3 outChildBoundsMax[NumChildrenPerNode], ByteBuffer &ioBuffer, const char *&outError) const
 
bool NodeFinalize (const AABBTreeBuilder::Node *inNode, uint inNodeStart, uint inNumChildren, const uint *inChildrenNodeStart, const uint *inChildrenTrianglesStart, ByteBuffer &ioBuffer, const char *&outError) const
 Once all nodes have been added, this call finalizes all nodes by patching in the offsets of the child nodes (that were added after the node itself was added) More...
 
bool Finalize (Header *outHeader, const AABBTreeBuilder::Node *inRoot, uint inRootNodeStart, uint inRootTrianglesStart, const char *&outError) const
 Once all nodes have been finalized, this will finalize the header of the nodes. More...
 

Detailed Description

template<int Alignment>
class NodeCodecQuadTreeHalfFloat< Alignment >::EncodingContext

This class encodes and compresses quad tree nodes.

Member Function Documentation

◆ Finalize()

template<int Alignment>
bool NodeCodecQuadTreeHalfFloat< Alignment >::EncodingContext::Finalize ( Header outHeader,
const AABBTreeBuilder::Node inRoot,
uint  inRootNodeStart,
uint  inRootTrianglesStart,
const char *&  outError 
) const
inline

Once all nodes have been finalized, this will finalize the header of the nodes.

◆ GetPessimisticMemoryEstimate()

template<int Alignment>
uint NodeCodecQuadTreeHalfFloat< Alignment >::EncodingContext::GetPessimisticMemoryEstimate ( uint  inNodeCount) const
inline

Get an upper bound on the amount of bytes needed for a node tree with inNodeCount nodes.

◆ NodeAllocate()

template<int Alignment>
uint NodeCodecQuadTreeHalfFloat< Alignment >::EncodingContext::NodeAllocate ( const AABBTreeBuilder::Node inNode,
Vec3Arg  inNodeBoundsMin,
Vec3Arg  inNodeBoundsMax,
Array< const AABBTreeBuilder::Node * > &  ioChildren,
Vec3  outChildBoundsMin[NumChildrenPerNode],
Vec3  outChildBoundsMax[NumChildrenPerNode],
ByteBuffer ioBuffer,
const char *&  outError 
) const
inline

Allocate a new node for inNode. Algorithm can modify the order of ioChildren to indicate in which order children should be compressed Algorithm can enlarge the bounding boxes of the children during compression and returns these in outChildBoundsMin, outChildBoundsMax inNodeBoundsMin, inNodeBoundsMax is the bounding box if inNode possibly widened by compressing the parent node Returns uint(-1) on error and reports the error in outError

◆ NodeFinalize()

template<int Alignment>
bool NodeCodecQuadTreeHalfFloat< Alignment >::EncodingContext::NodeFinalize ( const AABBTreeBuilder::Node inNode,
uint  inNodeStart,
uint  inNumChildren,
const uint inChildrenNodeStart,
const uint inChildrenTrianglesStart,
ByteBuffer ioBuffer,
const char *&  outError 
) const
inline

Once all nodes have been added, this call finalizes all nodes by patching in the offsets of the child nodes (that were added after the node itself was added)


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