Back to class index
Line[Class Summary]
pos
dir
ctor (+3 overloads)
IsFinite()[const]
GetPoint(distance)[const]
Translate(offset)
Transform(transform) (+3 overloads)
Contains(...)[const] (+2 overloads)
Equals(line,epsilon)[const]
BitEquals(other)[const]
Distance(point)[const] (+12 overloads)
ClosestPoint(targetPoint)[const] (+13 overloads)
Intersects(...)[const] (+10 overloads)
IntersectsDisc(disc)[const]
ToRay()[const]
ToLineSegment(d)[const] (+1 overload)
ProjectToAxis(...)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
AreCollinear(p1,p2,p3,epsilon)[static]
ClosestPointLineLine(...)[static]
FromString(str,outEndStr)[static] (+1 overload)

Line::Distance

Syntax

float Line::Distance(const float4 &point) const; [1 line of code]
float Line::Distance(const float4 &point, float &d) const; [4 lines of code]
float Line::Distance(const Ray &other) const; [1 lines of code]
float Line::Distance(const Ray &other, float &d) const; [1 lines of code]
float Line::Distance(const Ray &other, float &d, float &d2) const; [5 lines of code]
float Line::Distance(const Line &other) const; [1 lines of code]
float Line::Distance(const Line &other, float &d) const; [1 lines of code]
float Line::Distance(const Line &other, float &d, float &d2) const; [5 lines of code]
float Line::Distance(const LineSegment &other) const; [1 lines of code]
float Line::Distance(const LineSegment &other, float &d) const; [1 lines of code]
float Line::Distance(const LineSegment &other, float &d, float &d2) const; [7 lines of code]
float Line::Distance(const Sphere &other) const; [4 lines of code]
float Line::Distance(const Capsule &other) const; [4 lines of code]

Computes the distance between this line and the given object.

This function finds the nearest pair of points on this and the given object, and computes their distance. If the two objects intersect, or one object is contained inside the other, the returned distance is zero.

See Also

Contains(), Intersects(), ClosestPoint(), GetPoint().