#include <TParams.h>
Public Member Functions | |
| TParams (const TParams ¶msSrc) | |
| TParams & | operator= (const TParams &rhs) |
| bool | LoadFrom (const char *fname) |
| bool | LoadFromXML (const char *fname) |
| void | WriteOverridesToXML (FILE *fp) const |
| void | SetLodMethod (LodMethodEnum method) |
| LodMethodEnum | GetLodMethod () const |
| void | SetTextureEnum (TextureEnum tex) |
| TextureEnum | GetTextureEnum () const |
| void | SetOverlay (const vtString &fname, int x, int y) |
| bool | GetOverlay (vtString &fname, int &x, int &y) const |
Public Member Functions inherited from vtTagArray | |
| void | AddTag (const vtTag &pTag) |
| void | AddTag (const char *name, const char *value) |
| vtTag * | FindTag (const char *szTagName) |
| const vtTag * | FindTag (const char *szTagName) const |
| vtTag * | GetTag (int index) |
| const vtTag * | GetTag (int index) const |
| uint | NumTags () const |
| void | RemoveTag (int index) |
| void | RemoveTag (const char *szTagName) |
| void | Clear () |
| void | SetValueString (const char *szTagName, const vtString &string, bool bCreating=false) |
| void | SetValueBool (const char *szTagName, bool value, bool bCreating=false) |
| void | SetValueInt (const char *szTagName, int value, bool bCreating=false) |
| void | SetValueFloat (const char *szTagName, float value, bool bCreating=false) |
| void | SetValueDouble (const char *szTagName, double value, bool bCreating=false) |
| void | SetValueRGBi (const char *szTagName, const RGBi &value, bool bCreating=false) |
| const char * | GetValueString (const char *szTagName, bool bSuppressWarning=false) const |
| bool | GetValueBool (const char *szTagName) const |
| int | GetValueInt (const char *szTagName) const |
| float | GetValueFloat (const char *szTagName) const |
| double | GetValueDouble (const char *szTagName) const |
| RGBi | GetValueRGBi (const char *szTagName) const |
| bool | GetValueString (const char *szTagName, vtString &string) const |
| bool | GetValueBool (const char *szTagName, bool &bValue) const |
| bool | GetValueInt (const char *szTagName, int &iValue) const |
| bool | GetValueFloat (const char *szTagName, float &fValue) const |
| bool | GetValueDouble (const char *szTagName, double &dValue) const |
| bool | GetValueRGBi (const char *szTagName, RGBi &color) const |
| vtTagArray & | operator= (const vtTagArray &v) |
| bool | operator== (const vtTagArray &v) const |
| bool | operator!= (const vtTagArray &v) const |
| void | CopyTagsFrom (const vtTagArray &v) |
| bool | WriteToXML (const char *fname, const char *title) const |
| void | WriteToXMLBody (FILE *fp, int iIndent) const |
| bool | LoadFromXML (const char *fname) |
| virtual bool | OverrideValue (const char *szTagName, const vtString &string) |
| void | LogTags () const |
Public Attributes | |
| std::vector< vtTagArray > | m_Layers |
| vtStringArray | m_AnimPaths |
| std::vector< ScenarioParams > | m_Scenarios |
Additional Inherited Members | |
Static Public Member Functions inherited from vtTagArray | |
| static void | SetVerbose (bool value) |
Protected Attributes inherited from vtTagArray | |
| std::vector< vtTag > | m_tags |
Static Protected Attributes inherited from vtTagArray | |
| static bool | s_bVerbose = false |
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
| 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 DTexture_Scale DTexture_Distance Roads Road_File Highway Paved Dirt Road_Height Road_Distance Road_Texture Road_Culture Trees Tree_File Tree_Distance 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 Horizon Background_Color Distance_Tool_Height HUD_Overlay Scenario_Name
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.
1.8.4