Back to class index
Polyhedron[Class Summary]
v
f
ctor
NumVertices()[const]
NumFaces()[const]
NumEdges()[const]
VertexArrayPtr() (+1 overload)
Vertex(vertexIndex)[const]
Edge(edgeIndex)[const]
Edges()[const]
Faces()[const]
EdgeIndices()[const]
FacePolygon(faceIndex)[const]
FacePlane(faceIndex)[const]
FaceNormal(faceIndex)[const]
ExtremeVertex(direction)[const]
ExtremePoint(direction)[const]
ProjectToAxis(...)[const]
ConvexCentroid()[const]
ApproximateConvexCentroid()[const]
SurfaceArea()[const]
Volume()[const]
MinimalEnclosingAABB()[const]
MergeAdjacentPlanarFaces()
FaceIndicesValid()[const]
FlipWindingOrder()
OrientNormalsOutsideConvex()
RemoveRedundantVertices()
IsNull()[const]
IsClosed()[const]
IsConvex()[const]
EulerFormulaHolds()[const]
FacesAreNondegeneratePlanar(epsilon)[const]
ClipLineSegmentToConvexPolyhedron(...)[const]
NearestVertex(point)[const]
Contains(point)[const] (+7 overloads)
FaceContains(...)[const]
FaceContainmentDistance2D(...)[const]
ContainsConvex(point,epsilon)[const] (+2 overloads)
ClosestPoint(...)[const] (+2 overloads)
ClosestPointConvex(point)[const]
Distance(point)[const]
Intersects(lineSegment)[const] (+11 overloads)
IntersectsConvex(line)[const] (+2 overloads)
MergeConvex(point)
Translate(offset)
Transform(transform) (+3 overloads)
SetEquals(p2)
SwapVertices(i,j)
CanonicalizeFaceArray()
ContainsFace(face)[const]
FindClosestVertex(pt,outDistanceSq)[const]
Triangulate()[const]
ToString()[const]
ConvexHull(...)[static]
Tetrahedron(...)[static]
Octahedron(...)[static]
Hexahedron(...)[static]
Icosahedron(...)[static]
Dodecahedron(...)[static]

Polyhedron::FaceContainmentDistance2D

Syntax

float Polyhedron::FaceContainmentDistance2D(int faceIndex, const float4 &worldSpacePoint, float polygonThickness=1e-3f) const; [84 lines of code]

A helper for Contains() and FaceContains() tests: Returns a positive value if the given point is contained in the given face, and a negative value if the given point is outside the face.

The magnitude of the return value reports a pseudo-distance from the point to the nearest edge of the face polygon. This is used as a robustness/stability criterion to estimate how numerically believable the result is.