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

Syntax

bool Line::Contains(const float4 &point, float distanceThreshold=1e-3f) const; [4 lines of code]
bool Line::Contains(const Ray &ray, float distanceThreshold=1e-3f) const; [4 lines of code]
bool Line::Contains(const LineSegment &lineSegment, float distanceThreshold=1e-3f) const; [4 lines of code]

Tests if the given object is fully contained on this line.

Parameters

floatdistanceThresholdThe magnitude of the epsilon test threshold to use. Since a Line is a 1D object in a 3D space, an epsilon threshold is used to allow errors caused by floating-point inaccuracies.

Return Value

True if this line contains the given object, up to the given distance threshold.

See Also

class LineSegment, class Ray, Distance(), ClosestPoint(), Intersects().