Class: OBJ::Mesh
- Inherits:
-
Object
- Object
- OBJ::Mesh
- Defined in:
- lib/obj.rb
Instance Attribute Summary collapse
-
#faces ⇒ Object
Returns the value of attribute faces.
-
#normals ⇒ Object
Returns the value of attribute normals.
-
#text_coords ⇒ Object
Returns the value of attribute text_coords.
-
#vertices ⇒ Object
Returns the value of attribute vertices.
Instance Method Summary collapse
-
#initialize(vertices: 0, normals: 0, text_coords: 0, faces: 0) ⇒ Mesh
constructor
A new instance of Mesh.
- #to_s ⇒ Object
Constructor Details
#initialize(vertices: 0, normals: 0, text_coords: 0, faces: 0) ⇒ Mesh
Returns a new instance of Mesh.
7 8 9 10 11 12 |
# File 'lib/obj.rb', line 7 def initialize(vertices: 0, normals: 0, text_coords: 0, faces: 0) @vertices = 0 @normals = 0 @text_coords = 0 @faces = 0 end |
Instance Attribute Details
#faces ⇒ Object
Returns the value of attribute faces.
5 6 7 |
# File 'lib/obj.rb', line 5 def faces @faces end |
#normals ⇒ Object
Returns the value of attribute normals.
5 6 7 |
# File 'lib/obj.rb', line 5 def normals @normals end |
#text_coords ⇒ Object
Returns the value of attribute text_coords.
5 6 7 |
# File 'lib/obj.rb', line 5 def text_coords @text_coords end |
#vertices ⇒ Object
Returns the value of attribute vertices.
5 6 7 |
# File 'lib/obj.rb', line 5 def vertices @vertices end |
Instance Method Details
#to_s ⇒ Object
14 15 16 17 |
# File 'lib/obj.rb', line 14 def to_s "<#{self.class} vertices: #{@vertices} normals: #{@normals}" \ " text_coords: #{@text_coords} faces: #{@faces}>" end |