Jolt Physics
A multi core friendly Game Physics Engine
|
Class that holds the information of one triangle. More...
#include <EPAConvexHullBuilder.h>
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 Edge & | GetNextEdge (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) | |
Class that holds the information of one triangle.
|
inline |
Constructor.
Get the next edge of edge inIndex.
Check if triangle is facing inPosition.
|
inline |
Check if triangle is facing the origin.
Vec3 EPAConvexHullBuilder::Triangle::mCentroid |
Center of the triangle.
Closest distance^2 from origin to triangle.
Flag that indicates that the closest point from this triangle to the origin is an interior point.
Edge EPAConvexHullBuilder::Triangle::mEdge[3] |
3 edges of this triangle
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)
float EPAConvexHullBuilder::Triangle::mLambda[2] |
Barycentric coordinates of closest point to origin on triangle.
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)
Vec3 EPAConvexHullBuilder::Triangle::mNormal |
Normal of this triangle, length is 2 times area of triangle.
Flag that indicates that triangle has been removed.