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

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

#include <PxBoxGeometry.h>

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

Public Member Functions

PX_INLINE PxBoxGeometry (PxReal hx=0.0f, PxReal hy=0.0f, PxReal hz=0.0f)
 Constructor to initialize half extents from scalar parameters.
 
PX_INLINE PxBoxGeometry (PxVec3 halfExtents_)
 Constructor to initialize half extents from vector parameter.
 
PX_INLINE PxBoxGeometry (const PxBoxGeometry &that)
 Copy constructor.
 
PX_INLINE void operator= (const PxBoxGeometry &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

PxVec3 halfExtents
 Half of the width, height, and depth of the box.
 
- 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 box.

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

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

Constructor & Destructor Documentation

◆ PxBoxGeometry() [1/3]

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

Constructor to initialize half extents from scalar parameters.

Parameters
hxInitial half extents' x component.
hyInitial half extents' y component.
hzInitial half extents' z component.

◆ PxBoxGeometry() [2/3]

PX_INLINE physx::PxBoxGeometry::PxBoxGeometry ( PxVec3  halfExtents_)
inline

Constructor to initialize half extents from vector parameter.

Parameters
halfExtents_Initial half extents.

◆ PxBoxGeometry() [3/3]

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

Copy constructor.

Parameters
[in]thatOther object

Member Function Documentation

◆ isValid()

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

Returns true if the geometry is valid.

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

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