RigsofRods
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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, Terrn2DocumentPtr def)
 
virtual ~Terrain () override
 
bool initialize ()
 
void dispose ()
 
General
std::string getTerrainName () const
 
std::string getTerrainFileName ()
 
std::string getTerrainFileResourceGroup ()
 
std::string getGUID () const
 
int getVersion () const
 
CacheEntryPtr getCacheEntry ()
 
Gameplay
bool isFlat ()
 
float getHeightAt (float x, float z)
 
Ogre::Vector3 getSpawnPos ()
 
Ogre::Degree getSpawnRot ()
 
Subsystems
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 ()
 
ProceduralManagerPtr getProceduralManager ()
 
float getWaterHeight () const
 
TerrainGeometryManagergetGeometryManager ()
 
TerrainObjectManagergetObjectManager ()
 
HydraxWatergetHydraxManager ()
 
SkyManager * getSkyManager ()
 
SkyXManagergetSkyXManager ()
 
ShadowManagergetShadowManager ()
 
TerrainEditorGetTerrainEditor ()
 
CollisionsGetCollisions ()
 
IWatergetWater ()
 
Visuals
Ogre::Light * getMainLight ()
 
int getFarClip () const
 
float getPagedDetailFactor () const
 
Simulation
void setGravity (float value)
 
float getGravity () const
 
Ogre::Vector3 GetNormalAt (float x, float y, float z)
 
Ogre::Vector3 getMaxTerrainSize ()
 
Ogre::AxisAlignedBox getTerrainCollisionAAB ()
 
Utility
Terrn2DocumentPtr GetDef ()
 
void LoadTelepoints ()
 
void LoadPredefinedActors ()
 
bool HasPredefinedActors ()
 
- 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 = nullptr
 
TerrainGeometryManagerm_geometry_manager = nullptr
 
std::unique_ptr< IWaterm_water
 
TerrainEditor m_terrain_editor
 
Collisionsm_collisions = nullptr
 
ShadowManagerm_shadow_manager = nullptr
 
SkyManager * m_sky_manager = nullptr
 
SkyXManagerSkyX_manager = nullptr
 
HydraxWaterm_hydrax_water = nullptr
 
CacheEntryPtr m_cache_entry
 
Terrn2DocumentPtr m_def
 
float m_paged_detail_factor = 0.f
 
int m_sight_range = 1000
 
Ogre::Light * m_main_light = nullptr
 
float m_cur_gravity = DEFAULT_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,
Terrn2DocumentPtr  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 562 of file Terrain.cpp.

◆ delSurveyMapEntities()

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

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

+ Here is the call graph for this function:

◆ getCacheEntry()

CacheEntryPtr RoR::Terrain::getCacheEntry ( )

Definition at line 585 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ GetCollisions()

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

Definition at line 85 of file Terrain.h.

+ Here is the caller graph for this function:

◆ GetDef()

Terrn2DocumentPtr RoR::Terrain::GetDef ( )

Definition at line 577 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getFarClip()

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

Definition at line 92 of file Terrain.h.

◆ getGeometryManager()

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

Definition at line 78 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getGravity()

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

Definition at line 99 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getGUID()

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

Definition at line 581 of file Terrain.cpp.

◆ getHeightAt()

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

Definition at line 505 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getHydraxManager()

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

Definition at line 80 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getMainLight()

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

Definition at line 91 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getMaxTerrainSize()

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

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

+ Here is the caller graph for this function:

◆ getObjectManager()

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

Definition at line 79 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getPagedDetailFactor()

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

Definition at line 93 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getProceduralManager()

ProceduralManagerPtr RoR::Terrain::getProceduralManager ( )

Definition at line 547 of file Terrain.cpp.

◆ getShadowManager()

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

Definition at line 83 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getSkyManager()

SkyManager * RoR::Terrain::getSkyManager ( )

Definition at line 515 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getSkyXManager()

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

Definition at line 82 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getSpawnPos()

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

Definition at line 587 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getSpawnRot()

Ogre::Degree RoR::Terrain::getSpawnRot ( )

Definition at line 589 of file Terrain.cpp.

◆ getSurveyMapEntities()

SurveyMapEntityVec & RoR::Terrain::getSurveyMapEntities ( )

