Packagealternativa.engine3d.loaders
Classpublic class ParserCollada

Parses Collada file represented as XML.



Public Properties
 PropertyDefined by
  animations : Vector
List of animations.
ParserCollada
  hierarchy : Vector
List of root objects.
ParserCollada
  materials : Vector
List of materials.
ParserCollada
  objects : Vector
List of objects.
ParserCollada
  parents : Vector
List of objects parents.
ParserCollada
  textureMaterials : Vector
List of texture materials.
ParserCollada
Public Methods
 MethodDefined by
  
Creates a new instance.
ParserCollada
  
clean():void
Cleans all references to outer objects.
ParserCollada
  
Returns animation from the list of animations by object.
ParserCollada
  
Returns type of object using inside BSP-container.
ParserCollada
  
getObjectByName(name:String):Object3D
Returns object from the object list by name.
ParserCollada
  
getObjectLayer(object:Object3D):String
Returns object layer.
ParserCollada
  
parse(data:XML, baseURL:String = null):void
Parses xml Collada and fill lists: objects, parents, hierarchy, cameras, materials, textureMaterials, animations.
ParserCollada
  
[static]
ParserCollada
Public Constants
 ConstantDefined by
  SPLITTER : uint = 2
[static]
ParserCollada
  STATIC_GEOMETRY : uint = 1
[static]
ParserCollada
  STATIC_OBJECT : uint = 0
[static]
ParserCollada
Property detail
animationsproperty
public var animations:Vector

List of animations.

hierarchyproperty 
public var hierarchy:Vector

List of root objects.

materialsproperty 
public var materials:Vector

List of materials.

See also

objectsproperty 
public var objects:Vector

List of objects.

parentsproperty 
public var parents:Vector

List of objects parents.

See also

textureMaterialsproperty 
public var textureMaterials:Vector

List of texture materials. You can use MaterialLoader class to load texture materials.

See also

Constructor detail
ParserCollada()constructor
public function ParserCollada()

Creates a new instance.

Method detail
clean()method
public function clean():void

Cleans all references to outer objects.

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

Returns animation from the list of animations by object.

Parameters
object:Object

Returns
AnimationClip
getBspContainerChildType()method 
public function getBspContainerChildType(object:Object3D):uint

Returns type of object using inside BSP-container. The following values are acceptable: ParserCollada.STATIC_GEOMETRY, ParserCollada.STATIC_OBJECT, ParserCollada.SPLITTER.

Parameters
object:Object3DObject.

Returns
uintChild object type.
getObjectByName()method 
public function getObjectByName(name:String):Object3D

Returns object from the object list by name.

Parameters
name:String

Returns
Object3D
getObjectLayer()method 
public function getObjectLayer(object:Object3D):String

Returns object layer.

Parameters
object:Object3DObject.

Returns
StringLayer.
parse()method 
public function parse(data:XML, baseURL:String = null):void

Parses xml Collada and fill lists: objects, parents, hierarchy, cameras, materials, textureMaterials, animations.

Parameters
data:XMLCollada xml.
 
baseURL:String (default = null)Base URL to texture files. URL should correspond to URI specification. For example, file:///C:/test.dae or /C:/test.dae or test.dae or ./test.dae.

See also

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

Parameters
data:XML

Returns
AnimationClip
Constant detail
SPLITTERconstant
public static const SPLITTER:uint = 2
STATIC_GEOMETRYconstant 
public static const STATIC_GEOMETRY:uint = 1
STATIC_OBJECTconstant 
public static const STATIC_OBJECT:uint = 0