Package | away3d.materials.utils |
Class | public class HeightMapGenerator |
Inheritance | HeightMapGenerator flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
heightmap : BitmapData [read-only]
Returns the heightmap generated by the class
| HeightMapGenerator |
Method | Defined 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 |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched while the class is busy tracing. | HeightMapGenerator | |||
Dispatched full trace is done. | HeightMapGenerator |
heightmap | property |
heightmap:BitmapData
[read-only] Returns the heightmap generated by the class
public function get heightmap():BitmapData
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.
Parametersobject3d: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.
|
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
|
tracecomplete | Event |
away3d.events.TraceEvent
away3d.events.TraceEvent
Dispatched while the class is busy tracing. Note that the source can already be used for a Material
traceprogress | Event |
away3d.events.TraceEvent
away3d.events.TraceEvent
Dispatched full trace is done.