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

DistanceLine2ToSegment2 Struct Reference
[XEngineMath Library]

List of all members.

Detailed Description

Returns the distance between the given 2D line and segment.

	The algorithm here works pretty much the same as when calculating
	the distance from a line to a ray. However we have to limit t to 
	the interval [0, 1].
	So now we have
		t = (-d2 * (q1 - p1) + d1 * (q2 - p2)) / (d2 * e1 - d1 * e2)
	for (d2 * e1 - d1 * e2) != 0 and t in [0, 1].
	


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