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

 IndexedTriangle (uint32 inI1, uint32 inI2, uint32 inI3, uint32 inMaterialIndex)
 Constructor. More...
 
bool operator== (const IndexedTriangle &inRHS) const
 Check if two triangles are identical. More...
 
IndexedTriangle GetLowestIndexFirst () const
 Rotate the vertices so that the lowest vertex becomes the first. This does not change the represented triangle. More...
 
JPH_OVERRIDE_NEW_DELETE IndexedTriangleNoMaterial ()=default
 Constructor. More...
 
 IndexedTriangleNoMaterial (uint32 inI1, uint32 inI2, uint32 inI3)
 
- Public Member Functions inherited from IndexedTriangleNoMaterial
JPH_OVERRIDE_NEW_DELETE IndexedTriangleNoMaterial ()=default
 Constructor. More...
 
 IndexedTriangleNoMaterial (uint32 inI1, uint32 inI2, uint32 inI3)
 
bool operator== (const IndexedTriangleNoMaterial &inRHS) const
 Check if two triangles are identical. More...
 
bool IsEquivalent (const IndexedTriangleNoMaterial &inRHS) const
 Check if two triangles are equivalent (using the same vertices) More...
 
bool IsOpposite (const IndexedTriangleNoMaterial &inRHS) const
 Check if two triangles are opposite (using the same vertices but in opposing order) More...
 
bool IsDegenerate () const
 Check if triangle is degenerate. More...
 
void Rotate ()
 Rotate the vertices so that the second vertex becomes first etc. This does not change the represented triangle. More...
 
Vec3 GetCentroid (const VertexList &inVertices) const
 Get center of triangle. More...
 

Public Attributes

uint32 mMaterialIndex = 0
 
- Public Attributes inherited from IndexedTriangleNoMaterial
uint32 mIdx [3]
 

Detailed Description

Triangle with 32-bit indices and material index.

Constructor & Destructor Documentation

◆ IndexedTriangle()

IndexedTriangle::IndexedTriangle ( uint32  inI1,
uint32  inI2,
uint32  inI3,
uint32  inMaterialIndex 
)
inline

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]

IndexedTriangleNoMaterial::IndexedTriangleNoMaterial ( uint32  inI1,
uint32  inI2,
uint32  inI3 
)
inline

◆ operator==()

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

Check if two triangles are identical.

Member Data Documentation

◆ mMaterialIndex

uint32 IndexedTriangle::mMaterialIndex = 0

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