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

DistanceRayToSegment Struct Template Reference
[XEngineMath Library]

List of all members.

Detailed Description

template<unsigned int Dimension>
struct XEngine::Math::DistanceAlgorithms::DistanceRayToSegment< Dimension >

Returns the distance between the given ray and the given segment.

	The used algorithm is very similar to the segment-to-segment algorithm.
	with the difference that there are not as many regions to examine.
	The following graph shows the possible regions. Region 0 is where s >= 0 and t
	is in [0, 1] and that is the region where we have to find the minimum
	distance of the two segments.

	       t

	   2   |   1
	---------------
	   3   |   0
	--------------- s
	       | 
	   4   |   5  
	       |    
	


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