Back to class index
Ray[Class Summary]
pos
dir
ctor (+3 overloads)
IsFinite()[const]
GetPoint(distance)[const]
Translate(offset)
Transform(transform) (+3 overloads)
Contains(...)[const] (+1 overload)
Equals(otherRay,epsilon)[const]
BitEquals(other)[const]
Distance(point)[const] (+12 overloads)
ClosestPoint(targetPoint)[const] (+10 overloads)
Intersects(...)[const] (+13 overloads)
IntersectsDisc(disc)[const]
ToLine()[const]
ToLineSegment(d)[const]
ProjectToAxis(...)[const]
ToLineSegment(dStart,dEnd)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
FromString(str,outEndStr)[static] (+1 overload)

Ray::Contains

Syntax

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

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

Parameters

floatdistanceThresholdThe magnitude of the epsilon test threshold to use. Since a Ray 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 ray contains the given object, up to the given distance threshold.

See Also

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