Package | away3d.modifiers |
Class | public class HeightMapModifier |
Property | Defined 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 |
Method | Defined 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 | ||
refreshNormals():void
| HeightMapModifier | ||
refreshPositions():void
Apply the actual displacement and sets it as new base for further displacements.
| HeightMapModifier | ||
reset():void
Resets the verticies to their original values
| HeightMapModifier |
channel | property |
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.
public function get channel():uint
public function set channel(value:uint):void
See also
heightMap | property |
heightMap:BitmapData
[read-write]
The BitmapData
object to be used as the height map of the modifier.
public function get heightMap():BitmapData
public function set heightMap(value:BitmapData):void
maxLevel | property |
maxLevel:uint
[read-write]Implementation
public function get maxLevel():uint
public function set maxLevel(value:uint):void
mesh | property |
mesh:Mesh
[read-write]
The Mesh
object to be modified.
public function get mesh():Mesh
public function set mesh(value:Mesh):void
offset | property |
public var offset:Number
The offset addded to the height values of the height map. Defaults to 0.
scale | property |
public var scale:Number
The scale multiplier applied to the height values of the height map. Defaults to 1.
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 )
|
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