RigsofRods
Soft-body Physics Simulation
Script2Game::TerrainClass Class Reference

Binding of RoR::Terrain; represents a loaded terrain. More...

#include <TerrainClass.h>

Public Member Functions

General
string getTerrainName ()
 
string getTerrainFileName ()
 
string getTerrainFileResourceGroup ()
 
string getGUID ()
 
int getVersion ()
 
Landscape


bool isFlat ()
 
Gameplay
vector3 getSpawnPos ()
 
void addSurveyMapEntity (const std::string &type, const std::string &filename, const std::string &resource_group, const std::string &caption, const Ogre::Vector3 &pos, float angle, int id)
 Adds an icon with description to survey map (minimap). More...
 
void delSurveyMapEntities (int id)
 Removes all survey map icons with the given ID. More...
 
Subsystems


ProceduralManagerClass getProceduralManager ()
 

Detailed Description

Binding of RoR::Terrain; represents a loaded terrain.

Note
Obtain the object using game.getTerrain().

Definition at line 16 of file TerrainClass.h.

Member Function Documentation

◆ addSurveyMapEntity()

void Script2Game::TerrainClass::addSurveyMapEntity ( const std::string &  type,
const std::string &  filename,
const std::string &  resource_group,
const std::string &  caption,
const Ogre::Vector3 &  pos,
float  angle,
int  id 
)

Adds an icon with description to survey map (minimap).

Parameters
typeinformational, optional
filenameThe file name. Don't forget to specify the resource group!
resource_groupLeave empty to use TexturesRG ('icons.zip/famicons.zip'), otherwise use BeamClass/TerrainClass getResourceGroup() to read from actor/terrain ZIP.
captionoptional
posThe world position of the point of interest, in meters.
angleThe world yaw in radians.
idThe race ID of the icon (>=0), or -1 if not a race icon. You can use larger negative numbers for custom IDs.

◆ delSurveyMapEntities()

void Script2Game::TerrainClass::delSurveyMapEntities ( int  id)

Removes all survey map icons with the given ID.

Parameters
idThe race ID of the icon (>=0), or -1 if not a race icon. You can use larger negative numbers for custom IDs.

◆ getGUID()

string Script2Game::TerrainClass::getGUID ( )
Returns
GUID (global unique ID) of the terrain, or empty string if not specified.

◆ getProceduralManager()

ProceduralManagerClass Script2Game::TerrainClass::getProceduralManager ( )

◆ getSpawnPos()

vector3 Script2Game::TerrainClass::getSpawnPos ( )
Returns
Player spawn position when entering game.

◆ getTerrainFileName()

string Script2Game::TerrainClass::getTerrainFileName ( )
Returns
File name of the terrain definition (TERRN2 format).

◆ getTerrainFileResourceGroup()

string Script2Game::TerrainClass::getTerrainFileResourceGroup ( )
Returns
OGRE resource group of the terrain bundle (ZIP/directory under 'mods/') where definition files live.

◆ getTerrainName()

string Script2Game::TerrainClass::getTerrainName ( )
Returns
Full name of the terrain

◆ getVersion()

int Script2Game::TerrainClass::getVersion ( )
Returns
version of the terrain, as specified by author.

◆ isFlat()

bool Script2Game::TerrainClass::isFlat ( )
Returns
true if specified as flat (no heightmap).

The documentation for this class was generated from the following file: