RigsofRods
Soft-body Physics Simulation
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
RoR::Terrain Class Reference

#include <Terrain.h>

+ Inheritance diagram for RoR::Terrain:
+ Collaboration diagram for RoR::Terrain:

Public Member Functions

 Terrain (CacheEntryPtr entry, Terrn2Def def)
 
virtual ~Terrain () override
 
bool initialize ()
 
void dispose ()
 
Terrain info
std::string getTerrainName () const
 
std::string getTerrainFileName ()
 
std::string getTerrainFileResourceGroup ()
 
std::string getGUID () const
 
int getCategoryID () const
 
int getVersion () const
 
CacheEntryPtr getCacheEntry ()
 
Terrain properties
Terrn2DefGetDef ()
 
Ogre::Vector3 getSpawnPos ()
 
float getWaterHeight () const
 
bool isFlat ()
 
float getPagedDetailFactor () const
 
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)
 
void delSurveyMapEntities (int id)
 
SurveyMapEntityVecgetSurveyMapEntities ()
 
Subsystems
TerrainGeometryManagergetGeometryManager ()
 
ProceduralManagerPtr getProceduralManager ()
 
TerrainObjectManagergetObjectManager ()
 
HydraxWatergetHydraxManager ()
 
SkyManager * getSkyManager ()
 
SkyXManagergetSkyXManager ()
 
ShadowManagergetShadowManager ()
 
TerrainEditorGetTerrainEditor ()
 
CollisionsGetCollisions ()
 
IWatergetWater ()
 
Visuals
Ogre::Light * getMainLight ()
 
int getFarClip () const
 
Simulation
void setGravity (float value)
 
float getGravity () const
 
float GetHeightAt (float x, float z)
 
Ogre::Vector3 GetNormalAt (float x, float y, float z)
 
Ogre::Vector3 getMaxTerrainSize ()
 
Ogre::AxisAlignedBox getTerrainCollisionAAB ()
 
Utility
void LoadTelepoints ()
 
void LoadPredefinedActors ()
 
bool HasPredefinedActors ()
 
void HandleException (const char *summary)
 
- Public Member Functions inherited from RefCountingObject< Terrain >
 RefCountingObject ()
 
virtual ~RefCountingObject ()
 
void AddRef ()
 
void Release ()
 

Static Public Attributes

static const int UNLIMITED_SIGHTRANGE = 4999
 

Private Member Functions

void initCamera ()
 
void initTerrainCollisions ()
 
void initFog ()
 
void initLight ()
 
void initObjects ()
 
void initScripting ()
 
void initShadows ()
 
void initSkySubSystem ()
 
void initVegetation ()
 
void initWater ()
 
void fixCompositorClearColor ()
 
void loadTerrainObjects ()
 

Private Attributes

TerrainObjectManagerm_object_manager
 
TerrainGeometryManagerm_geometry_manager
 
std::unique_ptr< IWaterm_water
 
TerrainEditor m_terrain_editor
 
Collisionsm_collisions
 
ShadowManagerm_shadow_manager
 
SkyManager * m_sky_manager
 
SkyXManagerSkyX_manager
 
HydraxWaterm_hydrax_water
 
CacheEntryPtr m_cache_entry
 
RoR::Terrn2Def m_def
 
float m_paged_detail_factor
 
int m_sight_range
 
Ogre::Light * m_main_light
 
float m_cur_gravity
 
bool m_disposed = false
 

Additional Inherited Members

- Static Public Member Functions inherited from RefCountingObject< Terrain >
static void RegisterRefCountingObject (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name)
 
- Data Fields inherited from RefCountingObject< Terrain >
int m_refcount
 
std::mutex m_refcount_mtx
 

Detailed Description

Definition at line 40 of file Terrain.h.

Constructor & Destructor Documentation

◆ Terrain()

RoR::Terrain::Terrain ( CacheEntryPtr  entry,
Terrn2Def  def 
)

Definition at line 53 of file Terrain.cpp.

◆ ~Terrain()

RoR::Terrain::~Terrain ( )
overridevirtual

Definition at line 70 of file Terrain.cpp.

Member Function Documentation

◆ addSurveyMapEntity()

void RoR::Terrain::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 
)

Definition at line 580 of file Terrain.cpp.