Definition at line 572 of file Terrain.cpp.

◆ getTerrainCollisionAAB()

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

Definition at line 493 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ GetTerrainEditor()

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

Definition at line 84 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getTerrainFileName()

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

Definition at line 552 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getTerrainFileResourceGroup()

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

Definition at line 557 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getTerrainName()

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

Definition at line 579 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ getVersion()

int RoR::Terrain::getVersion ( ) const

Definition at line 583 of file Terrain.cpp.

◆ getWater()

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

Definition at line 86 of file Terrain.h.

+ Here is the caller graph for this function:

◆ getWaterHeight()

float RoR::Terrain::getWaterHeight ( ) const

Definition at line 591 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ HasPredefinedActors()

bool RoR::Terrain::HasPredefinedActors ( )

Definition at line 540 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ initAiPresets()

void RoR::Terrain::initAiPresets ( )
private

Definition at line 475 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 331 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 301 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initObjects()

void RoR::Terrain::initObjects ( )
private

Definition at line 488 of file Terrain.cpp.

◆ initScripting()

void RoR::Terrain::initScripting ( )
private

Definition at line 451 of file Terrain.cpp.

+ Here is the call graph for this function:

◆ initShadows()

void RoR::Terrain::initShadows ( )
private

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

◆ initVegetation()

void RoR::Terrain::initVegetation ( )
private

Definition at line 339 of file Terrain.cpp.

◆ initWater()

void RoR::Terrain::initWater ( )
private

Definition at line 385 of file Terrain.cpp.

◆ isFlat()

bool RoR::Terrain::isFlat ( )

Definition at line 520 of file Terrain.cpp.

+ Here is the caller graph for this function:

◆ LoadPredefinedActors()

void RoR::Terrain::LoadPredefinedActors ( )

Definition at line 534 of file Terrain.cpp.

◆ LoadTelepoints()

void RoR::Terrain::LoadTelepoints ( )

Definition at line 528 of file Terrain.cpp.

◆ loadTerrainObjects()

void RoR::Terrain::loadTerrainObjects ( )
private

Definition at line 435 of file Terrain.cpp.

◆ setGravity()

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

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

◆ m_collisions

Collisions* RoR::Terrain::m_collisions = nullptr
private

Definition at line 137 of file Terrain.h.

◆ m_cur_gravity

float RoR::Terrain::m_cur_gravity = DEFAULT_GRAVITY
private

Definition at line 153 of file Terrain.h.

◆ m_def

Terrn2DocumentPtr RoR::Terrain::m_def
private

Definition at line 146 of file Terrain.h.

◆ m_disposed

bool RoR::Terrain::m_disposed = false
private

Definition at line 154 of file Terrain.h.

◆ m_geometry_manager

TerrainGeometryManager* RoR::Terrain::m_geometry_manager = nullptr
private

Definition at line 134 of file Terrain.h.

◆ m_hydrax_water

HydraxWater* RoR::Terrain::m_hydrax_water = nullptr
private

Definition at line 141 of file Terrain.h.

◆ m_main_light

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

Definition at line 152 of file Terrain.h.

◆ m_object_manager

TerrainObjectManager* RoR::Terrain::m_object_manager = nullptr
private

Definition at line 133 of file Terrain.h.

◆ m_paged_detail_factor

float RoR::Terrain::m_paged_detail_factor = 0.f
private

Definition at line 147 of file Terrain.h.

◆ m_shadow_manager

ShadowManager* RoR::Terrain::m_shadow_manager = nullptr
private

Definition at line 138 of file Terrain.h.

◆ m_sight_range

int RoR::Terrain::m_sight_range = 1000
private

Definition at line 148 of file Terrain.h.

◆ m_sky_manager

SkyManager* RoR::Terrain::m_sky_manager = nullptr
private

Definition at line 139 of file Terrain.h.

◆ m_terrain_editor

TerrainEditor RoR::Terrain::m_terrain_editor
private

Definition at line 136 of file Terrain.h.

◆ m_water

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

Definition at line 135 of file Terrain.h.

◆ SkyX_manager

SkyXManager* RoR::Terrain::SkyX_manager = nullptr
private

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