Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | Namespace Members | Class Members | Related Pages

DistanceTriangleToSphere Struct Reference
[XEngineMath Library]

List of all members.

Detailed Description

Returns the distance of the given triangle to the given sphere.

	Given a sphere |X - C|^2 = r^2 we want to find the minimum distance of 
	the sphere to the triangle X = P + s * E0 + t * E1 with s, t in [0, 1] 
	and s + t <= 1.
	The minimum distance point occurs either inside the triangle or on
	one of the three line segments that define the triangle's edges.
	Therefore, we simply have to compute the minimum distances to the
	triangle plane and the three triangle edges and use the minimum of
	these distances as the minimum distance between the triangle and the
	sphere.
	


The documentation for this struct was generated from the following files: