PxCapsuleGeometry Class Reference

Class representing the geometry of a capsule. More...

#include <PxCapsuleGeometry.h>

Inheritance diagram for PxCapsuleGeometry:
Collaboration diagram for PxCapsuleGeometry:

Public Member Functions

PX_INLINE PxCapsuleGeometry ()
 Default constructor, initializes to a capsule with zero height and radius. More...
 
PX_INLINE PxCapsuleGeometry (PxReal radius_, PxReal halfHeight_)
 Constructor, initializes to a capsule with passed radius and half height. More...
 
PX_INLINE bool isValid () const
 Returns true if the geometry is valid. More...
 
- Public Member Functions inherited from PxGeometry
PX_CUDA_CALLABLE PX_FORCE_INLINE PxGeometryType::Enum getType () const
 Returns the type of the geometry. More...
 

Public Attributes

PxReal radius
 The radius of the capsule. More...
 
PxReal halfHeight
 half of the capsule's height, measured between the centers of the hemispherical ends. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PxGeometry
PX_CUDA_CALLABLE PX_FORCE_INLINE PxGeometry (PxGeometryType::Enum type)
 
- Protected Attributes inherited from PxGeometry
PxGeometryType::Enum mType
 

Detailed Description

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.

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

The function PxTransformFromSegment is a helper for generating an appropriate transform for the capsule from the capsule's interior line segment.

See also
PxTransformFromSegment

Constructor & Destructor Documentation

◆ PxCapsuleGeometry() [1/2]

PX_INLINE PxCapsuleGeometry::PxCapsuleGeometry ( )
inline

Default constructor, initializes to a capsule with zero height and radius.

◆ PxCapsuleGeometry() [2/2]

PX_INLINE PxCapsuleGeometry::PxCapsuleGeometry ( PxReal  radius_,
PxReal  halfHeight_ 
)
inline

Constructor, initializes to a capsule with passed radius and half height.

Member Data Documentation

◆ halfHeight

PxReal PxCapsuleGeometry::halfHeight

half of the capsule's height, measured between the centers of the hemispherical ends.

Referenced by PxMassProperties::PxMassProperties().

◆ radius

PxReal PxCapsuleGeometry::radius

The radius of the capsule.

Referenced by PxMassProperties::PxMassProperties().


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