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 initAiPresets ()
 
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 54 of file Terrain.cpp.

◆ ~Terrain()

RoR::Terrain::~Terrain ( )
overridevirtual

Definition at line 71 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 612 of file Terrain.cpp.

◆ delSurveyMapEntities()

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

Definition at line 617 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ dispose()

void RoR::Terrain::dispose ( )

Definition at line 79 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 367 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ getCacheEntry()

CacheEntryPtr RoR::Terrain::getCacheEntry ( )

Definition at line 627 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 535 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 528 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 540 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 597 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 545 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 622 of file Terrain.cpp.

◆ getTerrainCollisionAAB()

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

Definition at line 523 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 602 of file Terrain.cpp.

◆ getTerrainFileResourceGroup()

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

Definition at line 607 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 577 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 570 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ initAiPresets()

void RoR::Terrain::initAiPresets ( )
private

Definition at line 483 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initCamera()

void RoR::Terrain::initCamera ( )
private

Definition at line 227 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initFog()

void RoR::Terrain::initFog ( )
private

Definition at line 340 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initialize()

bool RoR::Terrain::initialize ( )

Definition at line 146 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 309 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initObjects()

void RoR::Terrain::initObjects ( )
private

Definition at line 518 of file Terrain.cpp.

◆ initScripting()

void RoR::Terrain::initScripting ( )
private

Definition at line 459 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initShadows()

void RoR::Terrain::initShadows ( )
private

Definition at line 437 of file Terrain.cpp.

◆ initSkySubSystem()

void RoR::Terrain::initSkySubSystem ( )
private

Definition at line 255 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initTerrainCollisions()

void RoR::Terrain::initTerrainCollisions ( )
private

Definition at line 451 of file Terrain.cpp.

◆ initVegetation()

void RoR::Terrain::initVegetation ( )
private

Definition at line 348 of file Terrain.cpp.

◆ initWater()

void RoR::Terrain::initWater ( )
private

Definition at line 393 of file Terrain.cpp.

◆ isFlat()

bool RoR::Terrain::isFlat ( )

Definition at line 550 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ LoadPredefinedActors()

void RoR::Terrain::LoadPredefinedActors ( )

Definition at line 564 of file Terrain.cpp.

◆ LoadTelepoints()

void RoR::Terrain::LoadTelepoints ( )

Definition at line 558 of file Terrain.cpp.

◆ loadTerrainObjects()

void RoR::Terrain::loadTerrainObjects ( )
private

Definition at line 443 of file Terrain.cpp.

◆ setGravity()

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

Definition at line 513 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 143 of file Terrain.h.

◆ m_collisions

Collisions* RoR::Terrain::m_collisions
private

Definition at line 135 of file Terrain.h.

◆ m_cur_gravity

float RoR::Terrain::m_cur_gravity
private

Definition at line 151 of file Terrain.h.

◆ m_def

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

Definition at line 144 of file Terrain.h.

◆ m_disposed

bool RoR::Terrain::m_disposed = false
private

Definition at line 152 of file Terrain.h.

◆ m_geometry_manager

TerrainGeometryManager* RoR::Terrain::m_geometry_manager
private

Definition at line 132 of file Terrain.h.

◆ m_hydrax_water

HydraxWater* RoR::Terrain::m_hydrax_water
private

Definition at line 139 of file Terrain.h.

◆ m_main_light

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

Definition at line 150 of file Terrain.h.

◆ m_object_manager

TerrainObjectManager* RoR::Terrain::m_object_manager
private

Definition at line 131 of file Terrain.h.

◆ m_paged_detail_factor

float RoR::Terrain::m_paged_detail_factor
private

Definition at line 145 of file Terrain.h.

◆ m_shadow_manager

ShadowManager* RoR::Terrain::m_shadow_manager
private

Definition at line 136 of file Terrain.h.

◆ m_sight_range

int RoR::Terrain::m_sight_range
private

Definition at line 146 of file Terrain.h.

◆ m_sky_manager

SkyManager* RoR::Terrain::m_sky_manager
private

Definition at line 137 of file Terrain.h.

◆ m_terrain_editor

TerrainEditor RoR::Terrain::m_terrain_editor
private

Definition at line 134 of file Terrain.h.

◆ m_water

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

Definition at line 133 of file Terrain.h.

◆ SkyX_manager

SkyXManager* RoR::Terrain::SkyX_manager
private

Definition at line 138 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: