|
HeightMapSurfaceNode Class |
HeightMapSurfaceNode class is used to render the surface of a height map.
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.SceneNodesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public class HeightMapSurfaceNode : ModelNode
The HeightMapSurfaceNode type exposes the following members.
Constructors Properties | Name | Description |
---|
| CenterPosition |
Center position of the height map surface
Default value is (0, 0, 0).
|
| HeightData |
2D array defining the height data. The dimensions of array also determine the size of the mesh (scaled by
the X and Z components of the Size property). If no height data is provided, a flat surface (a plane) is
generated.
Default value is null (no height data available).
|
| HeightDataMaxValue |
Gets the maximum value from the HeightData array.
|
| HeightDataMinValue |
Gets the minimum value from the HeightData array.
|
| MaxTextureHeight |
Used to define custom height range for texture coordinates. Applicable only if UseHeightValuesAsTextureCoordinates
is set to true.
Default value is Single.NaN (disabled).
|
| MinTextureHeight |
Used to define custom height range for texture coordinates. Applicable only if UseHeightValuesAsTextureCoordinates
is set to true.
Default value is Single.NaN (disabled).
|
| Size |
Size of the surface. X and Z components scale the 2D shape's width and height, while Y component scales the
height values.
Default value is (1, 1, 1)
|
| UseHeightValuesAsTextureCoordinates |
Use height values to generate texture coordinates. If disabled, texture coordinates are generated so that
the texture is aligned with the dimensions of the surface. If enabled, texture coordinates are based on
height value, which is useful for gradient-based textures.
Default value is false.
|
TopMethods | Name | Description |
---|
| CreateHeightDataFromImageData |
CreateHeightDataFromImageData method creates a two dimensional array from the specified imageData that can be used for the HeightData property.
The supported image formats are R8G8B8A8Unorm, B8G8R8A8Unorm (32 bit where height value is average value of red, green and blue color values) and R8Unorm (8 bit grayscale).
|
| CreateHeightMapSurfaceMesh | |
| OnUpdate | (Overrides ModelNodeOnUpdate) |
| UpdateMesh |
UpdateMesh method recreates the mesh based on the current object properties.
The method should be overriden in the derived class that provides its own mesh generation.
(Overrides ModelNodeUpdateMesh) |
TopSee Also