59 bool LoadModel(
const std::string& fileName,
bool mirrored);
65 bool AddModelCopy(
const std::string& fileName,
bool mirrored,
int objRank);
68 bool IsModelLoaded(
const std::string& fileName,
bool mirrored);
77 void UnloadModel(
const std::string& fileName,
bool mirrored);
86 void Mirror(std::vector<ModelTriangle>& triangles);
91 std::vector<ModelTriangle> triangles;
99 inline FileInfo(
const std::string& _fileName,
bool _mirrored)
100 : fileName(_fileName)
101 , mirrored(_mirrored)
104 inline bool operator<(
const FileInfo& other)
const
106 int compare = fileName.compare(other.fileName);
112 return !mirrored && mirrored != other.mirrored;
115 std::map<FileInfo, ModelInfo> m_models;
116 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:27
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:42
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
Manager for static models.
Definition: modelmanager.h:52
The graphics engine.
Definition: engine.h:682
3D (3x1) vector
Definition: vector.h:49
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