RavEngine
Loading...
Searching...
No Matches
physx::PxCapsuleGeometry Class Reference

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

#include <PxCapsuleGeometry.h>

Inheritance diagram for physx::PxCapsuleGeometry:
[legend]
Collaboration diagram for physx::PxCapsuleGeometry:
[legend]

Public Member Functions

PX_INLINE PxCapsuleGeometry (PxReal radius_=0.0f, PxReal halfHeight_=0.0f)
 Constructor, initializes to a capsule with passed radius and half height.
 
PX_INLINE PxCapsuleGeometry (const PxCapsuleGeometry &that)
 Copy constructor.
 
PX_INLINE void operator= (const PxCapsuleGeometry &that)
 Assignment operator.
 
PX_INLINE bool isValid () const
 Returns true if the geometry is valid.
 
- Public Member Functions inherited from physx::PxGeometry
PX_CUDA_CALLABLE PX_FORCE_INLINE PxGeometryType::Enum getType () const
 Returns the type of the geometry.
 
PX_INLINE void operator= (const PxGeometry &that)
 Assignment operator.
 

Public Attributes

PxReal radius
 The radius of the capsule.
 
PxReal halfHeight
 half of the capsule's height, measured between the centers of the hemispherical ends.
 
- Public Attributes inherited from physx::PxGeometry
float mTypePadding
 

Additional Inherited Members

- Protected Member Functions inherited from physx::PxGeometry
PX_CUDA_CALLABLE PX_FORCE_INLINE PxGeometry (PxGeometryType::Enum type)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxGeometry (const PxGeometry &that)
 
- Protected Attributes inherited from physx::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()

PX_INLINE physx::PxCapsuleGeometry::PxCapsuleGeometry ( const PxCapsuleGeometry &  that)
inline

Copy constructor.

Parameters
[in]thatOther object

Member Function Documentation

◆ isValid()

PX_INLINE bool physx::PxCapsuleGeometry::isValid ( ) const

Returns true if the geometry is valid.

Returns
True if the current settings are valid.
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.
See also
PxRigidActor::createShape, PxPhysics::createShape

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