RigsofRods
Soft-body Physics Simulation
Data Structures | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
RoR::TerrainObjectManager Class Reference

#include <TerrainObjectManager.h>

+ Collaboration diagram for RoR::TerrainObjectManager:

Data Structures

struct  AnimatedObject
 
struct  EditorObject
 
struct  localizer_t
 
struct  object_t
 
struct  PredefinedActor
 
struct  StaticObject
 

Public Member Functions

 TerrainObjectManager (Terrain *terrainManager)
 
 ~TerrainObjectManager ()
 
std::vector< EditorObject > & GetEditorObjects ()
 
void LoadTObjFile (Ogre::String filename)
 
bool LoadTerrainObject (const Ogre::String &name, const Ogre::Vector3 &pos, const Ogre::Vector3 &rot, const Ogre::String &instancename, const Ogre::String &type, float rendering_distance=0, bool enable_collisions=true, int scripthandler=-1, bool uniquifyMaterial=false)
 
bool LoadTerrainScript (const Ogre::String &filename)
 
void MoveObjectVisuals (const Ogre::String &instancename, const Ogre::Vector3 &pos)
 
void unloadObject (const Ogre::String &instancename)
 
void LoadTelepoints ()
 
void LoadPredefinedActors ()
 
bool HasPredefinedActors ()
 
bool UpdateTerrainObjects (float dt)
 
void ProcessTree (float yawfrom, float yawto, float scalefrom, float scaleto, char *ColorMap, char *DensityMap, char *treemesh, char *treeCollmesh, float gridspacing, float highdens, int minDist, int maxDist, int mapsizex, int mapsizez)
 
void ProcessGrass (float SwaySpeed, float SwayLength, float SwayDistribution, float Density, float minx, float miny, float minH, float maxx, float maxy, float maxH, char *grassmat, char *colorMapFilename, char *densityMapFilename, int growtechnique, int techn, int range, int mapsizex, int mapsizez)
 
std::vector< localizer_tGetLocalizers ()
 
ProceduralManagerPtrgetProceduralManager ()
 
Ogre::SceneNode * getGroupingSceneNode ()
 

Protected Member Functions

RoR::ODefFileFetchODef (std::string const &odef_name)
 
void ProcessODefCollisionBoxes (StaticObject *obj, ODefFile *odef, const EditorObject &params, bool race_event)
 
bool UpdateAnimatedObjects (float dt)
 

Protected Attributes

std::vector< localizer_tlocalizers
 
std::unordered_map< std::string, std::shared_ptr< RoR::ODefFile > > m_odef_cache
 
std::map< std::string, StaticObjectm_static_objects
 
std::vector< EditorObjectm_editor_objects
 
std::vector< PredefinedActorm_predefined_actors
 
std::vector< AnimatedObjectm_animated_objects
 
std::vector< MeshObject * > m_mesh_objects
 
SurveyMapEntityVec m_map_entities
 
TerrainterrainManager
 
ProceduralManagerPtr m_procedural_manager
 
int m_entity_counter = 0
 
Ogre::SceneNode * m_terrn2_grouping_node = nullptr
 For a readable scene graph (via inspector script) More...
 
Ogre::SceneNode * m_tobj_grouping_node = nullptr
 For even more readable scene graph (via inspector script) More...
 
Ogre::SceneNode * m_angelscript_grouping_node = nullptr
 For even more readable scene graph (via inspector script) More...
 

Friends

class Terrain
 

Detailed Description

Definition at line 49 of file TerrainObjectManager.h.

Constructor & Destructor Documentation

◆ TerrainObjectManager()

TerrainObjectManager::TerrainObjectManager ( Terrain terrainManager)

Definition at line 67 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

◆ ~TerrainObjectManager()

TerrainObjectManager::~TerrainObjectManager ( )

Definition at line 75 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ FetchODef()

ODefFile * TerrainObjectManager::FetchODef ( std::string const &  odef_name)
protected

Definition at line 535 of file TerrainObjectManager.cpp.

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

◆ GetEditorObjects()

std::vector<EditorObject>& RoR::TerrainObjectManager::GetEditorObjects ( )
inline

Definition at line 71 of file TerrainObjectManager.h.

+ Here is the caller graph for this function:

◆ getGroupingSceneNode()

Ogre::SceneNode * TerrainObjectManager::getGroupingSceneNode ( )

Definition at line 1055 of file TerrainObjectManager.cpp.

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

◆ GetLocalizers()

std::vector<localizer_t> RoR::TerrainObjectManager::GetLocalizers ( )
inline

Definition at line 112 of file TerrainObjectManager.h.

◆ getProceduralManager()

ProceduralManagerPtr& RoR::TerrainObjectManager::getProceduralManager ( )
inline

Definition at line 114 of file TerrainObjectManager.h.

◆ HasPredefinedActors()

bool RoR::TerrainObjectManager::HasPredefinedActors ( )
inline

Definition at line 79 of file TerrainObjectManager.h.

◆ LoadPredefinedActors()

void TerrainObjectManager::LoadPredefinedActors ( )

Definition at line 988 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

◆ LoadTelepoints()

void TerrainObjectManager::LoadTelepoints ( )

Definition at line 980 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

◆ LoadTerrainObject()

bool TerrainObjectManager::LoadTerrainObject ( const Ogre::String &  name,
const Ogre::Vector3 &  pos,
const Ogre::Vector3 &  rot,
const Ogre::String &  instancename,
const Ogre::String &  type,
float  rendering_distance = 0,
bool  enable_collisions = true,
int  scripthandler = -1,
bool  uniquifyMaterial = false 
)

