class Geom3d::Ray
Attributes
dir[R]
start[R]
Public Class Methods
new(start, dir)
click to toggle source
# File lib/geom3d/ray.rb, line 8 def initialize start, dir @start = Point.new(start) @dir = Vector.new(dir).norm end
Public Instance Methods
pos(t)
click to toggle source
# File lib/geom3d/ray.rb, line 13 def pos t @start + t * @dir end
to_s()
click to toggle source
# File lib/geom3d/ray.rb, line 17 def to_s "Ray(#{@start.to_s},#{@dir.to_s}" end