Packageaway3d.exporters
Classpublic class Elevation2AS3
InheritanceElevation2AS3 Inheritance flash.events.EventDispatcher

Class Elevation2AS3 generates a string class of the elevation to pass to the SkinClass and ElevationReader in order to save space and processing time. This class is recommended above other AS3 exporters in case or surface tracking.



Public Properties
 PropertyDefined By
  maxElevation : Number
Locks elevation factor above this level.
Elevation2AS3
  minElevation : Number
Locks elevation factor beneath this level.
Elevation2AS3
Public Methods
 MethodDefined By
  
Elevation2AS3(classname:String, packagename:String, exportmap:Boolean = false)
Creates a generate an as3 file of the elevation array.
Elevation2AS3
  
addOnExportComplete(listener:Function):void
Default method for adding a complete event listener The event.data holds the generated string from the wavefront class
Elevation2AS3
  
export(sourceBmd:BitmapData, channel:String = r, subdivisionX:int = 10, subdivisionY:int = 10, factorX:Number = 1, factorY:Number = 1, elevate:Number = .5):void
Generate the string representing the mesh and optionally color information for the reader.
Elevation2AS3
  
removeOnExportComplete(listener:Function):void
Default method for removing a complete event listener
Elevation2AS3
Property Detail
maxElevationproperty
maxElevation:Number

Locks elevation factor above this level. Default is 255;


Implementation
    public function get maxElevation():Number
    public function set maxElevation(value:Number):void
minElevationproperty 
minElevation:Number

Locks elevation factor beneath this level. Default is 0;


Implementation
    public function get minElevation():Number
    public function set minElevation(value:Number):void
Constructor Detail
Elevation2AS3()Constructor
public function Elevation2AS3(classname:String, packagename:String, exportmap:Boolean = false)

Creates a generate an as3 file of the elevation array.

Parameters
classname:String — String, the name of the class that will be exported.
 
packagename:String — [optional] String. the name of the package that will be exported.
 
exportmap:Boolean (default = false) — [optional] Boolean. Defines if the class should generate an array to pass to the ElevationReader.
####INIT####
Method Detail
addOnExportComplete()method
public function addOnExportComplete(listener:Function):void

Default method for adding a complete event listener The event.data holds the generated string from the wavefront class

Parameters

listener:Function — The listener function

export()method 
public function export(sourceBmd:BitmapData, channel:String = r, subdivisionX:int = 10, subdivisionY:int = 10, factorX:Number = 1, factorY:Number = 1, elevate:Number = .5):void

Generate the string representing the mesh and optionally color information for the reader.

Parameters

sourceBmd:BitmapData — Bitmapdata. The bitmapData to read from.
 
channel:String (default = r) — [optional] String. The channel information to read. supported "a", alpha, "r", red, "g", green, "b", blue and "av" (averages and luminance). Default is red channel "r".
 
subdivisionX:int (default = 10) — [optional] int. The subdivision to read the pixels along the x axis. Default is 10.
 
subdivisionY:int (default = 10) — [optional] int. The subdivision to read the pixels along the y axis. Default is 10.
 
factorX:Number (default = 1) — [optional] Number. The scale multiplier along the x axis. Default is 1.
 
factorY:Number (default = 1) — [optional] Number. The scale multiplier along the y axis. Default is 1.
 
elevate:Number (default = .5) — [optional] Number. The scale multiplier along the z axis. Default is .5.

removeOnExportComplete()method 
public function removeOnExportComplete(listener:Function):void

Default method for removing a complete event listener

Parameters

listener:Function — The listener function