PxCapsuleGeometry
Defined in include/geometry/PxCapsuleGeometry.h
-
class PxCapsuleGeometry : public PxGeometry
Class representing the geometry of a capsule.
Capsules are shaped as the union of a cylinder of length 2 * halfHeight and with the given radius centered at the origin and extending along the x axis, and two hemispherical ends.
The function PxTransformFromSegment is a helper for generating an appropriate transform for the capsule from the capsule’s interior line segment.
See also
PxTransformFromSegment
Note
The scaling of the capsule is expected to be baked into these values, there is no additional scaling parameter.
Public Functions
-
inline PxCapsuleGeometry(PxReal radius_ = 0.0f, PxReal halfHeight_ = 0.0f)
Constructor, initializes to a capsule with passed radius and half height.
-
inline PxCapsuleGeometry(const PxCapsuleGeometry &that)
Copy constructor.
- Parameters
that – [in] Other object
-
inline void operator=(const PxCapsuleGeometry &that)
Assignment operator.
-
inline bool isValid() const
Returns true if the geometry is valid.
See also
PxRigidActor::createShape, PxPhysics::createShape
Note
A valid capsule has radius > 0, halfHeight >= 0. It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a capsule that has zero radius or height.
- 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
-
PxReal halfHeight
half of the capsule’s height, measured between the centers of the hemispherical ends.
-
float mTypePadding
Protected Attributes
-
PxGeometryType::Enum mType
-
inline PxCapsuleGeometry(PxReal radius_ = 0.0f, PxReal halfHeight_ = 0.0f)