Specifies a triangle through three points in 3D space.
This class stores three member vertices a, b and c to specify the triangle.
Triangle | Specifies a triangle through three points in 3D space. |
a | The first triangle endpoint. |
b | The second triangle endpoint. |
c | The third triangle endpoint. |
ctor (+1 overload) | The default constructor does not initialize any members of this class. |
Translate(offset) | Translates this Triangle in world space. |
Transform(transform) (+3 overloads) | Applies a transformation to this Triangle, in-place. |
BarycentricUVW(point)[const] | Expresses the given point in barycentric (u,v,w) coordinates. |
BarycentricUV(point)[const] | Expresses the given point in barycentric (u,v) coordinates. |
Point(uvw)[const] (+3 overloads) | Returns the point at the given barycentric coordinates. |
Centroid()[const] | Computes the center of mass of this triangle. |
CenterPoint()[const] | Identical to CenterPoint(), but provided to enable common signature with Triangle, AABB and OBB to allow them to be used in template classes. |
Area()[const] | Computes the surface area of this triangle. |
Perimeter()[const] | Computes the total edge length of this triangle. |
VertexArrayPtr() (+1 overload) | Returns a pointer to the vertices of this triangle. The array contains three elements. |
Vertex(i)[const] | Returns a vertex of this triangle. |
CornerPoint(i)[const] | |
Edge(i)[const] | Returns an edge of this triangle. |
PlaneCCW()[const] | Returns the counterclockwise-oriented plane this triangle lies on. |
PlaneCW()[const] | Returns the clockwise-oriented plane this triangle lies on. |
NormalCCW()[const] | Returns the normalized triangle normal pointing to the counter-clockwise direction of this triangle. |
NormalCW()[const] | Returns the normalized triangle normal pointing to the clockwise direction of this triangle. |
UnnormalizedNormalCCW()[const] | Computes an unnormalized counter-clockwise oriented triangle normal vector. |
UnnormalizedNormalCW()[const] | Computes an unnormalized clockwise-oriented triangle normal vector. |
AnyPointFast()[const] | Quickly returns an arbitrary point inside this Triangle. Used in GJK intersection test. |
ExtremePoint(direction)[const] (+1 overload) | Computes an extreme point of this Triangle in the given direction. |
ToPolygon()[const] | Returns a Polygon representation of this Triangle. |
ToPolyhedron()[const] | Returns a Polyhedron representation of this Triangle. |
BoundingAABB()[const] | Returns the tight AABB that encloses this Triangle. |
IsFinite()[const] | Tests if this Triangle is finite. |
IsDegenerate(epsilon)[const] | Returns true if this triangle is degenerate. |
Contains(...)[const] (+2 overloads) | Tests if the given object is fully contained inside this triangle. |
Distance(point)[const] (+2 overloads) | Computes the distance between this triangle and the given object. |
DistanceSq(point)[const] | |
Intersects(...)[const] (+12 overloads) | Tests whether this triangle and the given object intersect. |
ProjectToAxis(axis,dMin,dMax)[const] | Projects this Triangle onto the given axis. |
UniqueFaceNormals(out)[const] | |
UniqueEdgeDirections(out)[const] | |
ClosestPoint(point)[const] (+3 overloads) | Computes the closest point on this triangle to the given object. |
ClosestPointToTriangleEdge(...)[const] (+1 overload) | Computes the closest point on the edge of this triangle to the given object. |
RandomPointInside(rng)[const] | Generates a random point inside this Triangle. |
RandomVertex(rng)[const] | Chooses a corner vertex of this Triangle at random. |
RandomPointOnEdge(rng)[const] | Generates a random point on the edge of this Triangle. |
ToString()[const] | Returns a human-readable representation of this Line. Most useful for debugging purposes. |
SerializeToString()[const] | |
SerializeToCodeString()[const] | Returns a string of C++ code that can be used to construct this object. Useful for generating test cases from badly behaving objects. |
Equals(rhs,epsilon)[const] | |
BitEquals(other)[const] | Compares whether this Triangle and the given Triangle are identical bit-by-bit in the underlying representation. |
NumFaces()[static] | |
NumEdges()[static] | |
NumVertices()[static] | |
BarycentricInsideTriangle(uvw)[static] | Tests if the given barycentric UVW coordinates lie inside a triangle. |
Area2D(p1,p2,p3)[static] | Computes the surface area of the given 2D triangle. |
SignedArea(point,a,b,c)[static] | Relates the barycentric coordinate of the given point to the surface area of triangle abc. |
IsDegenerate(p1,p2,p3,epsilon)[static] | Returns true if the triangle defined by the three given points is degenerate. |
IntersectLineTri(...)[static] | A helper function used in line-triangle tests. |
FromString(str,outEndStr)[static] (+1 overload) |