Definition at line 577 of file TerrainObjectManager.cpp.

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

◆ LoadTerrainScript()

bool TerrainObjectManager::LoadTerrainScript ( const Ogre::String &  filename)

Definition at line 951 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

◆ LoadTObjFile()

void TerrainObjectManager::LoadTObjFile ( Ogre::String  filename)

Definition at line 149 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

◆ MoveObjectVisuals()

void TerrainObjectManager::MoveObjectVisuals ( const Ogre::String &  instancename,
const Ogre::Vector3 &  pos 
)

Definition at line 489 of file TerrainObjectManager.cpp.

+ Here is the caller graph for this function:

◆ ProcessGrass()

void TerrainObjectManager::ProcessGrass ( float  SwaySpeed,
float  SwayLength,
float  SwayDistribution,
float  Density,
float  minx,
float  miny,
float  minH,
float  maxx,
float  maxy,
float  maxH,
char *  grassmat,
char *  colorMapFilename,
char *  densityMapFilename,
int  growtechnique,
int  techn,
int  range,
int  mapsizex,
int  mapsizez 
)

Definition at line 416 of file TerrainObjectManager.cpp.

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

◆ ProcessODefCollisionBoxes()

void TerrainObjectManager::ProcessODefCollisionBoxes ( StaticObject obj,
ODefFile odef,
const EditorObject params,
bool  race_event 
)
protected

Definition at line 1022 of file TerrainObjectManager.cpp.

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

◆ ProcessTree()

void TerrainObjectManager::ProcessTree ( float  yawfrom,
float  yawto,
float  scalefrom,
float  scaleto,
char *  ColorMap,
char *  DensityMap,
char *  treemesh,
char *  treeCollmesh,
float  gridspacing,
float  highdens,
int  minDist,
int  maxDist,
int  mapsizex,
int  mapsizez 
)

Definition at line 291 of file TerrainObjectManager.cpp.

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

◆ unloadObject()

void TerrainObjectManager::unloadObject ( const Ogre::String &  instancename)

Definition at line 505 of file TerrainObjectManager.cpp.

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

◆ UpdateAnimatedObjects()

bool TerrainObjectManager::UpdateAnimatedObjects ( float  dt)
protected

Definition at line 962 of file TerrainObjectManager.cpp.

+ Here is the caller graph for this function:

◆ UpdateTerrainObjects()

bool TerrainObjectManager::UpdateTerrainObjects ( float  dt)

Definition at line 1009 of file TerrainObjectManager.cpp.

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

Friends And Related Function Documentation

◆ Terrain

friend class Terrain
friend

Definition at line 51 of file TerrainObjectManager.h.

Field Documentation

◆ localizers

std::vector<localizer_t> RoR::TerrainObjectManager::localizers
protected

Definition at line 158 of file TerrainObjectManager.h.

◆ m_angelscript_grouping_node

Ogre::SceneNode* RoR::TerrainObjectManager::m_angelscript_grouping_node = nullptr
protected

For even more readable scene graph (via inspector script)

Definition at line 171 of file TerrainObjectManager.h.

◆ m_animated_objects

std::vector<AnimatedObject> RoR::TerrainObjectManager::m_animated_objects
protected

Definition at line 163 of file TerrainObjectManager.h.

◆ m_editor_objects

std::vector<EditorObject> RoR::TerrainObjectManager::m_editor_objects
protected

Definition at line 161 of file TerrainObjectManager.h.

◆ m_entity_counter

int RoR::TerrainObjectManager::m_entity_counter = 0
protected

Definition at line 168 of file TerrainObjectManager.h.

◆ m_map_entities

SurveyMapEntityVec RoR::TerrainObjectManager::m_map_entities
protected

Definition at line 165 of file TerrainObjectManager.h.

◆ m_mesh_objects

std::vector<MeshObject*> RoR::TerrainObjectManager::m_mesh_objects
protected

Definition at line 164 of file TerrainObjectManager.h.

◆ m_odef_cache

std::unordered_map<std::string, std::shared_ptr<RoR::ODefFile> > RoR::TerrainObjectManager::m_odef_cache
protected

Definition at line 159 of file TerrainObjectManager.h.

◆ m_predefined_actors

std::vector<PredefinedActor> RoR::TerrainObjectManager::m_predefined_actors
protected

Definition at line 162 of file TerrainObjectManager.h.

◆ m_procedural_manager

ProceduralManagerPtr RoR::TerrainObjectManager::m_procedural_manager
protected

Definition at line 167 of file TerrainObjectManager.h.

◆ m_static_objects

std::map<std::string, StaticObject> RoR::TerrainObjectManager::m_static_objects
protected

Definition at line 160 of file TerrainObjectManager.h.

◆ m_terrn2_grouping_node

Ogre::SceneNode* RoR::TerrainObjectManager::m_terrn2_grouping_node = nullptr
protected

For a readable scene graph (via inspector script)

Definition at line 169 of file TerrainObjectManager.h.

◆ m_tobj_grouping_node

Ogre::SceneNode* RoR::TerrainObjectManager::m_tobj_grouping_node = nullptr
protected

For even more readable scene graph (via inspector script)

Definition at line 170 of file TerrainObjectManager.h.

◆ terrainManager

Terrain* RoR::TerrainObjectManager::terrainManager
protected

Definition at line 166 of file TerrainObjectManager.h.


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