Packagealternativa.engine3d.loaders
Classpublic class ParserCollada
InheritanceParserCollada Inheritance Parser Inheritance Object

A parser performs parsing of collada xml.



Public Properties
 PropertyDefined By
 Inheritedanimations : Vector.<AnimationClip>
Array of animations.
Parser
 Inheritedhierarchy : Vector.<Object3D>
List of root objects.
Parser
  lights : Vector.<Light3D>
List of the light sources
ParserCollada
 Inheritedmaterials : Vector.<ParserMaterial>
List of all materials assigned to objects, that are got after parsing.
Parser
 Inheritedobjects : Vector.<Object3D>
List of objects, that are got after parsing.
Parser
Public Methods
 MethodDefined By
  
Creates a new ParserCollada instance.
ParserCollada
  
clean():void
[override] Clears all links to external objects.
ParserCollada
  
Returns animation from animations array by object, to which it refers.
ParserCollada
 Inherited
getLayerByObject(object:Object3D):String
Returns name of layer for specified object.
Parser
 Inherited
Returns object from array objects by name.
Parser
  
parse(data:XML, baseURL:String = null, trimPaths:Boolean = false):void
Method parses xml of collada and fills arrays objects, hierarchy, materials, animations If you need to download textures, use class TexturesLoader.
ParserCollada
  
[static] Parses and returns animation.
ParserCollada
Protected Methods
 MethodDefined By
 Inherited
complete(a3d:Object):void
Parser
Property Detail
lightsproperty
public var lights:Vector.<Light3D>

List of the light sources

Constructor Detail
ParserCollada()Constructor
public function ParserCollada()

Creates a new ParserCollada instance.

Method Detail
clean()method
override public function clean():void

Clears all links to external objects.

getAnimationByObject()method 
public function getAnimationByObject(object:Object):AnimationClip

Returns animation from animations array by object, to which it refers.

Parameters

object:Object

Returns
AnimationClip
parse()method 
public function parse(data:XML, baseURL:String = null, trimPaths:Boolean = false):void

Method parses xml of collada and fills arrays objects, hierarchy, materials, animations If you need to download textures, use class TexturesLoader.

Path to collada file should match with URI specification. E.g., file:///C:/test.dae or /C:/test.dae for the full paths and test.dae, ./test.dae in case of relative.

Parameters

data:XMLXML data type of collada.
 
baseURL:String (default = null) — Path to textures relative to swf-file (Or file name only in case of trimPaths=true).
 
trimPaths:Boolean (default = false) — Use file names only, without paths.

See also

parseAnimation()method 
public static function parseAnimation(data:XML):AnimationClip

Parses and returns animation.

Parameters

data:XML

Returns
AnimationClip