Jolt Physics
A multi core friendly Game Physics Engine
|
Triangle with 32-bit indices and material index. More...
#include <IndexedTriangle.h>
Public Member Functions | |
constexpr | IndexedTriangle (uint32 inI1, uint32 inI2, uint32 inI3, uint32 inMaterialIndex, uint inUserData=0) |
Constructor. | |
bool | operator== (const IndexedTriangle &inRHS) const |
Check if two triangles are identical. | |
IndexedTriangle | GetLowestIndexFirst () const |
Rotate the vertices so that the lowest vertex becomes the first. This does not change the represented triangle. | |
JPH_OVERRIDE_NEW_DELETE | IndexedTriangleNoMaterial ()=default |
Constructor. | |
constexpr | IndexedTriangleNoMaterial (uint32 inI1, uint32 inI2, uint32 inI3) |
Public Member Functions inherited from IndexedTriangleNoMaterial | |
JPH_OVERRIDE_NEW_DELETE | IndexedTriangleNoMaterial ()=default |
Constructor. | |
constexpr | IndexedTriangleNoMaterial (uint32 inI1, uint32 inI2, uint32 inI3) |
bool | operator== (const IndexedTriangleNoMaterial &inRHS) const |
Check if two triangles are identical. | |
bool | IsEquivalent (const IndexedTriangleNoMaterial &inRHS) const |
Check if two triangles are equivalent (using the same vertices) | |
bool | IsOpposite (const IndexedTriangleNoMaterial &inRHS) const |
Check if two triangles are opposite (using the same vertices but in opposing order) | |
bool | IsDegenerate (const VertexList &inVertices) const |
Check if triangle is degenerate. | |
void | Rotate () |
Rotate the vertices so that the second vertex becomes first etc. This does not change the represented triangle. | |
Vec3 | GetCentroid (const VertexList &inVertices) const |
Get center of triangle. | |
Public Attributes | |
uint32 | mMaterialIndex = 0 |
uint32 | mUserData = 0 |
User data that can be used for anything by the application, e.g. for tracking the original index of the triangle. | |
Public Attributes inherited from IndexedTriangleNoMaterial | |
uint32 | mIdx [3] |
Triangle with 32-bit indices and material index.
|
inlineconstexpr |
Constructor.
|
inline |
Rotate the vertices so that the lowest vertex becomes the first. This does not change the represented triangle.
|
default |
Constructor.
|
inlineconstexpr |
|
inline |
Check if two triangles are identical.
uint32 IndexedTriangle::mMaterialIndex = 0 |
uint32 IndexedTriangle::mUserData = 0 |
User data that can be used for anything by the application, e.g. for tracking the original index of the triangle.