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::ClosestPoint

Syntax

float4 Line::ClosestPoint(const float4 &targetPoint) const; [1 line of code]
float4 Line::ClosestPoint(const float4 &targetPoint, float &d) const; [5 lines of code]
float4 Line::ClosestPoint(const Ray &other) const; [1 lines of code]
float4 Line::ClosestPoint(const Ray &other, float &d) const; [1 lines of code]
float4 Line::ClosestPoint(const Ray &other, float &d, float &d2) const; [11 lines of code]
float4 Line::ClosestPoint(const Line &other) const; [1 lines of code]
float4 Line::ClosestPoint(const Line &other, float &d) const; [1 lines of code]
float4 Line::ClosestPoint(const Line &other, float &d, float &d2) const; [5 lines of code]
float4 Line::ClosestPoint(const LineSegment &other) const; [1 lines of code]
float4 Line::ClosestPoint(const LineSegment &other, float &d) const; [1 lines of code]
float4 Line::ClosestPoint(const LineSegment &other, float &d, float &d2) const; [16 lines of code]
float4 Line::ClosestPoint(const Triangle &triangle) const; [1 lines of code]
float4 Line::ClosestPoint(const Triangle &triangle, float &d) const; [5 lines of code]
float4 Line::ClosestPoint(const Triangle &triangle, float &d, float2 &outBarycentricUV) const; [6 lines of code]

Computes the closest point on this line to the given object.

If the other object intersects this line, this function will return an arbitrary point inside the region of intersection.

See Also

Contains(), Distance(), Intersects(), GetPoint().