PxConvexMeshGeometry

Defined in include/geometry/PxConvexMeshGeometry.h

Inheritance Relationships

Base Type

class PxConvexMeshGeometry : public PxGeometry

Convex mesh geometry class.

This class unifies a convex mesh object with a scaling transform, and lets the combined object be used anywhere a PxGeometry is needed.

The scaling is a transform along arbitrary axes contained in the scale object. The vertices of the mesh in geometry (or shape) space is the PxMeshScale::toMat33() transform, multiplied by the vertex space vertices in the PxConvexMesh object.

Public Functions

inline PxConvexMeshGeometry(PxConvexMesh *mesh = NULL, const PxMeshScale &scaling = PxMeshScale(), PxConvexMeshGeometryFlags flags = PxConvexMeshGeometryFlag::eTIGHT_BOUNDS)

Constructor.

By default creates an empty object with a NULL mesh and identity scale.

Parameters
  • mesh[in] Mesh pointer. May be NULL, though this will not make the object valid for shape construction.

  • scaling[in] Scale factor.

  • flags[in] Mesh flags. \

inline PxConvexMeshGeometry(const PxConvexMeshGeometry &that)

Copy constructor.

Parameters

that[in] Other object

inline void operator=(const PxConvexMeshGeometry &that)

Assignment operator.

inline bool isValid() const

Returns true if the geometry is valid.

See also

PxRigidActor::createShape, PxPhysics::createShape

Note

A valid convex mesh has a positive scale value in each direction (scale.x > 0, scale.y > 0, scale.z > 0). It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a convex that has zero extent in any direction.

Returns

True if the current settings are valid for shape creation.

inline PxGeometryType::Enum getType() const

Returns the type of the geometry.

Returns

The type of the object.

Public Members

PxMeshScale scale

The scaling transformation (from vertex space to shape space).

PxConvexMesh *convexMesh

A reference to the convex mesh object.

PxConvexMeshGeometryFlags meshFlags

Mesh flags.

PxPadding<3> paddingFromFlags

padding for mesh flags

float mTypePadding

Protected Attributes

PxGeometryType::Enum mType