Packageaway3d.materials.utils
Classpublic class HeightMapGenerator
InheritanceHeightMapGenerator Inheritance flash.events.EventDispatcher

Dispatched full trace is done.



Public Properties
 PropertyDefined By
  heightmap : BitmapData
[read-only] Returns the heightmap generated by the class
HeightMapGenerator
Public Methods
 MethodDefined By
  
HeightMapGenerator(object3d:Object3D, width:int = 512, height:int = 512, useVertex:Boolean = true, blur:int = 0, growpixels:Boolean = false, maxfaces:int = 50)
Class HeightMapGenerator generates a heightmap from a given Object3D.
HeightMapGenerator
  
addOnTraceComplete(listener:Function):void
Default method for adding a tracecomplete event listener
HeightMapGenerator
  
addOnTraceProgress(listener:Function):void
Default method for adding a traceprogress event listener
HeightMapGenerator
  
removeOnTraceComplete(listener:Function):void
Default method for removing a tracecomplete event listener
HeightMapGenerator
  
removeOnTraceProgress(listener:Function):void
Default method for removing a traceprogress event listener
HeightMapGenerator
Events
 Event Summary Defined By
  Dispatched while the class is busy tracing.HeightMapGenerator
  Dispatched full trace is done.HeightMapGenerator
Property Detail
heightmapproperty
heightmap:BitmapData  [read-only]

Returns the heightmap generated by the class


Implementation
    public function get heightmap():BitmapData
Constructor Detail
HeightMapGenerator()Constructor
public function HeightMapGenerator(object3d:Object3D, width:int = 512, height:int = 512, useVertex:Boolean = true, blur:int = 0, growpixels:Boolean = false, maxfaces:int = 50)

Class HeightMapGenerator generates a heightmap from a given Object3D.

Parameters
object3d:Object3D — Object3D. The Object3D to be traced. Can be of type Mesh or type ObjectContainer3D.
 
width:int (default = 512) — [optional] int. The width of the generated heightmap. Default is 512.
 
height:int (default = 512) — [optional] Boolean. The heightmap respects the uv or the vertexes of the mesh. Default is true.
 
useVertex:Boolean (default = true) — [optional] Boolean. To avoid some artefacts cause by the pixel trace. adds pixels at the edges of the trace.
 
blur:int (default = 0) — [optional] int. Blur value if applyed, the surface of the object becomes smoother. Default is 0;
 
growpixels:Boolean (default = false) — [optional] Boolean. To avoid some artefacts cause by the pixel trace. adds pixels at the edges of the trace. Default is false.
 
maxfaces:int (default = 50) — [optional] int. To avoid that the player generates a timout error, the class handles the trace of faces stepwize. Default is 50 faces.
####INIT####
Method Detail
addOnTraceComplete()method
public function addOnTraceComplete(listener:Function):void

Default method for adding a tracecomplete event listener

Parameters

listener:Function — The listener function

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

Default method for adding a traceprogress event listener

Parameters

listener:Function — The listener function

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

Default method for removing a tracecomplete event listener

Parameters

listener:Function — The listener function

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

Default method for removing a traceprogress event listener

Parameters

listener:Function — The listener function

Event Detail
tracecomplete Event
Event Object Type: away3d.events.TraceEvent
TraceEvent.type property = away3d.events.TraceEvent

Dispatched while the class is busy tracing. Note that the source can already be used for a Material

traceprogress Event  
Event Object Type: away3d.events.TraceEvent
TraceEvent.type property = away3d.events.TraceEvent

Dispatched full trace is done.