Back to class index
Ray[Class Summary]
pos
dir
ctor (+3 overloads)
GetPoint(distance)[const]
Transform(transform) (+3 overloads)
Contains(...)[const] (+1 overload)
Equals(otherRay,epsilon)[const]
Distance(point,d)[const] (+9 overloads)
ClosestPoint(targetPoint,d)[const] (+3 overloads)
Intersects(...)[const] (+13 overloads)
IntersectsDisc(disc)[const]
ToLine()[const]
ToLineSegment(d)[const]

Ray::ToLine

Syntax

Line Ray::ToLine() const; [4 lines of code]

Converts this Ray to a Line.

The pos and dir members of the returned Line will be equal to this Ray. The only difference is that a Line extends to infinity in two directions, whereas the Ray spans only in the positive direction.

Performance

4.105nsecs/call ≈ 243.59M calls/second ≈ 4.06M calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

See Also

dir, Ray::Ray, class Line, ToLineSegment().

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index