Elevation mesh object


Inherited from: Mesh -> Entity -> ObjectContainer3D -> Object3D -> NamedAssetBase -> EventDispatcher.


Can be created with method new:

Lib.Away3D.Extrusions.Elevation.new(material, heightMap, width, height, depth, segmentsW, segmentsH, maxElevation, minElevation, smoothMap)

Creates elevation mesh,

material- MaterialBase. The Mesh (Elevation) material

heightMap - BitmapData. The height-map to generate the mesh from

width - Number. The width of the mesh. Default is 1000.

height - Number. The height of the mesh. Default is 100.

depth - Number. The depth of the mesh. Default is 1000.

segmentsW - Int. The subdivision of the mesh along the x axis. Default is 30.

segmentsH - Int. The subdivision of the mesh along the y axis. Default is 30.

maxElevation - Int. The maximum color value to be used. Allows canyon like elevations instead of mountainous. Default is 255.

minElevation - Int. The minimum color value to be used. Default is 0.

smoothMap - Boolean. If surface tracking is used, an internal smoothed version of the map is generated, prevents irregular height readings if original map is blowup or is having noise. Default is false.


Created Elevation object has properties:

depth

Number. The depth of the terrain plane.

height

Number. The height of the terrain plane.

maxElevation

Int. Locks elevation factor above this color reading level. Allows to build "canyon" like landscapes with no additional work on height-map source.

minElevation

Int. Locks elevation factor beneath this color reading level.

segmentsH

Int. The number of segments that make up the plane along the Y or Z-axis, depending on whether yUp is true or false, respectively. Defaults to 1.

smoothedHeightMap

Int. The number of segments that make up the plane along the Y or Z-axis, depending on whether yUp is true or false, respectively.

width

Number. The width of the terrain plane.


Has methods:

generateSmoothedHeightMap()

 BitmapData

Generates a smoother representation of the geometry using the original height-map and subdivision settings.


getHeightAt(x, z)

Reading the terrain height from a given x z position for surface tracking purposes 

x - Number

z - Number


Created with the Personal Edition of HelpNDoc: Full-featured Help generator