Class: Collada::Parser::VisualScene::ControllerInstance

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

Instance Attribute Summary collapse

Attributes inherited from Reference

#kind, #url

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Reference

#id, #lookup, #to_s

Constructor Details

#initialize(url, skeleton) ⇒ ControllerInstance

Returns a new instance of ControllerInstance.



48
49
50
51
52
53
# File 'lib/collada/parser/visual_scene.rb', line 48

def initialize(url, skeleton)
	super :controllers, url
	
	# This references the node for the skeleton:
	@skeleton = skeleton
end

Instance Attribute Details

#skeletonObject (readonly)

Returns the value of attribute skeleton.



55
56
57
# File 'lib/collada/parser/visual_scene.rb', line 55

def skeleton
  @skeleton
end

Class Method Details

.parse(doc, element) ⇒ Object



57
58
59
60
61
# File 'lib/collada/parser/visual_scene.rb', line 57

def self.parse(doc, element)
	skeleton = NodeReference.new(element.elements['skeleton'].text)
	
	self.new(element.attributes['url'], skeleton)
end