class Elevation
package away3d.extrusions
extends Mesh › Entity › ObjectContainer3D › Object3D › NamedAssetBase
Available on all platforms
Class Elevation generates (and becomes) a mesh from an heightmap.
Constructor
new(material:MaterialBase, heightMap:BitmapData, width:Float = 1000, height:Float = 100, depth:Float = 1000, segmentsW:Int = 30, segmentsH:Int = 30, maxElevation:Int = 255, minElevation:Int = 0, smoothMap:Bool = false)
Parameters:
material | MaterialBase. The Mesh (Elevation) material |
|---|---|
heightMap | BitmapData. The heightmap to generate the mesh from |
width | [optional] Number. The width of the mesh. Default is 1000. |
height | [optional] Number. The height of the mesh. Default is 100. |
depth | [optional] Number. The depth of the mesh. Default is 1000. |
segmentsW | [optional] uint. The subdivision of the mesh along the x axis. Default is 30. |
segmentsH | [optional] uint. The subdivision of the mesh along the y axis. Default is 30. |
maxElevation | [optional] uint. The maximum color value to be used. Allows canyon like elevations instead of mountainious. Default is 255. |
minElevation | [optional] uint. The minimum color value to be used. Default is 0. |
smoothMap | [optional] Boolean. If surface tracking is used, an internal smoothed version of the map is generated, prevents irregular height readings if original map is blowed up or is having noise. Default is false. |
Variables
Methods
generateSmoothedHeightMap():BitmapData
Generates a smoother representation of the geometry using the original heightmap and subdivision settings. Allows smoother readings for surface tracking if original heightmap has noise, causing choppy camera movement.
See also:
away3d.extrusions.Elevation.getHeightAt
getHeightAt(x:Float, z:Float):Float
Reading the terrain height from a given x z position for surface tracking purposes
See also:
away3d.extrusions.Elevation.smoothHeightMap