Back to class index
LineSegment[Class Summary]
a
b
ctor (+3 overloads)
GetPoint(d)[const]
CenterPoint()[const]
Reverse()
Dir()[const]
AnyPointFast()[const]
ExtremePoint(direction)[const] (+1 overload)
Translate(offset)
Transform(transform) (+3 overloads)
Length()[const]
LengthSq()[const]
IsFinite()[const]
Equals(...)[const]
BitEquals(other)[const]
Contains(...)[const] (+1 overload)
ClosestPoint(point)[const] (+10 overloads)
Distance(point)[const] (+13 overloads)
DistanceSq(point)[const] (+1 overload)
Intersects(plane)[const] (+12 overloads)
IntersectsDisc(disc)[const]
ToRay()[const]
ToLine()[const]
ProjectToAxis(...)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
FromString(str,outEndStr)[static] (+1 overload)

LineSegment::Contains

Syntax

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

Tests if the given point or line segment is contained on this line segment.

Parameters

floatdistanceThresholdBecause a line segment is an one-dimensional object in 3D space, an epsilon value is used as a threshold for this test. This effectively transforms this line segment to a capsule with the radius indicated by this value.

Return Value

True if this line segment contains the given point or line segment.

See Also

Intersects, ClosestPoint(), Distance().