Click or drag to resize
AB4D logo

HeightMapMesh3D Class

HeightMapMesh3D class is used to create MeshGeometry3D that represents a 3D height map. The y value (height) of each 3D position is calculated with the following: yPos = centerPosition.Y + heightDataValue * size.Y. This means that centerPosition.Y value defines the Y value of the 0 data value. size.Y value defines the scale factor for all data values.
Inheritance Hierarchy
SystemObject
  Ab3d.MeshesHeightMapMesh3D

Namespace: Ab3d.Meshes
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public class HeightMapMesh3D : IMesh3D

The HeightMapMesh3D type exposes the following members.

Constructors
 NameDescription
Public methodHeightMapMesh3D Constructor
Top
Properties
 NameDescription
Public propertyGeometry Gets the MeshGeometry3D that represents a 3D plane.
Top
Methods
 NameDescription
Public methodStatic memberCreateGradientTexture CreateGradientTexture returns a a one dimensional texture textureWidth x 1 pixel) created from the specified gradient.
Public methodStatic memberCreateHeightTexture(Double, UInt32) Returns a bitmap that represent a two dimensional texture created from the height data and specified array of colors (as uint).
Public methodStatic memberCreateHeightTexture(Double, LinearGradientBrush) Returns a bitmap that represent a two dimensional texture created from the height data and specified gradient.
Public methodStatic memberCreateHeightTexture(Double, Double, Double, UInt32) Returns a bitmap that represent a two dimensional texture created from the height data and specified array of colors (as uint).
Public methodStatic memberCreateHeightTexture(Double, Double, Double, LinearGradientBrush) Returns a bitmap that represent a two dimensional texture created from the height data and specified gradient.
Public methodStatic memberGetDataMinAndMaxValue GetDataMinAndMaxValue method sets the minValue and maxValue from all the values in the data array.
Public methodStatic memberGetGradientColorsArray Returns an array array of Color values from the specified gradient (as LinearGradientBrush) and with array count (number of elements in array).
Public methodStatic memberGetGradientColorsUIntArray Returns an array array of uint values that represent colors. The array is created from the specified gradient (as LinearGradientBrush) and with array count (number of elements in array).
Public methodGetWireframePositions Returns a list of Point3D that represent the positions that can be used to create multi-line to show wireframe.
Public methodSetCustomMinMaxValues Sets custom min and max values that can be used when setting texture coordinates based on height values (when useHeightValuesAsTextureCoordinates is true). If this method is not called, then the min and max values for the actual data are used.
Public methodUpdateHeight Updates the height map with the new height data. The dimensions of the new height data array must be the same as the array used in the constructor.
Top
See Also