Terrain

More...

Classes:

class

A strip shaped decal defined by spine nodes which clips against Terrain objects.

class

An infinite plane extending in all direction.

class

A strip of rectangular mesh segments defined by a 3D spline for prototyping road-shaped objects in your scene.

class

Represent a terrain object in a Torque 3D level.

Variables

bool

Triggers debug rendering of terrain cells.

float

A global detail scale used to tweak the material detail distances.

float

A global LOD scale used to tweak the default terrain screen error value.

Functions

bool
getTerrainHeight(F32 x, F32 y)

Gets the terrain height at the specified position.

bool
getTerrainHeight(Point2I position)

Gets the terrain height at the specified position.

bool

Takes a world point and find the "highest" terrain underneath it.

bool

Takes a world point and find the "highest" terrain underneath it.

bool
getTerrainUnderWorldPoint(F32 x, F32 y, F32 z)

Takes a world point and find the "highest" terrain underneath it.

bool
getTerrainUnderWorldPoint(Point3F position)

Gets the terrain block that is located under the given world point.

Detailed Description

Variables

bool debugRender 

Triggers debug rendering of terrain cells.

float detailScale 

A global detail scale used to tweak the material detail distances.

float lodScale 

A global LOD scale used to tweak the default terrain screen error value.

Functions

getTerrainHeight(F32 x, F32 y)

Gets the terrain height at the specified position.

Parameters:

x

The X coordinate in world space

y

The Y coordinate in world space

return:

Returns the terrain height at the given point as an F32 value.

getTerrainHeight(Point2I position)

Gets the terrain height at the specified position.

Parameters:

position

The world space point, minus the z (height) value. Formatted as ("x y")

return:

Returns the terrain height at the given point as an F32 value.

getTerrainHeightBelowPosition(F32 x, F32 y)

Takes a world point and find the "highest" terrain underneath it.

Parameters:

x

The X coordinate in world space

y

The Y coordinate in world space

return:

Returns the closest terrain height below the given point as an F32 value.

getTerrainHeightBelowPosition(Point2I position)

Takes a world point and find the "highest" terrain underneath it.

Parameters:

position

The world space point, minus the z (height) value. Formatted as ("x y")

return:

Returns the closest terrain height below the given point as an F32 value.

getTerrainUnderWorldPoint(F32 x, F32 y, F32 z)

Takes a world point and find the "highest" terrain underneath it.

Parameters:

x

The X coordinate in world space

y

The Y coordinate in world space

z

The Z coordinate in world space

return:

Returns the ID of the requested terrain block (0 if not found).

getTerrainUnderWorldPoint(Point3F position)

Gets the terrain block that is located under the given world point.

Parameters:

position

The world space coordinate you wish to query at. Formatted as ("x y z")

return:

Returns the ID of the requested terrain block (0 if not found).