PxHeightFieldDesc Class Reference
[Geomutils]

Descriptor class for PxHeightField. More...

#include <PxHeightFieldDesc.h>

Collaboration diagram for PxHeightFieldDesc:

Collaboration graph
PxFlags\< PxHeightFieldFlag::Enum, PxU16 \>PxStridedData
[legend]

List of all members.

Public Member Functions

PX_INLINE PxHeightFieldDesc ()
 Constructor sets to default.
PX_INLINE void setToDefault ()
 (re)sets the structure to the default.
PX_INLINE bool isValid () const
 Returns true if the descriptor is valid.

Public Attributes

PxU32 nbRows
 Number of sample rows in the height field samples array.
PxU32 nbColumns
 Number of sample columns in the height field samples array.
PxHeightFieldFormat::Enum format
 Format of the sample data.
PxStridedData samples
 The samples array.
PX_DEPRECATED PxReal thickness
 Sets how thick the heightfield surface is.
PxReal convexEdgeThreshold
PxHeightFieldFlags flags
 Flags bits, combined from values of the enum PxHeightFieldFlag.


Detailed Description

Descriptor class for PxHeightField.

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.
See also:
PxHeightField PxHeightFieldGeometry PxShape PxPhysics.createHeightField() PxCooking.createHeightField()

Member Data Documentation

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

Referenced by isValid(), and PxHeightFieldDesc().

Flags bits, combined from values of the enum PxHeightFieldFlag.

Default: 0

See also:
PxHeightFieldFlag PxHeightFieldFlags

Referenced by isValid(), and PxHeightFieldDesc().

Format of the sample data.

Currently the only supported format is PxHeightFieldFormat::eS16_TM:

Default: PxHeightFieldFormat::eS16_TM

See also:
PxHeightFormat PxHeightFieldDesc.samples

Referenced by isValid(), and PxHeightFieldDesc().

Number of sample columns in the height field samples array.

Note:
Local space Z-axis corresponds to columns.
Range: >1
Default: 0

Referenced by isValid(), and PxHeightFieldDesc().

Number of sample rows in the height field samples array.

Note:
Local space X-axis corresponds to rows.
Range: >1
Default: 0

Referenced by isValid(), and PxHeightFieldDesc().

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

Referenced by isValid().

PX_DEPRECATED PxReal PxHeightFieldDesc::thickness

Sets how thick the heightfield surface is.

In this way even objects which are under the surface of the height field but above this cutoff are treated as colliding with the height field.

The thickness is measured relative to the surface at the given point.

You may set this to a positive value, in which case the extent will be cast along the opposite side of the height field.

You may use a smaller finite value for the extent if you want to put some space under the height field, such as a cave.

Note:
Please refer to the Raycasts Against Heightfields section of the user guide for details of how this value affects raycasts.
Range: (-PX_MAX_BOUNDS_EXTENTS, PX_MAX_BOUNDS_EXTENTS)
Default: -1

Referenced by PxHeightFieldDesc().


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


Copyright © 2008-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com