Class: Vertexes
- Inherits:
-
DecodedLump
- Object
- Lump
- DecodedLump
- Vertexes
- Defined in:
- lib/ruby-doom.rb
Constant Summary collapse
- BYTES_EACH =
4
- NAME =
"VERTEXES"
Instance Attribute Summary
Attributes inherited from DecodedLump
Attributes inherited from Lump
Instance Method Summary collapse
-
#initialize ⇒ Vertexes
constructor
A new instance of Vertexes.
- #read(bytes) ⇒ Object
- #size ⇒ Object
Methods inherited from DecodedLump
Constructor Details
Instance Method Details
#read(bytes) ⇒ Object
441 442 443 444 445 446 447 |
# File 'lib/ruby-doom.rb', line 441 def read(bytes) (bytes.size / BYTES_EACH).times {|index| v = Vertex.new v.read(bytes.slice(index*BYTES_EACH, BYTES_EACH)) @items << v } end |
#size ⇒ Object
448 449 450 |
# File 'lib/ruby-doom.rb', line 448 def size @items.size * BYTES_EACH end |