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

Convex mesh geometry class. More...

#include <PxConvexMeshGeometry.h>

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

Public Member Functions

PX_INLINE PxConvexMeshGeometry (PxConvexMesh *mesh=NULL, const PxMeshScale &scaling=PxMeshScale(), PxConvexMeshGeometryFlags flags=PxConvexMeshGeometryFlag::eTIGHT_BOUNDS)
 Constructor. By default creates an empty object with a NULL mesh and identity scale.
 
PX_INLINE PxConvexMeshGeometry (const PxConvexMeshGeometry &that)
 Copy constructor.
 
PX_INLINE void operator= (const PxConvexMeshGeometry &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

PxMeshScale scale
 The scaling transformation (from vertex space to shape space).
 
PxConvexMesh * convexMesh
 A reference to the convex mesh object.
 
PxConvexMeshGeometryFlags meshFlags
 Mesh flags.
 
PxPadding< 3 > paddingFromFlags
 padding for mesh flags
 
- 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

Convex mesh geometry class.

This class unifies a convex mesh object with a scaling transform, and lets the combined object be used anywhere a PxGeometry is needed.

The scaling is a transform along arbitrary axes contained in the scale object. The vertices of the mesh in geometry (or shape) space is the PxMeshScale::toMat33() transform, multiplied by the vertex space vertices in the PxConvexMesh object.

Constructor & Destructor Documentation

◆ PxConvexMeshGeometry() [1/2]

PX_INLINE physx::PxConvexMeshGeometry::PxConvexMeshGeometry ( PxConvexMesh *  mesh = NULL,
const PxMeshScale &  scaling = PxMeshScale(),
PxConvexMeshGeometryFlags  flags = PxConvexMeshGeometryFlag::eTIGHT_BOUNDS 
)
inline

Constructor. By default creates an empty object with a NULL mesh and identity scale.

Parameters
[in]meshMesh pointer. May be NULL, though this will not make the object valid for shape construction.
[in]scalingScale factor.
[in]flagsMesh flags. \

◆ PxConvexMeshGeometry() [2/2]

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

Copy constructor.

Parameters
[in]thatOther object

Member Function Documentation

◆ isValid()

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

Returns true if the geometry is valid.

Returns
True if the current settings are valid for shape creation.
Note
A valid convex mesh has a positive scale value in each direction (scale.x > 0, scale.y > 0, scale.z > 0). It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a convex that has zero extent in any direction.
See also
PxRigidActor::createShape, PxPhysics::createShape

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