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.
maxElevation:Number
[read-write]Implementation
public function get maxElevation():Number
public function set maxElevation(value:Number):void
minElevation:Number
[read-write]Implementation
public function get minElevation():Number
public function set minElevation(value:Number):void
public function Elevation2AS3(classname:String, packagename:String = "", exportmap:Boolean = false)
Parameters
| classname:String — String, the name of the class that will be exported.
|
|
| packagename:String (default = " ") — [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 Parameters
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
|
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.
|
public function removeOnExportComplete(listener:Function):void
Default method for removing a complete event listener
Parameters
| listener:Function — The listener function
|