Class: Collada::Parser::Geometry::Mesh::PolygonVertices
- Inherits:
-
Object
- Object
- Collada::Parser::Geometry::Mesh::PolygonVertices
- Defined in:
- lib/collada/parser/scene.rb
Class Method Summary collapse
Instance Method Summary collapse
- #count(index) ⇒ Object
-
#initialize(counts) ⇒ PolygonVertices
constructor
A new instance of PolygonVertices.
Constructor Details
#initialize(counts) ⇒ PolygonVertices
Returns a new instance of PolygonVertices.
77 78 79 |
# File 'lib/collada/parser/scene.rb', line 77 def initialize(counts) @counts = counts end |
Class Method Details
.parse(doc, element) ⇒ Object
85 86 87 88 89 |
# File 'lib/collada/parser/scene.rb', line 85 def self.parse(doc, element) counts = element.elements('vcount').text.strip.split(/\s+/).collect &:to_i self.new(counts) end |
Instance Method Details
#count(index) ⇒ Object
81 82 83 |
# File 'lib/collada/parser/scene.rb', line 81 def count(index) @counts[index] end |