class ObjParser::Point
Attributes
current_binormal[RW]
current_normal[RW]
current_tangent[RW]
data[RW]
flag[RW]
normals[RW]
tangents[RW]
textures[RW]
Public Class Methods
new(point_data = [0, 0, 0])
click to toggle source
# File lib/obj_parser/point.rb, line 14 def initialize(point_data = [0, 0, 0]) self.data = point_data.map(&:to_f) self.textures = [] self.normals = [] self.tangents = [] end
Public Instance Methods
binormal()
click to toggle source
# File lib/obj_parser/point.rb, line 25 def binormal self.current_binormal ||= Point.new end
normal()
click to toggle source
# File lib/obj_parser/point.rb, line 29 def normal self.current_normal ||= Point.new end
tangent()
click to toggle source
# File lib/obj_parser/point.rb, line 21 def tangent self.current_tangent ||= Point.new end
u()
click to toggle source
# File lib/obj_parser/point.rb, line 37 def u; self.data[0]; end
v()
click to toggle source
# File lib/obj_parser/point.rb, line 38 def v; self.data[1]; end
x()
click to toggle source
# File lib/obj_parser/point.rb, line 33 def x; self.data[0]; end
y()
click to toggle source
# File lib/obj_parser/point.rb, line 34 def y; self.data[1]; end
z()
click to toggle source
# File lib/obj_parser/point.rb, line 35 def z; self.data[2]; end