PxSDFDesc
Defined in include/cooking/PxSDFDesc.h
-
class PxSDFDesc
A structure describing signed distance field for mesh.
Public Functions
-
inline PxSDFDesc()
Constructor.
-
inline bool isValid() const
Returns true if the descriptor is valid.
- Returns
true if the current settings are valid
Public Members
-
PxBoundedData sdf
Pointer to first sdf array element.
-
PxU32 subgridSize
The number of cells in a sparse subgrid block (full block has subgridSize^3 cells and (subgridSize+1)^3 samples).
If set to zero, this indicates that only a dense background grid SDF is used without sparse blocks
-
PxSdfBitsPerSubgridPixel::Enum bitsPerSubgridPixel
Enumeration that defines the number of bits per subgrid pixel (either 32, 16 or 8bits)
-
PxDim3 sdfSubgrids3DTexBlockDim
Number of subgrid blocks in the 3d texture.
The full texture dimension will be sdfSubgrids3DTexBlockDim*(subgridSize+1).
-
PxBoundedData sdfSubgrids
The data to create the 3d texture containg the packed subgrid blocks.
Stored as PxU8 to support multiple formats (8, 16 and 32 bits per pixel)
-
PxBoundedData sdfStartSlots
Array with start indices into the subgrid texture for every subgrid block.
10bits for z coordinate, 10bits for y and 10bits for x. Encoding is as follows: slot = (z << 20) | (y << 10) | x
-
PxReal subgridsMinSdfValue
The minimum value over all subgrid blocks.
Used if normalized textures are used which is the case for 8 and 16bit formats
-
PxReal subgridsMaxSdfValue
The maximum value over all subgrid blocks.
Used if normalized textures are used which is the case for 8 and 16bit formats
-
PxBounds3 sdfBounds
The bounds of the sdf.
If left unassigned (empty), the bounds of the mesh will be used
-
PxReal narrowBandThicknessRelativeToSdfBoundsDiagonal
Narrow band thickness as a fraction of the bounds diagonal length.
Every subgrid block that overlaps with the narrow band around the mesh surface will be kept providing high resultion around the mesh surface. The valid range of this parameter is (0, 1). The higher the value, the more subgrids will get created, the more memory will be required.
-
inline PxSDFDesc()