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
Defines a maximum level of influence. | 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
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
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
Defines a maximum level of influence. Values required are 0 to 1. If above or equal that level the influence is not applyed.
public function get maxLevel():uint
public function set maxLevel(value:uint):void
mesh | property |
mesh:Mesh
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)
Creates a new HeightMapModifier
object. Modifies the position of vertices in a mesh along their normal vectors, using the height map imformation stored in a bitmap texture.
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