RigsofRods
Soft-body Physics Simulation
Terrain.cpp
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2013-2016 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #include "Terrain.h"
23 
24 #include "Actor.h"
25 #include "ActorManager.h"
26 #include "CacheSystem.h"
27 #include "Collisions.h"
28 #include "ContentManager.h"
29 #include "Renderdash.h"
30 #include "GfxScene.h"
31 #include "GUIManager.h"
32 #include "GUI_LoadingWindow.h"
33 #include "GUI_SurveyMap.h"
34 #include "HydraxWater.h"
35 #include "Language.h"
36 #include "ScriptEngine.h"
37 #include "ShadowManager.h"
38 #include "SkyManager.h"
39 #include "SkyXManager.h"
40 #include "TerrainGeometryManager.h"
41 #include "TerrainObjectManager.h"
42 #include "Utils.h"
43 #include "Water.h"
44 
45 #include <Terrain/OgreTerrainPaging.h>
46 #include <Terrain/OgreTerrainGroup.h>
47 
48 #include <algorithm>
49 
50 using namespace RoR;
51 using namespace Ogre;
52 
54  : m_collisions(0)
55  , m_geometry_manager(0)
56  , m_object_manager(0)
57  , m_shadow_manager(0)
58  , m_sky_manager(0)
59  , SkyX_manager(0)
60  , m_sight_range(1000)
61  , m_main_light(0)
62  , m_paged_detail_factor(0.0f)
63  , m_cur_gravity(DEFAULT_GRAVITY)
64  , m_hydrax_water(nullptr)
65  , m_cache_entry(entry)
66  , m_def(def)
67 {
68 }
69 
71 {
72  if (!m_disposed)
73  {
74  this->dispose();
75  }
76 }
77 
79 {
80  if (App::app_state->getEnum<AppState>() == AppState::SHUTDOWN)
81  {
82  // Rush to exit
83  return;
84  }
85 
86  //I think that the order is important
87 
88 #ifdef USE_CAELUM
89  if (m_sky_manager != nullptr)
90  {
91  delete(m_sky_manager);
92  m_sky_manager = nullptr;
93  }
94 #endif // USE_CAELUM
95 
96  if (SkyX_manager != nullptr)
97  {
98  delete(SkyX_manager);
99  SkyX_manager = nullptr;
100  }
101 
102  if (m_main_light != nullptr)
103  {
104  App::GetGfxScene()->GetSceneManager()->destroyAllLights();
105  m_main_light = nullptr;
106  }
107 
108  if (m_hydrax_water != nullptr)
109  {
110  m_water.reset(); // TODO: Currently needed - research and get rid of this ~ only_a_ptr, 08/2018
111  }
112 
113  if (m_object_manager != nullptr)
114  {
115  delete(m_object_manager);
116  m_object_manager = nullptr;
117  }
118 
119  if (m_geometry_manager != nullptr)
120  {
121  delete(m_geometry_manager);
122  m_geometry_manager = nullptr;
123  }
124 
125  if (m_shadow_manager != nullptr)
126  {
127  delete(m_shadow_manager);
128  m_shadow_manager = nullptr;
129  }
130 
131  if (m_collisions != nullptr)
132  {
133  delete(m_collisions);
134  m_collisions = nullptr;
135  }
136 
137  if (App::GetScriptEngine()->getTerrainScriptUnit() != SCRIPTUNITID_INVALID)
138  {
139  App::GetScriptEngine()->unloadScript(App::GetScriptEngine()->getTerrainScriptUnit());
140  }
141 
142  m_disposed = true;
143 }
144 
146 {
147  auto* loading_window = &App::GetGuiManager()->LoadingWindow;
148 
149  this->setGravity(this->m_def.gravity);
150 
151  loading_window->SetProgress(10, _L("Initializing Object Subsystem"));
152  this->initObjects(); // *.odef files
153 
154  loading_window->SetProgress(14, _L("Initializing Shadow Subsystem"));
155  this->initShadows();
156 
157  loading_window->SetProgress(17, _L("Initializing Geometry Subsystem"));
158  this->m_geometry_manager = new TerrainGeometryManager(this);
159 
160  loading_window->SetProgress(23, _L("Initializing Camera Subsystem"));
161  this->initCamera();
162 
163  // sky, must come after camera due to m_sight_range
164  loading_window->SetProgress(25, _L("Initializing Sky Subsystem"));
165  this->initSkySubSystem();
166 
167  loading_window->SetProgress(27, _L("Initializing Light Subsystem"));
168  this->initLight();
169 
170  if (App::gfx_sky_mode->getEnum<GfxSkyMode>() != GfxSkyMode::CAELUM) //Caelum has its own fog management
171  {
172  loading_window->SetProgress(29, _L("Initializing Fog Subsystem"));
173  this->initFog();
174  }
175 
176  loading_window->SetProgress(31, _L("Initializing Vegetation Subsystem"));
177  this->initVegetation();
178 
179  this->fixCompositorClearColor();
180 
181  loading_window->SetProgress(40, _L("Loading Terrain Geometry"));
182  if (!this->m_geometry_manager->InitTerrain(this->m_def.ogre_ter_conf_filename))
183  {
184  return false; // Error already reported
185  }
186 
187  loading_window->SetProgress(60, _L("Initializing Collision Subsystem"));
188  this->m_collisions = new Collisions(this->getMaxTerrainSize());
189 
190  loading_window->SetProgress(75, _L("Initializing Script Subsystem"));
191  this->initScripting();
192  this->initAiPresets();
193 
194  loading_window->SetProgress(77, _L("Initializing Water Subsystem"));
195  this->initWater();
196 
197  loading_window->SetProgress(80, _L("Loading Terrain Objects"));
198  this->loadTerrainObjects(); // *.tobj files
199 
200  // init things after loading the terrain
201  this->initTerrainCollisions();
202 
203  loading_window->SetProgress(90, _L("Initializing terrain light properties"));
204  this->m_geometry_manager->UpdateMainLightPosition(); // Initial update takes a while
205  this->m_collisions->finishLoadingTerrain();
206 
207  this->LoadTelepoints(); // *.terrn2 file feature
208 
209  App::GetGfxScene()->CreateDustPools(); // Particle effects
210 
211  loading_window->SetProgress(92, _L("Initializing Overview Map Subsystem"));
212  App::GetGuiManager()->SurveyMap.CreateTerrainTextures(); // Should be done before actors are loaded, otherwise they'd show up in the static texture
213 
214  LOG(" ===== LOADING TERRAIN ACTORS " + m_cache_entry->fname);
215  loading_window->SetProgress(95, _L("Loading Terrain Actors"));
216  this->LoadPredefinedActors();
217 
218  LOG(" ===== TERRAIN LOADING DONE " + m_cache_entry->fname);
219 
220  App::sim_terrain_name->setStr(m_cache_entry->fname);
221  App::sim_terrain_gui_name->setStr(this->m_def.name);
222 
223  return this;
224 }
225 
227 {
228  App::GetCameraManager()->GetCamera()->getViewport()->setBackgroundColour(m_def.ambient_color);
229  App::GetCameraManager()->GetCameraNode()->setPosition(m_def.start_position);
230 
231  if (App::gfx_sky_mode->getEnum<GfxSkyMode>() == GfxSkyMode::SKYX)
232  {
233  m_sight_range = 5000; //Force unlimited for SkyX, lower settings are glitchy
234  }
235  else
236  {
237  m_sight_range = App::gfx_sight_range->getInt();
238  }
239 
240  if (m_sight_range < UNLIMITED_SIGHTRANGE && App::gfx_sky_mode->getEnum<GfxSkyMode>() != GfxSkyMode::SKYX)
241  {
242  App::GetCameraManager()->GetCamera()->setFarClipDistance(m_sight_range);
243  }
244  else
245  {
246  // disabled in global config
247  if (App::gfx_water_mode->getEnum<GfxWaterMode>() != GfxWaterMode::HYDRAX)
248  App::GetCameraManager()->GetCamera()->setFarClipDistance(0); //Unlimited
249  else
250  App::GetCameraManager()->GetCamera()->setFarClipDistance(9999 * 6); //Unlimited for hydrax and stuff
251  }
252 }
253 
255 {
256 #ifdef USE_CAELUM
257  // Caelum skies
258  if (App::gfx_sky_mode->getEnum<GfxSkyMode>() == GfxSkyMode::CAELUM)
259  {
260  m_sky_manager = new SkyManager();
261 
262  // try to load caelum config
263  if (!m_def.caelum_config.empty() && ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(m_def.caelum_config))
264  {
265  // config provided and existing, use it :)
266  m_sky_manager->LoadCaelumScript(m_def.caelum_config, m_def.caelum_fog_start, m_def.caelum_fog_end);
267  }
268  else
269  {
270  // no config provided, fall back to the default one
271  m_sky_manager->LoadCaelumScript("ror_default_sky");
272  }
273  }
274  else
275 #endif //USE_CAELUM
276  // SkyX skies
277  if (App::gfx_sky_mode->getEnum<GfxSkyMode>() == GfxSkyMode::SKYX)
278  {
279  // try to load SkyX config
280  if (!m_def.skyx_config.empty() && ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(m_def.skyx_config))
281  SkyX_manager = new SkyXManager(m_def.skyx_config);
282  else
283  SkyX_manager = new SkyXManager("SkyXDefault.skx");
284  }
285  else
286  {
287  if (!m_def.cubemap_config.empty())
288  {
289  // use custom
290  App::GetGfxScene()->GetSceneManager()->setSkyBox(true, m_def.cubemap_config, 100, true);
291  }
292  else
293  {
294  // use default
295  App::GetGfxScene()->GetSceneManager()->setSkyBox(true, "tracks/skyboxcol", 100, true);
296  }
297  }
298 }
299 
301 {
302  if (App::gfx_sky_mode->getEnum<GfxSkyMode>() == GfxSkyMode::CAELUM)
303  {
304 #ifdef USE_CAELUM
305  m_main_light = m_sky_manager->GetSkyMainLight();
306 #endif
307  }
308  else if (App::gfx_sky_mode->getEnum<GfxSkyMode>() == GfxSkyMode::SKYX)
309  {
310  m_main_light = SkyX_manager->getMainLight();
311  }
312  else
313  {
314  // screw caelum, we will roll our own light
315 
316  // Create a light
317  m_main_light = App::GetGfxScene()->GetSceneManager()->createLight("MainLight");
318  //directional light for shadow
319  m_main_light->setType(Light::LT_DIRECTIONAL);
320  m_main_light->setDirection(Ogre::Vector3(0.785, -0.423, 0.453).normalisedCopy());
321 
322  m_main_light->setDiffuseColour(m_def.ambient_color);
323  m_main_light->setSpecularColour(m_def.ambient_color);
324  m_main_light->setCastShadows(true);
325  m_main_light->setShadowFarDistance(1000.0f);
326  m_main_light->setShadowNearClipDistance(-1);
327  }
328 }
329 
331 {
332  if (m_sight_range >= UNLIMITED_SIGHTRANGE)
333  App::GetGfxScene()->GetSceneManager()->setFog(FOG_NONE);
334  else
335  App::GetGfxScene()->GetSceneManager()->setFog(FOG_LINEAR, m_def.ambient_color, 0.000f, m_sight_range * 0.65f, m_sight_range*0.9);
336 }
337 
339 {
340  switch (App::gfx_vegetation_mode->getEnum<GfxVegetation>())
341  {
343  m_paged_detail_factor = 0.2f;
344  break;
346  m_paged_detail_factor = 0.5f;
347  break;
348  case GfxVegetation::FULL:
349  m_paged_detail_factor = 1.0f;
350  break;
351  default:
352  m_paged_detail_factor = 0.0f;
353  break;
354  }
355 }
356 
358 {
359  // hack
360  // now with extensive error checking
361  if (CompositorManager::getSingleton().hasCompositorChain(App::GetCameraManager()->GetCamera()->getViewport()))
362  {
363  CompositorInstance* co = CompositorManager::getSingleton().getCompositorChain(App::GetCameraManager()->GetCamera()->getViewport())->_getOriginalSceneCompositor();
364  if (co)
365  {
366  CompositionTechnique* ct = co->getTechnique();
367  if (ct)
368  {
369  CompositionTargetPass* ctp = ct->getOutputTargetPass();
370  if (ctp)
371  {
372  CompositionPass* p = ctp->getPass(0);
373  if (p)
374  {
375  p->setClearColour(Ogre::ColourValue::Black);
376  }
377  }
378  }
379  }
380  }
381 }
382 
384 {
385  // disabled in global config
386  if (App::gfx_water_mode->getEnum<GfxWaterMode>() == GfxWaterMode::NONE)
387  return;
388 
389  // disabled in map config
390  if (!m_def.has_water)
391  {
392  return;
393  }
394 
395  if (App::gfx_water_mode->getEnum<GfxWaterMode>() == GfxWaterMode::HYDRAX)
396  {
397  // try to load hydrax config
398  if (!m_def.hydrax_conf_file.empty() && ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(m_def.hydrax_conf_file))
399  {
400  m_hydrax_water = new HydraxWater(m_def.water_height, m_def.hydrax_conf_file);
401  }
402  else
403  {
404  // no config provided, fall back to the default one
405  m_hydrax_water = new HydraxWater(m_def.water_height);
406  }
407 
408  m_water = std::unique_ptr<IWater>(m_hydrax_water);
409 
410  //Apply depth technique to the terrain
411  TerrainGroup::TerrainIterator ti = m_geometry_manager->getTerrainGroup()->getTerrainIterator();
412  while (ti.hasMoreElements())
413  {
414  Ogre::Terrain* t = ti.getNext()->instance;
415  MaterialPtr ptr = t->getMaterial();
416  m_hydrax_water->GetHydrax()->getMaterialManager()->addDepthTechnique(ptr->createTechnique());
417  }
418  }
419  else
420  {
421  m_water = std::unique_ptr<IWater>(new Water(this->getMaxTerrainSize()));
422  m_water->SetStaticWaterHeight(m_def.water_height);
423  m_water->SetWaterBottomHeight(m_def.water_bottom_height);
424  }
425 }
426 
428 {
429  m_shadow_manager = new ShadowManager();
430  m_shadow_manager->loadConfiguration();
431 }
432 
434 {
435  for (std::string tobj_filename : m_def.tobj_files)
436  {
437  m_object_manager->LoadTObjFile(tobj_filename);
438  }
439 }
440 
442 {
443  if (!m_def.traction_map_file.empty())
444  {
445  m_collisions->setupLandUse(m_def.traction_map_file.c_str());
446  }
447 }
448 
450 {
451 #ifdef USE_ANGELSCRIPT
452  // suspend AS logging, so we dont spam the users screen with initialization messages
454 
455  bool loaded = false;
456 
457  for (std::string as_filename : m_def.as_files)
458  {
459  loaded |= this->getObjectManager()->LoadTerrainScript(as_filename);
460  }
461 
462  if (!loaded)
463  {
464  // load a default script that does the most basic things
465  this->getObjectManager()->LoadTerrainScript(DEFAULT_TERRAIN_SCRIPT);
466  }
467 
468  // finally resume AS logging
470 #endif //USE_ANGELSCRIPT
471 }
472 
474 {
475  // Load 'bundled' AI presets - see section `[AI Presets]` in terrn2 file format
476  // ----------------------------------------------------------------------------
477 
479 }
480 
481 void RoR::Terrain::setGravity(float value)
482 {
483  m_cur_gravity = value;
484 }
485 
487 {
488  m_object_manager = new TerrainObjectManager(this);
489 }
490 
492 {
493  return m_collisions->getCollisionAAB();
494 }
495 
497 {
498  if (!m_geometry_manager)
499  return Vector3::ZERO;
500  return m_geometry_manager->getMaxTerrainSize();
501 }
502 
503 float RoR::Terrain::GetHeightAt(float x, float z)
504 {
505  return m_geometry_manager->getHeightAt(x, z);
506 }
507 
508 Ogre::Vector3 RoR::Terrain::GetNormalAt(float x, float y, float z)
509 {
510  return m_geometry_manager->getNormalAt(x, y, z);
511 }
512 
514 {
515  return m_sky_manager;
516 }
517 
519 {
520  if (m_disposed)
521  return false;
522  else
523  return m_geometry_manager->isFlat();
524 }
525 
527 {
528  if (m_object_manager)
529  m_object_manager->LoadTelepoints();
530 }
531 
533 {
534  if (m_object_manager)
535  m_object_manager->LoadPredefinedActors();
536 }
537 
539 {
540  if (m_object_manager)
541  return m_object_manager->HasPredefinedActors();
542  return false;
543 }
544 
546 {
547  return m_object_manager->getProceduralManager();
548 }
549 
551 {
552  return m_cache_entry->fname;
553 }
554 
556 {
557  return m_cache_entry->resource_group;
558 }
559 
560 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)
561 {
562  m_object_manager->m_map_entities.push_back(SurveyMapEntity(type, caption, filename, resource_group, pos, Ogre::Radian(angle), id));
563 }
564 
566 {
567  EraseIf(m_object_manager->m_map_entities, [id](const SurveyMapEntity& e) { return e.id == id; });
568 }
569 
571 {
572  return m_object_manager->m_map_entities;
573 }
574 
575 CacheEntryPtr RoR::Terrain::getCacheEntry() { return m_cache_entry; }
RoR::Terrain::Terrain
Terrain(CacheEntryPtr entry, Terrn2Def def)
Definition: Terrain.cpp:53
RoR::Terrain::initCamera
void initCamera()
Definition: Terrain.cpp:226
RoR::GUIManager::SurveyMap
GUI::SurveyMap SurveyMap
Definition: GUIManager.h:122
SkyXManager.h
y
float y
Definition: (ValueTypes) quaternion.h:6
RoR::Terrn2Def
Definition: Terrn2FileFormat.h:48
RoR::Terrain::fixCompositorClearColor
void fixCompositorClearColor()
Definition: Terrain.cpp:357
RoR::Terrain::getMaxTerrainSize
Ogre::Vector3 getMaxTerrainSize()
Definition: Terrain.cpp:496
RoR::App::GetCameraManager
CameraManager * GetCameraManager()
Definition: Application.cpp:275
RoR::App::GetGuiManager
GUIManager * GetGuiManager()
Definition: Application.cpp:269
RoR::Collisions
Definition: Collisions.h:80
RoR::Terrain::initScripting
void initScripting()
Definition: Terrain.cpp:449
RoR::TerrainObjectManager
Definition: TerrainObjectManager.h:49
RoR::Terrain::initShadows
void initShadows()
Definition: Terrain.cpp:427
z
float z
Definition: (ValueTypes) quaternion.h:7
SkyManager.h
Renderdash.h
ContentManager.h
RoR::Terrain::getTerrainFileResourceGroup
std::string getTerrainFileResourceGroup()
Definition: Terrain.cpp:555
RoR::Terrain::isFlat
bool isFlat()
Definition: Terrain.cpp:518
RoR::Terrain::getSkyManager
SkyManager * getSkyManager()
Definition: Terrain.cpp:513
TerrainGeometryManager.h
RoR::Terrain::setGravity
void setGravity(float value)
Definition: Terrain.cpp:481
RoR::ShadowManager
Definition: ShadowManager.h:51
RoR::HydraxWater
Definition: HydraxWater.h:34
RoR::Terrain::~Terrain
virtual ~Terrain() override
Definition: Terrain.cpp:70
RoR::GfxScene::CreateDustPools
void CreateDustPools()
Definition: GfxScene.cpp:49
RoR::GfxWaterMode::NONE
@ NONE
None.
RoR::ScriptEngine::setForwardScriptLogToConsole
void setForwardScriptLogToConsole(bool doForward)
Definition: ScriptEngine.cpp:982
DEFAULT_TERRAIN_SCRIPT
#define DEFAULT_TERRAIN_SCRIPT
Definition: ScriptEngine.h:30
RoR::Water
Definition: Water.h:40
RoR::Terrain::initSkySubSystem
void initSkySubSystem()
Definition: Terrain.cpp:254
RoR::CameraManager::GetCameraNode
Ogre::SceneNode * GetCameraNode()
Definition: CameraManager.h:63
RoR::Terrain::getTerrainCollisionAAB
Ogre::AxisAlignedBox getTerrainCollisionAAB()
Definition: Terrain.cpp:491
Utils.h
Language.h
RoR::GUI::TopMenubar::LoadBundledAiPresets
void LoadBundledAiPresets(TerrainPtr terrain)
Loads JSON files from [AI Presets] section in .terrn2 file format.
Definition: GUI_TopMenubar.cpp:2364
TerrainObjectManager.h
RefCountingObjectPtr< CacheEntry >
GUIManager.h
ActorManager.h
RoR::Terrain::getProceduralManager
ProceduralManagerPtr getProceduralManager()
Definition: Terrain.cpp:545
Actor.h
RoR::App::GetScriptEngine
ScriptEngine * GetScriptEngine()
Definition: Application.cpp:279
RoR::GUIManager::LoadingWindow
GUI::LoadingWindow LoadingWindow
Definition: GUIManager.h:119
RoR::GfxScene::GetSceneManager
Ogre::SceneManager * GetSceneManager()
Definition: GfxScene.h:64
RoR::Terrain::getTerrainFileName
std::string getTerrainFileName()
Definition: Terrain.cpp:550
GUI_SurveyMap.h
RoR::Terrain::GetHeightAt
float GetHeightAt(float x, float z)
Definition: Terrain.cpp:503
RoR::Terrain::GetNormalAt
Ogre::Vector3 GetNormalAt(float x, float y, float z)
Definition: Terrain.cpp:508
RoR::SCRIPTUNITID_INVALID
static const ScriptUnitId_t SCRIPTUNITID_INVALID
Definition: ForwardDeclarations.h:41
RoR::SurveyMapEntityVec
std::vector< SurveyMapEntity > SurveyMapEntityVec
Definition: SurveyMapEntity.h:56
RoR::CameraManager::GetCamera
Ogre::Camera * GetCamera()
Definition: CameraManager.h:64
RoR::Terrain::addSurveyMapEntity
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)
Definition: Terrain.cpp:560
RoR::Terrain::initLight
void initLight()
Definition: Terrain.cpp:300
RoR::GfxSkyMode::CAELUM
@ CAELUM
Caelum (best looking, slower)
RoR::ScriptEngine::unloadScript
void unloadScript(ScriptUnitId_t unique_id)
Unloads a script.
Definition: ScriptEngine.cpp:964
RoR::Terrain::initAiPresets
void initAiPresets()
Definition: Terrain.cpp:473
GUI_LoadingWindow.h
CacheSystem.h
A database of user-installed content alias 'mods' (vehicles, terrains...)
ScriptEngine.h
RoR::App::app_state
CVar * app_state
Definition: Application.cpp:79
RoR::Terrain::getSurveyMapEntities
SurveyMapEntityVec & getSurveyMapEntities()
Definition: Terrain.cpp:570
RoR::App::sim_terrain_name
CVar * sim_terrain_name
Definition: Application.cpp:97
GfxScene.h
RoR::Terrain::initFog
void initFog()
Definition: Terrain.cpp:330
RoR::GfxVegetation::FULL
@ FULL
RoR::Terrain::LoadPredefinedActors
void LoadPredefinedActors()
Definition: Terrain.cpp:532
RoR::Terrain::dispose
void dispose()
Definition: Terrain.cpp:78
RoR::App::gfx_water_mode
CVar * gfx_water_mode
Definition: Application.cpp:224
RoR::AppState::SHUTDOWN
@ SHUTDOWN
RoR::GUI::SurveyMap::CreateTerrainTextures
void CreateTerrainTextures()
Definition: GUI_SurveyMap.cpp:440
RoR::App::gfx_sky_mode
CVar * gfx_sky_mode
Definition: Application.cpp:219
RoR::GUIManager::TopMenubar
GUI::TopMenubar TopMenubar
Definition: GUIManager.h:120
RoR::App::gfx_sight_range
CVar * gfx_sight_range
Definition: Application.cpp:236
ShadowManager.h
RoR::Terrain::initTerrainCollisions
void initTerrainCollisions()
Definition: Terrain.cpp:441
RoR::GfxSkyMode::SKYX
@ SKYX
SkyX (best looking, slower)
RoR::Terrain::initialize
bool initialize()
Definition: Terrain.cpp:145
_L
#define _L
Definition: ErrorUtils.cpp:34
RoR::Terrain::loadTerrainObjects
void loadTerrainObjects()
Definition: Terrain.cpp:433
RoR::Terrain::LoadTelepoints
void LoadTelepoints()
Definition: Terrain.cpp:526
RoR::Terrain::getCacheEntry
CacheEntryPtr getCacheEntry()
Definition: Terrain.cpp:575
RoR::EraseIf
void EraseIf(std::vector< T, A > &c, Predicate pred)
Definition: Utils.h:74
RoR::Terrain::initVegetation
void initVegetation()
Definition: Terrain.cpp:338
Terrain.h
Ogre
Definition: ExtinguishableFireAffector.cpp:35
DEFAULT_GRAVITY
static const float DEFAULT_GRAVITY
earth gravity
Definition: SimConstants.h:50
RoR::CVar::getInt
int getInt() const
Definition: CVar.h:97
RoR::App::sim_terrain_gui_name
CVar * sim_terrain_gui_name
Definition: Application.cpp:98
RoR::App::gfx_vegetation_mode
CVar * gfx_vegetation_mode
Definition: Application.cpp:223
RoR::Terrain::delSurveyMapEntities
void delSurveyMapEntities(int id)
Definition: Terrain.cpp:565
Collisions.h
RoR::Terrain::initWater
void initWater()
Definition: Terrain.cpp:383
RoR::TerrainGeometryManager
this class handles all interactions with the Ogre Terrain system
Definition: TerrainGeometryManager.h:38
RoR::SurveyMapEntity
Definition: SurveyMapEntity.h:35
RoR
Definition: AppContext.h:36
RoR::Terrain::initObjects
void initObjects()
Definition: Terrain.cpp:486
x
float x
Definition: (ValueTypes) quaternion.h:5
Water.h
RoR::App::GetGfxScene
GfxScene * GetGfxScene()
Definition: Application.cpp:276
RoR::CVar::setStr
void setStr(std::string const &str)
Definition: CVar.h:83
RoR::GfxVegetation::x20PERC
@ x20PERC
HydraxWater.h
RoR::SkyXManager
Definition: SkyXManager.h:32
RoR::GfxVegetation::x50PERC
@ x50PERC
RoR::GfxWaterMode::HYDRAX
@ HYDRAX
HydraX.
RoR::Terrain::HasPredefinedActors
bool HasPredefinedActors()
Definition: Terrain.cpp:538