|
RavEngine
|
Descriptor class for #PxTriangleMesh. More...
#include <PxTriangleMeshDesc.h>
Public Member Functions | |
| PX_INLINE | PxTriangleMeshDesc () |
| Constructor sets to default. | |
| PX_INLINE void | setToDefault () |
| (re)sets the structure to the default. | |
| PX_INLINE bool | isValid () const |
| Returns true if the descriptor is valid. | |
Public Member Functions inherited from physx::PxSimpleTriangleMesh | |
| PX_INLINE | PxSimpleTriangleMesh () |
| constructor sets to default. | |
| PX_INLINE void | setToDefault () |
| (re)sets the structure to the default. | |
| PX_INLINE bool | isValid () const |
| returns true if the current settings are valid | |
Public Attributes | |
| PxTypedStridedData< PxMaterialTableIndex > | materialIndices |
| PxSDFDesc * | sdfDesc |
| SDF descriptor. When this descriptor is set, signed distance field is calculated for this convex mesh. | |
Public Attributes inherited from physx::PxSimpleTriangleMesh | |
| PxBoundedData | points |
| Pointer to first vertex point. | |
| PxBoundedData | triangles |
| Pointer to first triangle. | |
| PxMeshFlags | flags |
| Flags bits, combined from values of the enum ::PxMeshFlag. | |
Descriptor class for #PxTriangleMesh.
Note that this class is derived from PxSimpleTriangleMesh which contains the members that describe the basic mesh. The mesh data is copied when an PxTriangleMesh object is created from this descriptor. After the call the user may discard the triangle data.
| PX_INLINE bool physx::PxTriangleMeshDesc::isValid | ( | ) | const |
Returns true if the descriptor is valid.
| PxTypedStridedData<PxMaterialTableIndex> physx::PxTriangleMeshDesc::materialIndices |
Optional pointer to first material index, or NULL. There are PxSimpleTriangleMesh::numTriangles indices in total. Caller may add materialIndexStride bytes to the pointer to access the next triangle.
When a triangle mesh collides with another object, a material is required at the collision point. If materialIndices is NULL, then the material of the PxShape instance is used. Otherwise, if the point of contact is on a triangle with index i, then the material index is determined as: PxMaterialTableIndex index = *(PxMaterialTableIndex *)(((PxU8*)materialIndices) + materialIndexStride * i);
If the contact point falls on a vertex or an edge, a triangle adjacent to the vertex or edge is selected, and its index used to look up a material. The selection is arbitrary but consistent over time.
Default: NULL
| PxSDFDesc* physx::PxTriangleMeshDesc::sdfDesc |
SDF descriptor. When this descriptor is set, signed distance field is calculated for this convex mesh.
Default: NULL