Class sandy.util.WrlParser

Description

Parsing *.WRL Files can handle several mesh definitions in the same file. They will be added to the same and unique object! IMPORTANT : .WRL files must NOT have indentation! Please choose the without indentation option before generation. IMPORTANT : The actual version of this parser doesn't handle the texture coordinates.

See Also

Field Index

INTERVAL, ITERATIONS_PER_INTERVAL, onFailEVENT, onInitEVENT, onLoadEVENT

Method Index

addEventListener(), export(), parse(), removeEventListener()

Field Detail

onInitEVENT

static public onInitEVENT:EventType
The OBject3D object is initialized

onLoadEVENT

static public onLoadEVENT:EventType
The load has started

onFailEVENT

static public onFailEVENT:EventType
The load has failed

INTERVAL

static public INTERVAL:Number
Interval of time between two calls to parsing method. A big value makes parsing slower but less CPU intensive.

ITERATIONS_PER_INTERVAL

static public ITERATIONS_PER_INTERVAL:Number
Number of lines parsed after a parsing method call. This is a good factor to change if you want to make your parser faster or less CPU intensive

Method Detail

addEventListener

static public function addEventListener(t:EventType, o):Void

Add a listener for a specific event.

Parameters

tEventType The type of event we want to register
oThe object listener

removeEventListener

static public function removeEventListener(e:EventType, oL):Void

Remove a listener for a specific event.

Parameters

eString The type of event we want to register
oLThe object listener

parse

static public function parse(o:Object3D, url:String, bReversed:Boolean):Void

Initialize the object passed in parameter (which should be new) with the datas stored in the ASE file given in second parameter

Parameters

oObject3D The Object3D we want to initialize
urlString The url of the .ASE file used to initialized the Object3D
bReversedBoolean [optionnal] If the file contains an object that face orientation is different from Sandy's one, you should set this value to true.

export

static public function export(url:String, bReversed:Boolean):Void

Parameters

urlString The url of the .ASE file used to initialized the Object3D