vtlib library
Public Member Functions | List of all members
vtTerrainScene Class Reference
Inheritance diagram for vtTerrainScene:
Inheritance graph

Public Member Functions

vtGroupBeginTerrainScene ()
void AppendTerrain (vtTerrain *pTerrain)
void SetCurrentTerrain (vtTerrain *pTerrain)
vtGroupBuildTerrain (vtTerrain *pTerrain)
uint NumTerrains ()
 Access the terrains in the list.
vtTerrainGetCurrentTerrain () const
 Get the terrain currently being shown.
vtTerrainFindTerrainByName (const char *name)
 Find a terrain by its name. More...
vtTransformGetSunLightTransform ()
 The Sun.

Detailed Description

vtTerrainScene provides a container for all of your vtTerrain objects.

It keeps track of which terrain is active, and allows you to switch between terrains if you have more than one. It also creates some of the surrounding environment (sunlight, skydome) which is common to all of the terrains.

Member Function Documentation

void vtTerrainScene::AppendTerrain ( vtTerrain pTerrain)

Adds a terrain to the scene.

vtGroup * vtTerrainScene::BeginTerrainScene ( )

Call this method once before adding any terrains, to initialize the vtTerrainScene object.

vtGroup * vtTerrainScene::BuildTerrain ( vtTerrain pTerrain)

BuildTerrain constructs all geometry, textures and objects for a given terrain.

pTerrainThe terrain to build.
A vtGroup which is the top of the terrain's scene graph.
vtTerrain * vtTerrainScene::FindTerrainByName ( const char *  name)

Find a terrain whose name begins with a given string.

void vtTerrainScene::SetCurrentTerrain ( vtTerrain pTerrain)

Set the current Terrain for the scene. There can only be one terrain active a at time. If you have more than one terrain, you can use this method to switch between them.