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

#include <TerrainObjectManager.h>

+ Collaboration diagram for RoR::TerrainObjectManager:

Data Structures

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

Public Member Functions

 TerrainObjectManager (Terrain *terrainManager)
 
 ~TerrainObjectManager ()
 
std::vector< EditorObject > & GetEditorObjects ()
 
std::vector< MapEntity > & GetMapEntities ()
 
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)
 
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 ()
 

Protected Member Functions

RoR::ODefFileFetchODef (std::string const &odef_name)
 
void ProcessODefCollisionBoxes (StaticObject *obj, ODefFile *odef, const EditorObject &params)
 
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
 
std::vector< MapEntitym_map_entities
 
TerrainterrainManager
 
ProceduralManagerPtr m_procedural_manager
 
int m_entity_counter = 0
 
std::string m_resource_group
 

Detailed Description

Definition at line 49 of file TerrainObjectManager.h.

Constructor & Destructor Documentation

◆ TerrainObjectManager()

TerrainObjectManager::TerrainObjectManager ( Terrain terrainManager)

Definition at line 65 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

◆ ~TerrainObjectManager()

TerrainObjectManager::~TerrainObjectManager ( )

Definition at line 76 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 499 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 79 of file TerrainObjectManager.h.

+ Here is the caller graph for this function:

◆ GetLocalizers()

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

Definition at line 120 of file TerrainObjectManager.h.

◆ GetMapEntities()

std::vector<MapEntity>& RoR::TerrainObjectManager::GetMapEntities ( )
inline

Definition at line 80 of file TerrainObjectManager.h.

◆ getProceduralManager()

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

Definition at line 122 of file TerrainObjectManager.h.

◆ HasPredefinedActors()

bool RoR::TerrainObjectManager::HasPredefinedActors ( )
inline

Definition at line 87 of file TerrainObjectManager.h.

◆ LoadPredefinedActors()

void TerrainObjectManager::LoadPredefinedActors ( )

Definition at line 916 of file TerrainObjectManager.cpp.

+ Here is the call graph for this function:

◆ LoadTelepoints()

void TerrainObjectManager::LoadTelepoints ( )

Definition at line 908 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 541 of file TerrainObjectManager.cpp.

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

◆ LoadTObjFile()

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

Definition at line 150 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 453 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 380 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 
)
protected

Definition at line 950 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 255 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 469 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 890 of file TerrainObjectManager.cpp.

+ Here is the caller graph for this function:

◆ UpdateTerrainObjects()

bool TerrainObjectManager::UpdateTerrainObjects ( float  dt)

Definition at line 937 of file TerrainObjectManager.cpp.

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

Field Documentation

◆ localizers

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

Definition at line 165 of file TerrainObjectManager.h.

◆ m_animated_objects

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

Definition at line 170 of file TerrainObjectManager.h.

◆ m_editor_objects

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

Definition at line 168 of file TerrainObjectManager.h.

◆ m_entity_counter

int RoR::TerrainObjectManager::m_entity_counter = 0
protected

Definition at line 175 of file TerrainObjectManager.h.

◆ m_map_entities

std::vector<MapEntity> RoR::TerrainObjectManager::m_map_entities
protected

Definition at line 172 of file TerrainObjectManager.h.

◆ m_mesh_objects

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

Definition at line 171 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 166 of file TerrainObjectManager.h.

◆ m_predefined_actors

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

Definition at line 169 of file TerrainObjectManager.h.

◆ m_procedural_manager

ProceduralManagerPtr RoR::TerrainObjectManager::m_procedural_manager
protected

Definition at line 174 of file TerrainObjectManager.h.

◆ m_resource_group

std::string RoR::TerrainObjectManager::m_resource_group
protected

Definition at line 176 of file TerrainObjectManager.h.

◆ m_static_objects

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

Definition at line 167 of file TerrainObjectManager.h.

◆ terrainManager

Terrain* RoR::TerrainObjectManager::terrainManager
protected

Definition at line 173 of file TerrainObjectManager.h.


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