A convex mesh. More...
#include <PxConvexMesh.h>
Public Member Functions | |
virtual PX_PHYSX_COMMON_API PxU32 | getNbVertices () const =0 |
Returns the number of vertices. More... | |
virtual PX_PHYSX_COMMON_API const PxVec3 * | getVertices () const =0 |
Returns the vertices. More... | |
virtual PX_PHYSX_COMMON_API const PxU8 * | getIndexBuffer () const =0 |
Returns the index buffer. More... | |
virtual PX_PHYSX_COMMON_API PxU32 | getNbPolygons () const =0 |
Returns the number of polygons. More... | |
virtual PX_PHYSX_COMMON_API bool | getPolygonData (PxU32 index, PxHullPolygon &data) const =0 |
Returns the polygon data. More... | |
virtual PX_PHYSX_COMMON_API void | release ()=0 |
Decrements the reference count of a convex mesh and releases it if the new reference count is zero. More... | |
virtual PX_PHYSX_COMMON_API PxU32 | getReferenceCount () const =0 |
Returns the reference count of a convex mesh. More... | |
virtual PX_PHYSX_COMMON_API void | acquireReference ()=0 |
Acquires a counted reference to a convex mesh. More... | |
virtual PX_PHYSX_COMMON_API void | getMassInformation (PxReal &mass, PxMat33 &localInertia, PxVec3 &localCenterOfMass) const =0 |
Returns the mass properties of the mesh assuming unit density. More... | |
virtual PX_PHYSX_COMMON_API PxBounds3 | getLocalBounds () const =0 |
Returns the local-space (vertex space) AABB from the convex mesh. More... | |
virtual PX_PHYSX_COMMON_API const char * | getConcreteTypeName () const |
Returns string name of dynamic type. More... | |
virtual PX_PHYSX_COMMON_API bool | isGpuCompatible () const =0 |
This method decides whether a convex mesh is gpu compatible. If the total number of vertices are more than 64 or any number of vertices in a polygon is more than 32, or convex hull data was not cooked with GPU data enabled during cooking or was loaded from a serialized collection, the convex hull is incompatible with GPU collision detection. Otherwise it is compatible. More... | |
Public Member Functions inherited from PxBase | |
template<class T > | |
T * | is () |
template<class T > | |
const T * | is () const |
PX_FORCE_INLINE PxType | getConcreteType () const |
Returns concrete type of object. More... | |
PX_FORCE_INLINE void | setBaseFlag (PxBaseFlag::Enum flag, bool value) |
Set PxBaseFlag. More... | |
PX_FORCE_INLINE void | setBaseFlags (PxBaseFlags inFlags) |
Set PxBaseFlags. More... | |
PX_FORCE_INLINE PxBaseFlags | getBaseFlags () const |
Returns PxBaseFlags. More... | |
virtual bool | isReleasable () const |
Whether the object is subordinate. More... | |
Protected Member Functions | |
PX_INLINE | PxConvexMesh (PxType concreteType, PxBaseFlags baseFlags) |
PX_INLINE | PxConvexMesh (PxBaseFlags baseFlags) |
virtual PX_PHYSX_COMMON_API | ~PxConvexMesh () |
virtual PX_PHYSX_COMMON_API bool | isKindOf (const char *name) const |
Returns whether a given type name matches with the type of this instance. More... | |
Protected Member Functions inherited from PxBase | |
PX_INLINE | PxBase (PxType concreteType, PxBaseFlags baseFlags) |
Constructor setting concrete type and base flags. More... | |
PX_INLINE | PxBase (PxBaseFlags baseFlags) |
Deserialization constructor setting base flags. More... | |
virtual | ~PxBase () |
Destructor. More... | |
template<class T > | |
bool | typeMatch () const |
Additional Inherited Members | |
Protected Attributes inherited from PxBase | |
PxType | mConcreteType |
PxBaseFlags | mBaseFlags |
A convex mesh.
Internally represented as a list of convex polygons. The number of polygons is limited to 256.
To avoid duplicating data when you have several instances of a particular mesh positioned differently, you do not use this class to represent a convex object directly. Instead, you create an instance of this mesh via the PxConvexMeshGeometry and PxShape classes.
To create an instance of this class call PxPhysics::createConvexMesh(), and PxConvexMesh::release() to delete it. This is only possible once you have released all of its PxShape instances.
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
|
pure virtual |
Acquires a counted reference to a convex mesh.
This method increases the reference count of the convex mesh by 1. Decrement the reference count by calling release()
|
inlinevirtual |
Returns string name of dynamic type.
Implements PxBase.
|
pure virtual |
|
pure virtual |
Returns the local-space (vertex space) AABB from the convex mesh.
|
pure virtual |
Returns the mass properties of the mesh assuming unit density.
The following relationship holds between mass and volume:
mass = volume * density
The mass of a unit density mesh is equal to its volume, so this function returns the volume of the mesh.
Similarly, to obtain the localInertia of an identically shaped object with a uniform density of d, simply multiply the localInertia of the unit density mesh by d.
[out] | mass | The mass of the mesh assuming unit density. |
[out] | localInertia | The inertia tensor in mesh local space assuming unit density. |
[out] | localCenterOfMass | Position of center of mass (or centroid) in mesh local space. |
Referenced by PxMassProperties::PxMassProperties().
|
pure virtual |
Returns the number of polygons.
|
pure virtual |
|
pure virtual |
Returns the polygon data.
[in] | index | Polygon index in [0 ; getNbPolygons()[. |
[out] | data | Polygon data. |
|
pure virtual |
Returns the reference count of a convex mesh.
At creation, the reference count of the convex mesh is 1. Every shape referencing this convex mesh increments the count by 1. When the reference count reaches 0, and only then, the convex mesh gets destroyed automatically.
|
pure virtual |
|
pure virtual |
This method decides whether a convex mesh is gpu compatible. If the total number of vertices are more than 64 or any number of vertices in a polygon is more than 32, or convex hull data was not cooked with GPU data enabled during cooking or was loaded from a serialized collection, the convex hull is incompatible with GPU collision detection. Otherwise it is compatible.
|
inlineprotectedvirtual |
Returns whether a given type name matches with the type of this instance.
Reimplemented from PxBase.
References PxBase::isKindOf().
|
pure virtual |
Decrements the reference count of a convex mesh and releases it if the new reference count is zero.
Implements PxBase.