C4 Engine
C4 Engine API Documentation

Calc::SquaredDistanceLineToLine

Defined in:  C4Computation.h
Calculates the squared distance between two lines.
Prototype

float SquaredDistanceLineToLine(const Point3D& p1, const Vector3D& v1, const Point3D& p2, const Vector3D& v2);

Parameters
p1 The origin p1 of the first line.
v1 The direction v1 of the first line.
p2 The origin p2 of the second line.
v2 The direction v2 of the second line.
Description
The SquaredDistanceLineToLine function returns the squared distance of closest approach between the two lines defined by p1 + tv1 and p2 + tv2. If the lines are parallel, then the squared perpendicular distance between the lines is returned.
See Also

Calc::DistanceLineToLine

Calc::DistancePointToLine

Calc::SquaredDistancePointToLine