PxHeightFieldGeometry

Defined in include/geometry/PxHeightFieldGeometry.h

class PxHeightFieldGeometry : public PxGeometry

Height field geometry class.

This class allows to create a scaled height field geometry instance.

There is a minimum allowed value for Y and XZ scaling - PX_MIN_HEIGHTFIELD_XZ_SCALE, heightfield creation will fail if XZ value is below this value.

Public Functions

inline PxHeightFieldGeometry(PxHeightField *hf = NULL, PxMeshGeometryFlags flags = PxMeshGeometryFlag::Enum(0), PxReal heightScale_ = 1.0f, PxReal rowScale_ = 1.0f, PxReal columnScale_ = 1.0f)

Constructor.

inline PxHeightFieldGeometry(const PxHeightFieldGeometry &that)

Copy constructor.

Parameters

that[in] Other object

inline void operator=(const PxHeightFieldGeometry &that)

Assignment operator.

inline bool isValid() const

Returns true if the geometry is valid.

See also

PxRigidActor::createShape, PxPhysics::createShape

Note

A valid height field has a positive scale value in each direction (heightScale > 0, rowScale > 0, columnScale > 0). It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a height field that has zero extents in any direction.

Returns

True if the current settings are valid

inline PxGeometryType::Enum getType() const

Returns the type of the geometry.

Returns

The type of the object.

Public Members

PxHeightField *heightField

The height field data.

PxReal heightScale

The scaling factor for the height field in vertical direction (y direction in local space).

PxReal rowScale

The scaling factor for the height field in the row direction (x direction in local space).

PxReal columnScale

The scaling factor for the height field in the column direction (z direction in local space).

PxMeshGeometryFlags heightFieldFlags

Flags to specify some collision properties for the height field.

PxPadding<3> paddingFromFlags

padding for mesh flags.

float mTypePadding

Protected Attributes

PxGeometryType::Enum mType