Packageaway3d.modifiers
Classpublic class HeightMapModifier

Public Properties
 PropertyDefined by
  channel : uint
The channel used to extract the height values from the height map.
HeightMapModifier
  heightMap : BitmapData
The BitmapData object to be used as the height map of the modifier.
HeightMapModifier
  maxLevel : uint
HeightMapModifier
  mesh : Mesh
The Mesh object to be modified.
HeightMapModifier
  offset : Number
The offset addded to the height values of the height map.
HeightMapModifier
  scale : Number
The scale multiplier applied to the height values of the height map.
HeightMapModifier
Public Methods
 MethodDefined by
  
HeightMapModifier
(mesh:Mesh = null, heightMap:BitmapData = null, channel:uint = 1, maxLevel:uint = 255, scale:Number = 1, offset:Number = 0)
Creates a new HeightMapModifier object.
HeightMapModifier
  
execute():void
Updates the position of vertices in the mesh with the color value found at the uv's coordinates multiplied by a scale factor along the normal vector.
HeightMapModifier
  
HeightMapModifier
  
Apply the actual displacement and sets it as new base for further displacements.
HeightMapModifier
  
reset():void
Resets the verticies to their original values
HeightMapModifier
Property detail
channelproperty
channel:uint  [read-write]

The channel used to extract the height values from the height map. Takes the static values available in the HeightMapDataChannel class. Defaults to RED.

Implementation
    public function get channel():uint
    public function set channel(value:uint):void

See also

heightMapproperty 
heightMap:BitmapData  [read-write]

The BitmapData object to be used as the height map of the modifier.

Implementation
    public function get heightMap():BitmapData
    public function set heightMap(value:BitmapData):void
maxLevelproperty 
maxLevel:uint  [read-write]Implementation
    public function get maxLevel():uint
    public function set maxLevel(value:uint):void
meshproperty 
mesh:Mesh  [read-write]

The Mesh object to be modified.

Implementation
    public function get mesh():Mesh
    public function set mesh(value:Mesh):void
offsetproperty 
public var offset:Number

The offset addded to the height values of the height map. Defaults to 0.

scaleproperty 
public var scale:Number

The scale multiplier applied to the height values of the height map. Defaults to 1.

Constructor detail
HeightMapModifier()constructor
public function HeightMapModifier(mesh:Mesh = null, heightMap:BitmapData = null, channel:uint = 1, maxLevel:uint = 255, scale:Number = 1, offset:Number = 0)Parameters
mesh:Mesh (default = null) — [optional] The Mesh object to be modified.
 
heightMap:BitmapData (default = null) — [optional] The BitmapData object to be used as the height map of the modifier.
 
channel:uint (default = 1)
 
maxLevel:uint (default = 255)
 
scale:Number (default = 1)
 
offset:Number (default = 0)
Init Parameters
Method detail
execute()method
public function execute():void

Updates the position of vertices in the mesh with the color value found at the uv's coordinates multiplied by a scale factor along the normal vector.

See also

refreshNormals()method 
public function refreshNormals():void
refreshPositions()method 
public function refreshPositions():void

Apply the actual displacement and sets it as new base for further displacements.

reset()method 
public function reset():void

Resets the verticies to their original values

Wiki link
Click to go to the wiki page for 'away3d.modifiers.HeightMapModifier'

Code examples

Comments