Class: MD2::Triangle
- Inherits:
-
Object
- Object
- MD2::Triangle
- Defined in:
- lib/md2/triangle.rb
Instance Attribute Summary collapse
-
#texcoord_indices ⇒ Object
readonly
Returns the value of attribute texcoord_indices.
-
#vertex_indices ⇒ Object
readonly
Returns the value of attribute vertex_indices.
Instance Method Summary collapse
-
#initialize(data) ⇒ Triangle
constructor
A new instance of Triangle.
Constructor Details
#initialize(data) ⇒ Triangle
Returns a new instance of Triangle.
4 5 6 7 8 |
# File 'lib/md2/triangle.rb', line 4 def initialize(data) data = data.unpack("s6") @vertex_indices = [data[0], data[1], data[2]] @texcoord_indices = [data[3], data[4], data[5]] end |
Instance Attribute Details
#texcoord_indices ⇒ Object (readonly)
Returns the value of attribute texcoord_indices.
2 3 4 |
# File 'lib/md2/triangle.rb', line 2 def texcoord_indices @texcoord_indices end |
#vertex_indices ⇒ Object (readonly)
Returns the value of attribute vertex_indices.
2 3 4 |
# File 'lib/md2/triangle.rb', line 2 def vertex_indices @vertex_indices end |