Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
EPAConvexHullBuilder::Triangle Class Reference

Class that holds the information of one triangle. More...

#include <EPAConvexHullBuilder.h>

Inheritance diagram for EPAConvexHullBuilder::Triangle:
NonCopyable

Public Member Functions

 Triangle (int inIdx0, int inIdx1, int inIdx2, const Vec3 *inPositions)
 Constructor.
 
bool IsFacing (Vec3Arg inPosition) const
 Check if triangle is facing inPosition.
 
bool IsFacingOrigin () const
 Check if triangle is facing the origin.
 
const EdgeGetNextEdge (int inIndex) const
 Get the next edge of edge inIndex.
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Public Attributes

Edge mEdge [3]
 3 edges of this triangle
 
Vec3 mNormal
 Normal of this triangle, length is 2 times area of triangle.
 
Vec3 mCentroid
 Center of the triangle.
 
float mClosestLenSq = FLT_MAX
 Closest distance^2 from origin to triangle.
 
float mLambda [2]
 Barycentric coordinates of closest point to origin on triangle.
 
bool mLambdaRelativeTo0
 How to calculate the closest point, true: y0 + l0 * (y1 - y0) + l1 * (y2 - y0), false: y1 + l0 * (y0 - y1) + l1 * (y2 - y1)
 
bool mClosestPointInterior = false
 Flag that indicates that the closest point from this triangle to the origin is an interior point.
 
bool mRemoved = false
 Flag that indicates that triangle has been removed.
 
bool mInQueue = false
 Flag that indicates that this triangle was placed in the sorted heap (stays true after it is popped because the triangle is freed by the main EPA algorithm loop)
 

Detailed Description

Class that holds the information of one triangle.

Constructor & Destructor Documentation

◆ Triangle()

JPH_PRECISE_MATH_ON EPAConvexHullBuilder::Triangle::Triangle ( int  inIdx0,
int  inIdx1,
int  inIdx2,
const Vec3 inPositions 
)
inline

Constructor.

Member Function Documentation

◆ GetNextEdge()

const Edge & EPAConvexHullBuilder::Triangle::GetNextEdge ( int  inIndex) const
inline

Get the next edge of edge inIndex.

◆ IsFacing()

bool EPAConvexHullBuilder::Triangle::IsFacing ( Vec3Arg  inPosition) const
inline

Check if triangle is facing inPosition.

◆ IsFacingOrigin()

bool EPAConvexHullBuilder::Triangle::IsFacingOrigin ( ) const
inline

Check if triangle is facing the origin.

Member Data Documentation

◆ mCentroid

Vec3 EPAConvexHullBuilder::Triangle::mCentroid

Center of the triangle.

◆ mClosestLenSq

float EPAConvexHullBuilder::Triangle::mClosestLenSq = FLT_MAX

Closest distance^2 from origin to triangle.

◆ mClosestPointInterior

bool EPAConvexHullBuilder::Triangle::mClosestPointInterior = false

Flag that indicates that the closest point from this triangle to the origin is an interior point.

◆ mEdge

Edge EPAConvexHullBuilder::Triangle::mEdge[3]

3 edges of this triangle

◆ mInQueue

bool EPAConvexHullBuilder::Triangle::mInQueue = false

Flag that indicates that this triangle was placed in the sorted heap (stays true after it is popped because the triangle is freed by the main EPA algorithm loop)

◆ mLambda

float EPAConvexHullBuilder::Triangle::mLambda[2]

Barycentric coordinates of closest point to origin on triangle.

◆ mLambdaRelativeTo0

bool EPAConvexHullBuilder::Triangle::mLambdaRelativeTo0

How to calculate the closest point, true: y0 + l0 * (y1 - y0) + l1 * (y2 - y0), false: y1 + l0 * (y0 - y1) + l1 * (y2 - y1)

◆ mNormal

Vec3 EPAConvexHullBuilder::Triangle::mNormal

Normal of this triangle, length is 2 times area of triangle.

◆ mRemoved

bool EPAConvexHullBuilder::Triangle::mRemoved = false

Flag that indicates that triangle has been removed.


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