VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Terrain Implementations

Terrain database files are imported using DtTerrainImplementations (terrainImplementation.h).

A DtTerrainImplementation knows how to import terrain geometry data (terrain skin) from an external format and provide intersection capabilities. VR-Forces has the following terrain implementations:

These terrain implementors handle the following terrain types:

For example, to load an FBX database, do the following:

// Create and initialize a terrain interface
DtTerrainInterface terrainInterface;
terrainInterface.init();
// Load the terrain database
// FBX files (The FBX file is a terrain patch added to the MTF file).
// Load the Ground_DB II terrain example
if (!terrainInterface.loadTerrain("Ground_DB II.mtf"))
{
DtWarn("Couldn't load terrain database file\n");
return 1;
}

By default, VR-Forces looks in ./bin64/terrainImplementations/ to find the terrain implementation to use. If you create your own terrain implementation, you can change where VR-Forces looks for terrain implementations by setting the MAK_TERRAIN_IMPLEMENTATION_LIB_DIR environment variable.

Note
If you set MAK_TERRAIN_IMPLEMENTATION_LIB_DIR to a location other than ./bin64/terrainImplementations/, you will not be able to load the terrains provided with VR-Forces (or created using the default terrain implementation) unless you also copy all terrain-related configuration files from ./appData and ./data to locations that have the same relative paths as these files do to ./bin64/terrainImplementations/.

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)