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

DistanceRectangleToRectangle Struct Template Reference
[XEngineMath Library]

List of all members.

Detailed Description

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

Returns the distance between the two given rectangles.

	Given two rectangles we can get the minimum squared distance by minimizing
	the function
		Q(s0, t0, s1, t1) = |R0(s0, t0) - R1(s1, t1)|^2 
	with s0, t0, s1 and t1 in [0, 1].
	Since we already have a segment-to-rectangle distance algorithm we can
	simply use that one and get the minimum distance from each edge of the 
	first rectangle to the second rectangle and vice versa.
	


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