Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
TriangleCodecIndexed8BitPackSOA4Flags Class Reference

#include <TriangleCodecIndexed8BitPackSOA4Flags.h>

Classes

class  DecodingContext
 This class is used to decode and decompress triangle data packed by the EncodingContext. More...
 
class  EncodingContext
 This class is used to encode and compress triangle data into a byte buffer. More...
 
struct  TriangleBlock
 A block of 4 triangles. More...
 
struct  TriangleBlockHeader
 A triangle header, will be followed by one or more TriangleBlocks. More...
 
class  TriangleHeader
 
class  ValidationContext
 This class is used to validate that the triangle data will not be degenerate after compression. More...
 
struct  VertexData
 A single packed vertex. More...
 

Public Types

enum  EComponentData : uint32 { COMPONENT_BITS = 21 , COMPONENT_MASK = (1 << COMPONENT_BITS) - 1 }
 Amount of bits per component. More...
 
enum  EVertexXY : uint32 { COMPONENT_X = 0 , COMPONENT_Y1 = COMPONENT_BITS , COMPONENT_Y1_BITS = 32 - COMPONENT_BITS }
 Packed X and Y coordinate. More...
 
enum  EVertexZY : uint32 { COMPONENT_Z = 0 , COMPONENT_Y2 = COMPONENT_BITS , COMPONENT_Y2_BITS = 31 - COMPONENT_BITS }
 Packed Z and Y coordinate. More...
 
enum  ETriangleBlockHeaderFlags : uint32 { OFFSET_TO_VERTICES_BITS = 29 , OFFSET_TO_VERTICES_MASK = (1 << OFFSET_TO_VERTICES_BITS) - 1 , OFFSET_TO_USERDATA_BITS = 3 , OFFSET_TO_USERDATA_MASK = (1 << OFFSET_TO_USERDATA_BITS) - 1 }
 

Static Public Attributes

static constexpr int TriangleHeaderSize = sizeof(TriangleHeader)
 Size of the header (an empty struct is always > 0 bytes so this needs a separate variable) More...
 
static constexpr bool ChangesOffsetOnPack = false
 If this codec could return a different offset than the current buffer size when calling Pack() More...
 

Detailed Description

Store vertices in 64 bits and indices in 8 bits + 8 bit of flags per triangle like this:

TriangleBlockHeader, TriangleBlock (4 triangles and their flags in 16 bytes), TriangleBlock... [Optional] UserData (4 bytes per triangle)

Vertices are stored:

VertexData (1 vertex in 64 bits), VertexData...

They're compressed relative to the bounding box as provided by the node codec.

Member Enumeration Documentation

◆ EComponentData

Amount of bits per component.

Enumerator
COMPONENT_BITS 
COMPONENT_MASK 

◆ ETriangleBlockHeaderFlags

Enumerator
OFFSET_TO_VERTICES_BITS 

Offset from current block to start of vertices in bytes.

OFFSET_TO_VERTICES_MASK 
OFFSET_TO_USERDATA_BITS 

When user data is stored, this is the number of blocks to skip to get to the user data (0 = no user data)

OFFSET_TO_USERDATA_MASK 

◆ EVertexXY

Packed X and Y coordinate.

Enumerator
COMPONENT_X 
COMPONENT_Y1 
COMPONENT_Y1_BITS 

◆ EVertexZY

Packed Z and Y coordinate.

Enumerator
COMPONENT_Z 
COMPONENT_Y2 
COMPONENT_Y2_BITS 

Member Data Documentation

◆ ChangesOffsetOnPack

constexpr bool TriangleCodecIndexed8BitPackSOA4Flags::ChangesOffsetOnPack = false
staticconstexpr

If this codec could return a different offset than the current buffer size when calling Pack()

◆ TriangleHeaderSize

constexpr int TriangleCodecIndexed8BitPackSOA4Flags::TriangleHeaderSize = sizeof(TriangleHeader)
staticconstexpr

Size of the header (an empty struct is always > 0 bytes so this needs a separate variable)


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