PxHeightFieldDesc
Defined in include/geometry/PxHeightFieldDesc.h
-
class PxHeightFieldDesc
Descriptor class for PxHeightField.
See also
PxHeightField PxHeightFieldGeometry PxShape PxPhysics.createHeightField() PxCooking.createHeightField()
Note
The heightfield data is copied when a PxHeightField object is created from this descriptor. After the call the user may discard the height data.
Public Functions
-
inline PxHeightFieldDesc()
Constructor sets to default.
-
inline void setToDefault()
(re)sets the structure to the default.
-
inline bool isValid() const
Returns true if the descriptor is valid.
- Returns
True if the current settings are valid.
Public Members
-
PxU32 nbRows
Number of sample rows in the height field samples array.
Range: >1Default: 0
Note
Local space X-axis corresponds to rows.
-
PxU32 nbColumns
Number of sample columns in the height field samples array.
Range: >1Default: 0
Note
Local space Z-axis corresponds to columns.
-
PxHeightFieldFormat::Enum format
Format of the sample data.
Currently the only supported format is PxHeightFieldFormat::eS16_TM:
Default: PxHeightFieldFormat::eS16_TM
See also
PxHeightFormat PxHeightFieldDesc.samples
-
PxStridedData samples
The samples array.
It is copied to the SDK’s storage at creation time.
There are nbRows * nbColumn samples in the array, which define nbRows * nbColumn vertices and cells, of which (nbRows - 1) * (nbColumns - 1) cells are actually used.
The array index of sample(row, column) = row * nbColumns + column. The byte offset of sample(row, column) = sampleStride * (row * nbColumns + column). The sample data follows at the offset and spans the number of bytes defined by the format. Then there are zero or more unused bytes depending on sampleStride before the next sample.
Default: NULL
See also
PxHeightFormat
-
PxReal convexEdgeThreshold
This threshold is used by the collision detection to determine if a height field edge is convex and can generate contact points.
Usually the convexity of an edge is determined from the angle (or cosine of the angle) between the normals of the faces sharing that edge. The height field allows a more efficient approach by comparing height values of neighboring vertices. This parameter offsets the comparison. Smaller changes than 0.5 will not alter the set of convex edges. The rule of thumb is that larger values will result in fewer edge contacts.
This parameter is ignored in contact generation with sphere and capsule primitives.
Range: [0, PX_MAX_F32)Default: 0
-
PxHeightFieldFlags flags
Flags bits, combined from values of the enum PxHeightFieldFlag.
Default: 0
See also
PxHeightFieldFlag PxHeightFieldFlags
-
inline PxHeightFieldDesc()