Defined in include/geometry/PxBoxGeometry.h

Inheritance Relationships

Base Type

class PxBoxGeometry : public PxGeometry

Class representing the geometry of a box.

The geometry of a box can be fully specified by its half extents. This is the half of its width, height, and depth.


The scaling of the box is expected to be baked into these values, there is no additional scaling parameter.

Public Functions

inline PxBoxGeometry(PxReal hx = 0.0f, PxReal hy = 0.0f, PxReal hz = 0.0f)

Constructor to initialize half extents from scalar parameters.

  • hx – Initial half extents’ x component.

  • hy – Initial half extents’ y component.

  • hz – Initial half extents’ z component.

inline PxBoxGeometry(PxVec3 halfExtents_)

Constructor to initialize half extents from vector parameter.


halfExtents_ – Initial half extents.

inline PxBoxGeometry(const PxBoxGeometry &that)

Copy constructor.


that[in] Other object

inline void operator=(const PxBoxGeometry &that)

Assignment operator.

inline bool isValid() const

Returns true if the geometry is valid.

See also

PxRigidActor::createShape, PxPhysics::createShape


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


True if the current settings are valid

inline PxGeometryType::Enum getType() const

Returns the type of the geometry.


The type of the object.

Public Members

PxVec3 halfExtents

Half of the width, height, and depth of the box.

float mTypePadding

Protected Attributes

PxGeometryType::Enum mType