TerrainBlock
Represent a terrain object in a Torque 3D level.
Media
assetIdString
The source terrain data asset.
filename
The source terrain data file.
Misc
bool
Allows the terrain to cast shadows onto itself and other objects.
float
Indicates the spacing between points on the XY plane on the terrain.
int
Size of base texture size per meter.
int
Light map dimensions in pixels.
int
Not yet implemented.
bool
Whether or not to update the Base Texture.
AFX
bool
Public Static Attributes
bool
Triggers debug rendering of terrain cells.
bool
Disables rendering of all instances of this type.
bool
Disables selection of all instances of this type.
Public Functions
bool
exportHeightMap(string fileNameStr, string format)
export the terrain block's heightmap to a bitmap file (default: png)
bool
exportLayerMaps(string filePrefixStr, string format)
export the terrain block's layer maps to bitmap files (default: png)
bool
save(string fileName)
Saves the terrain block's terrain file to the specified file name.
bool
Saves the terrain block's terrain file to the specified file name.
void
Public Static Functions
Detailed Description
Represent a terrain object in a Torque 3D level.
new TerrainBlock(theTerrain) { terrainFile = "art/terrains/Deathball Desert_0.ter"; squareSize = "2"; tile = "0"; baseTexSize = "1024"; screenError = "16"; position = "-1024 -1024 179.978"; rotation = "1 0 0 0"; scale = "1 1 1"; isRenderEnabled = "true"; canSaveDynamicFields = "1"; };
Media
assetIdString TerrainAsset
The source terrain data asset.
filename terrainFile
The source terrain data file.
Misc
bool castShadows
Allows the terrain to cast shadows onto itself and other objects.
float squareSize
Indicates the spacing between points on the XY plane on the terrain.
int baseTexSize
Size of base texture size per meter.
baseTexFormat baseTexFormat
int lightMapSize
Light map dimensions in pixels.
int screenError
Not yet implemented.
bool updateBasetex
Whether or not to update the Base Texture.
AFX
bool ignoreZodiacs
Public Static Attributes
bool debugRender
Triggers debug rendering of terrain cells.
bool isRenderable
Disables rendering of all instances of this type.
bool isSelectable
Disables selection of all instances of this type.
Public Functions
exportHeightMap(string fileNameStr, string format)
export the terrain block's heightmap to a bitmap file (default: png)
exportLayerMaps(string filePrefixStr, string format)
export the terrain block's layer maps to bitmap files (default: png)
save(string fileName)
Saves the terrain block's terrain file to the specified file name.
Parameters:
fileName | Name and path of file to save terrain data to. |
True if file save was successful, false otherwise
saveAsset()
Saves the terrain block's terrain file to the specified file name.
Parameters:
fileName | Name and path of file to save terrain data to. |
True if file save was successful, false otherwise
setMaterialsDirty()