◆ delSurveyMapEntities()

void RoR::Terrain::delSurveyMapEntities ( int  id)

Definition at line 585 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ dispose()

void RoR::Terrain::dispose ( )

Definition at line 78 of file Terrain.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixCompositorClearColor()

void RoR::Terrain::fixCompositorClearColor ( )
private

Definition at line 365 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ getCacheEntry()

CacheEntryPtr RoR::Terrain::getCacheEntry ( )

Definition at line 595 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getCategoryID()

int RoR::Terrain::getCategoryID ( ) const
inline

Definition at line 56 of file Terrain.h.

◆ GetCollisions()

Collisions* RoR::Terrain::GetCollisions ( )
inline

Definition at line 83 of file Terrain.h.

+ Here is the caller graph for this function:

◆ GetDef()

Terrn2Def& RoR::Terrain::GetDef ( )
inline

Definition at line 63 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getFarClip()

int RoR::Terrain::getFarClip ( ) const
inline

Definition at line 90 of file Terrain.h.

◆ getGeometryManager()

TerrainGeometryManager* RoR::Terrain::getGeometryManager ( )
inline

Definition at line 75 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getGravity()

float RoR::Terrain::getGravity ( ) const
inline

Definition at line 96 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getGUID()

std::string RoR::Terrain::getGUID ( ) const
inline

Definition at line 55 of file Terrain.h.

◆ GetHeightAt()

float RoR::Terrain::GetHeightAt ( float  x,
float  z 
)

Definition at line 503 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getHydraxManager()

HydraxWater* RoR::Terrain::getHydraxManager ( )
inline

Definition at line 78 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getMainLight()

Ogre::Light* RoR::Terrain::getMainLight ( )
inline

Definition at line 89 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getMaxTerrainSize()

Ogre::Vector3 RoR::Terrain::getMaxTerrainSize ( )

Definition at line 496 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ GetNormalAt()

Ogre::Vector3 RoR::Terrain::GetNormalAt ( float  x,
float  y,
float  z 
)

Definition at line 508 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getObjectManager()

TerrainObjectManager* RoR::Terrain::getObjectManager ( )
inline

Definition at line 77 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getPagedDetailFactor()

float RoR::Terrain::getPagedDetailFactor ( ) const
inline

Definition at line 67 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getProceduralManager()

ProceduralManagerPtr RoR::Terrain::getProceduralManager ( )

Definition at line 565 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getShadowManager()

ShadowManager* RoR::Terrain::getShadowManager ( )
inline

Definition at line 81 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getSkyManager()

SkyManager * RoR::Terrain::getSkyManager ( )

Definition at line 513 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getSkyXManager()

SkyXManager* RoR::Terrain::getSkyXManager ( )
inline

Definition at line 80 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getSpawnPos()

Ogre::Vector3 RoR::Terrain::getSpawnPos ( )
inline

Definition at line 64 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getSurveyMapEntities()

SurveyMapEntityVec & RoR::Terrain::getSurveyMapEntities ( )

Definition at line 590 of file Terrain.cpp.

◆ getTerrainCollisionAAB()

Ogre::AxisAlignedBox RoR::Terrain::getTerrainCollisionAAB ( )

Definition at line 491 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ GetTerrainEditor()

TerrainEditor* RoR::Terrain::GetTerrainEditor ( )
inline

Definition at line 82 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getTerrainFileName()

std::string RoR::Terrain::getTerrainFileName ( )

Definition at line 570 of file Terrain.cpp.

◆ getTerrainFileResourceGroup()

std::string RoR::Terrain::getTerrainFileResourceGroup ( )

Definition at line 575 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getTerrainName()

std::string RoR::Terrain::getTerrainName ( ) const
inline

Definition at line 52 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getVersion()

int RoR::Terrain::getVersion ( ) const
inline

Definition at line 57 of file Terrain.h.

◆ getWater()

IWater* RoR::Terrain::getWater ( )
inline

Definition at line 84 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getWaterHeight()

float RoR::Terrain::getWaterHeight ( ) const
inline

Definition at line 65 of file Terrain.h.

+ Here is the caller graph for this function:

◆ HandleException()

void RoR::Terrain::HandleException ( const char *  summary)

Definition at line 545 of file Terrain.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasPredefinedActors()

