61 bool LoadModel(
const std::string& fileName,
bool mirrored);
67 bool AddModelCopy(
const std::string& fileName,
bool mirrored,
int objRank);
70 bool IsModelLoaded(
const std::string& fileName,
bool mirrored);
79 void UnloadModel(
const std::string& fileName,
bool mirrored);
88 void Mirror(std::vector<ModelTriangle>& triangles);
93 std::vector<ModelTriangle> triangles;
101 inline FileInfo(
const std::string& _fileName,
bool _mirrored)
102 : fileName(_fileName)
103 , mirrored(_mirrored)
106 inline bool operator<(
const FileInfo& other)
const
108 int compare = fileName.compare(other.fileName);
114 return !mirrored && mirrored != other.mirrored;
117 std::map<FileInfo, ModelInfo> m_models;
118 std::vector<int> m_copiesBaseRanks;
CSingleton base class for singletons.
float GetHeight(std::vector< ModelTriangle > &triangles, Math::Vector pos)
Returns the height of model – closest point to X and Z coords of pos.
Definition: modelmanager.cpp:201
Definition: singleton.h:30
void DeleteAllModelCopies()
Deletes all copied objects.
Definition: modelmanager.cpp:154
bool LoadModel(const std::string &fileName, bool mirrored)
Loads a model from given file.
Definition: modelmanager.cpp:43
bool IsModelLoaded(const std::string &fileName, bool mirrored)
Returns true if given model is loaded.
Definition: modelmanager.cpp:140
Model loading - CModelFile class (aka modfile)
int GetModelBaseObjRank(const std::string &fileName, bool mirrored)
Returns the rank of base engine object of given loaded model.
Definition: modelmanager.cpp:145
bool AddModelCopy(const std::string &fileName, bool mirrored, int objRank)
Adds an instance of model to the given object rank as a copy (copied base object) ...
Definition: modelmanager.cpp:120
void UnloadAllModels()
Unloads all models.
Definition: modelmanager.cpp:175
Namespace for (new) graphics code.
Definition: app.h:49
Manager for static models.
Definition: modelmanager.h:54
The graphics engine.
Definition: engine.h:684
3D (3x1) vector
Definition: vector.h:52
void UnloadModel(const std::string &fileName, bool mirrored)
Unloads the given model.
Definition: modelmanager.cpp:164
void Mirror(std::vector< ModelTriangle > &triangles)
Mirrors the model along the Z axis.
Definition: modelmanager.cpp:183
bool AddModelReference(const std::string &fileName, bool mirrored, int objRank)
Adds an instance of model to the given object rank as a reference to base object. ...
Definition: modelmanager.cpp:104