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

Syntax

LineSegment Ray::ToLineSegment(float d) const; [4 lines of code]

Converts this Ray to a LineSegment.

Parameters

floatdSpecifies the position of the other endpoint along this Ray. This parameter may be negative, in which case the returned LineSegment does not lie inside this Ray.

Return Value

A LineSegment with point a at pos, and point b at pos + d * dir.

See Also

pos, dir, Ray::Ray, class LineSegment, ToLine().