float GetHeight (float x, float y)
Get an interpolated height at a point x,y.
float GetSteepness (float x, float y)
Get the gradient of the terrain at point (x,y).
float[,] GetHeights ()
Returns a two dimensional array of heightmap samples. The samples are represented as float values ranging from 0 to 1. The array has the dimensions [height,width] and is indexed as [y,x].
void SetHeights (float[,] data)
Sets heightmap data using a two dimensional array of heightmap samples. The samples are represented as float values ranging from 0 to 1. The heights array is indexed as [y,x].
void SetHeight (int x, int y, float value)
Set value to height of [x,y]
SVector GetNormal (float x, float y)
Get an interpolated normal at a given location.
SVector GetSlope (float x, float y)
Get a normalized and interpolated normal at a given location.
SVector GetContour (float x, float y)
Get a contour of interpolated normal at a given location.
bool Enabled get
set
Is the Terrain component enabled?
SGameObject GameObject get
The GameObject that this Terrain component is added to.
Function Name |
---|
Property Name |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
float GetHeight (float x, float y)
float GetSteepness (float x, float y)
float[,] GetHeights ()
void SetHeights (float[,] data)
void SetHeight (int x, int y, float value)
SVector GetNormal (float x, float y)
SVector GetSlope (float x, float y)
SVector GetContour (float x, float y)
bool Enabled get
set
SGameObject GameObject get