Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
IndexedTriangle Class Reference

Triangle with 32-bit indices and material index. More...

#include <IndexedTriangle.h>

Inheritance diagram for IndexedTriangle:
IndexedTriangleNoMaterial

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]
 

Detailed Description

Triangle with 32-bit indices and material index.

Constructor & Destructor Documentation

◆ IndexedTriangle()

constexpr IndexedTriangle::IndexedTriangle ( uint32  inI1,
uint32  inI2,
uint32  inI3,
uint32  inMaterialIndex,
uint  inUserData = 0 
)
inlineconstexpr

Constructor.

Member Function Documentation

◆ GetLowestIndexFirst()

IndexedTriangle IndexedTriangle::GetLowestIndexFirst ( ) const
inline

Rotate the vertices so that the lowest vertex becomes the first. This does not change the represented triangle.

◆ IndexedTriangleNoMaterial() [1/2]

JPH_OVERRIDE_NEW_DELETE IndexedTriangleNoMaterial::IndexedTriangleNoMaterial ( )
default

Constructor.

◆ IndexedTriangleNoMaterial() [2/2]

constexpr IndexedTriangleNoMaterial::IndexedTriangleNoMaterial ( uint32  inI1,
uint32  inI2,
uint32  inI3 
)
inlineconstexpr

◆ operator==()

bool IndexedTriangle::operator== ( const IndexedTriangle inRHS) const
inline

Check if two triangles are identical.

Member Data Documentation

◆ mMaterialIndex

uint32 IndexedTriangle::mMaterialIndex = 0

◆ mUserData

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.


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