bool RoR::Terrain::HasPredefinedActors ( )

Definition at line 538 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ initCamera()

void RoR::Terrain::initCamera ( )
private

Definition at line 225 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initFog()

void RoR::Terrain::initFog ( )
private

Definition at line 338 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initialize()

bool RoR::Terrain::initialize ( )

Definition at line 145 of file Terrain.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initLight()

void RoR::Terrain::initLight ( )
private

Definition at line 307 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initObjects()

void RoR::Terrain::initObjects ( )
private

Definition at line 486 of file Terrain.cpp.

◆ initScripting()

void RoR::Terrain::initScripting ( )
private

Definition at line 457 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initShadows()

void RoR::Terrain::initShadows ( )
private

Definition at line 435 of file Terrain.cpp.

◆ initSkySubSystem()

void RoR::Terrain::initSkySubSystem ( )
private

Definition at line 253 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initTerrainCollisions()

void RoR::Terrain::initTerrainCollisions ( )
private

Definition at line 449 of file Terrain.cpp.

◆ initVegetation()

void RoR::Terrain::initVegetation ( )
private

Definition at line 346 of file Terrain.cpp.

◆ initWater()

void RoR::Terrain::initWater ( )
private

Definition at line 391 of file Terrain.cpp.

◆ isFlat()

bool RoR::Terrain::isFlat ( )

Definition at line 518 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ LoadPredefinedActors()

void RoR::Terrain::LoadPredefinedActors ( )

Definition at line 532 of file Terrain.cpp.

◆ LoadTelepoints()

void RoR::Terrain::LoadTelepoints ( )

Definition at line 526 of file Terrain.cpp.

◆ loadTerrainObjects()

void RoR::Terrain::loadTerrainObjects ( )
private

Definition at line 441 of file Terrain.cpp.

◆ setGravity()

void RoR::Terrain::setGravity ( float  value)

Definition at line 481 of file Terrain.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ m_cache_entry

CacheEntryPtr RoR::Terrain::m_cache_entry
private

Definition at line 142 of file Terrain.h.

◆ m_collisions

Collisions* RoR::Terrain::m_collisions
private

Definition at line 134 of file Terrain.h.

◆ m_cur_gravity

float RoR::Terrain::m_cur_gravity
private

Definition at line 150 of file Terrain.h.

◆ m_def

RoR::Terrn2Def RoR::Terrain::m_def
private

Definition at line 143 of file Terrain.h.

◆ m_disposed

bool RoR::Terrain::m_disposed = false
private

Definition at line 151 of file Terrain.h.

◆ m_geometry_manager

TerrainGeometryManager* RoR::Terrain::m_geometry_manager
private

Definition at line 131 of file Terrain.h.

◆ m_hydrax_water

HydraxWater* RoR::Terrain::m_hydrax_water
private

Definition at line 138 of file Terrain.h.

◆ m_main_light

Ogre::Light* RoR::Terrain::m_main_light
private

Definition at line 149 of file Terrain.h.

◆ m_object_manager

TerrainObjectManager* RoR::Terrain::m_object_manager
private

Definition at line 130 of file Terrain.h.

◆ m_paged_detail_factor

float RoR::Terrain::m_paged_detail_factor
private

Definition at line 144 of file Terrain.h.

◆ m_shadow_manager

ShadowManager* RoR::Terrain::m_shadow_manager
private

Definition at line 135 of file Terrain.h.

◆ m_sight_range

int RoR::Terrain::m_sight_range
private

Definition at line 145 of file Terrain.h.

◆ m_sky_manager

SkyManager* RoR::Terrain::m_sky_manager
private

Definition at line 136 of file Terrain.h.

◆ m_terrain_editor

TerrainEditor RoR::Terrain::m_terrain_editor
private

Definition at line 133 of file Terrain.h.

◆ m_water

std::unique_ptr<IWater> RoR::Terrain::m_water
private

Definition at line 132 of file Terrain.h.

◆ SkyX_manager

SkyXManager* RoR::Terrain::SkyX_manager
private

Definition at line 137 of file Terrain.h.

◆ UNLIMITED_SIGHTRANGE

const int RoR::Terrain::UNLIMITED_SIGHTRANGE = 4999
static

Definition at line 43 of file Terrain.h.


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