C4 Engine
C4 Engine API Documentation

Calc::DistanceLineToLine

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

float DistanceLineToLine(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 DistanceLineToLine function returns the distance of closest approach between the two lines defined by p1 + tv1 and p2 + tv2. If the lines are parallel, then the perpendicular distance between the lines is returned.
See Also

Calc::DistancePointToLine

Calc::SquaredDistanceLineToLine

Calc::SquaredDistancePointToLine