Torque 3D - Script Manual: Terrain

TorqueScript

Main   Class List   Namespace List   Online

Terrain
[Environment Objects]

Objects that specialize in representing terrain and other collidable/walkable surfaces. More...

Classes

class  DecalRoad
 A strip shaped decal defined by spine nodes which clips against Terrain objects. More...
class  GroundPlane
 An infinite plane extending in all direction. More...
class  MeshRoad
 A strip of rectangular mesh segments defined by a 3D spline for prototyping road-shaped objects in your scene. More...
class  TerrainBlock
 Represent a terrain object in a Torque 3D level. More...

Functions

bool getTerrainHeight (Point2I position)
 Gets the terrain height at the specified position.
bool getTerrainHeight (F32 x, F32 y)
 Gets the terrain height at the specified position.
bool getTerrainHeightBelowPosition (Point2I position)
 Takes a world point and find the "highest" terrain underneath it.
bool getTerrainHeightBelowPosition (F32 x, F32 y)
 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.
bool getTerrainUnderWorldPoint (F32 x, F32 y, F32 z)
 Takes a world point and find the "highest" terrain underneath it.

Variables

static bool TerrainBlock::debugRender
 Triggers debug rendering of terrain cells.
float $pref::Terrain::detailScale
 A global detail scale used to tweak the material detail distances.
float $pref::Terrain::lodScale
 A global LOD scale used to tweak the default terrain screen error value.

Detailed Description

Objects that specialize in representing terrain and other collidable/walkable surfaces.


Function Documentation

bool 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")
Returns:
Returns the terrain height at the given point as an F32 value.
bool 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
Returns:
Returns the terrain height at the given point as an F32 value.
bool 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")
Returns:
Returns the closest terrain height below the given point as an F32 value.
bool 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
Returns:
Returns the closest terrain height below the given point as an F32 value.
bool 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")
Returns:
Returns the ID of the requested terrain block (0 if not found).
bool 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
Returns:
Returns the ID of the requested terrain block (0 if not found).

Variable Documentation

bool TerrainBlock::debugRender [static, inherited]

Triggers debug rendering of terrain cells.

float $pref::Terrain::detailScale

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

float $pref::Terrain::lodScale

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



Copyright © GarageGames, LLC. All Rights Reserved.