Class: Collada::Parser::Geometry::Mesh::PolygonVertices

Inherits:
Object
  • Object
show all
Defined in:
lib/collada/parser/scene.rb

Class Method Summary collapse

Instance Method Summary collapse

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