vtlib library
List of all members
TParams Class Reference
Inheritance diagram for TParams:
Inheritance graph
[legend]

Detailed Description

Terrain Parameters. These are all the values which describe how a terrain will be created.

This class inherits from vtTagArray, a simple collection of tags with values, which provides the methods to set and get values. A standard set of tags which TParams stores is listed below. Related user documentation for these parameters as they are displayed in the Enviro user interface is at http://vterrain.org/Doc/Enviro/terrain_creation.html

Example of working with parameters:
TParams params;
int height = params.GetValueInt("Min_Height");
params.SetValueInt("Min_Height", 100);
The standard terrain parameter tags:
Tag Type Default Description
Name String The name of the terrain. Example: "Big Island of Hawai'i".
Elevation_Filename String Filename for source of elevation data.
Vertical_Exag Float 1.0 Vertical exaggeration, 1.0 to draw the terrain surface at its true elevation.
Suppress_Surface Bool false True to not draw the terrain surface at all. It will be loaded, and used for purposes such as planting objects, but not drawn.
Min_Height Float 20 For navigation, minimum height above the ground in meters.
Nav_Style Int 0 For navigation, tells the viewer what stlye to use: 0=Normal, 1=Velocity, 2=Grab-Pivot
Nav_Speed Float 100 For navigation, peak speed in meters per second.
Locations_File String File which contains the stored camera locations for this terrain.
Init_Location String Name of the location at which the camera should start when the terrain is first visited.
Hither_Distance String 5 The hither ("near") clipping plan distance, in meters.
Accel Bool false True means to accelerate navigation by the camera's height above the terrain surface.
Allow_Roll Bool false True to allow the camera to roll (in addition to pitch and yaw).
Surface_Type Int 0 The type of input elevation data. 0=single grid, 1=TIN, 2=Tileset
LOD_Method Int 0 The type of CLOD to use for single elevation grids (Surface_Type=0). See LodMethodEnum for values.
Tri_Count Int 10000 The number of triangles for the CLOD algorithm to target.
Tristrips Bool true For the McNally CLOD, True to use triangle strips.
Vert_Count Int 20000 For tiled terrain (Surface_Type=2), the number of vertices for the algorithm to target.
Tile_Cache_Size Int 80 For tiled terrain (Surface_Type=2), the size of the tile cache to keep in host RAM, in MB.
Time_On Bool false Try for the time-of-day engine to be on.
Init_Time String 104 2 21 10 0 0 Initial time for the time-of-day engine. The values are: year (+1900), month (0-based), day, hour, minute, second. The default is 2004, March 21, 10am.
Time_Speed Float 1.0 Speed of the time-of-day engine. A value of 1 matched reality. A value of 10 means that time moves 10 times faster than reality.
Texture Int 0 Enumeration for source of ground texture. 0=none, 1=single, 3=derived from elevation, 4=tileset
Texture_Filename String For the single texture or tileset, the filename to load from.
MIP_Map Bool false Turn on mipmapping for the ground texture.
Request_16_Bit Bool true Tells OpenGL to store the textures on the graphics card with 16-bit depth, which can save some graphics memory at a small cost in quality.
Pre-Light Bool true Shades the texture (darking based on the location of the sunlight). This shading directly affects the texels of the ground texture, often called "baked-in" lighting.
PreLight_Factor Float 1.0 The intensity of the pre-light shading. 1.0 gives full shading, lower values give a more subtle effect.
Cast_Shadows Bool false In addition to the normal (dot-product) shading of the texture based on the elevation surface, also cast shadows from the terrain onto itself. This can take up to a few seconds. The time taken is proportional to the number of texels in shadow.

Remaining to be documented in the table:

Color_Map Texture_Retain Detail_Texture DTexture_Name Roads Road_File Highway Paved Dirt Road_Height Road_Distance Road_Texture Road_Culture Trees Tree_File Tree_Distance Trees_Use_Shaders Fog Fog_Distance Fog_Color Structure_File Structure_Distance Structure_Shadows Shadow_Resolution Shadow_Darkness Content_File Vehicles Vehicle_Size Vehicle_Speed Sky Sky_Texture Ocean_Plane Ocean_Plane_Level Depress_Ocean Depress_Ocean_Level Background_Color Distance_Tool_Height HUD_Overlay Scenario_Name

Abstract Layers

A terrain can have any number of abstract layers, which are (generally) loaded from GIS files on disk, then created in 3D as geometry or floating text labels. Each layer has a number of properties which indicates how the features should appear. See vtAbstractLayer for a description of the properties.