24 #include "graphics/model/model_triangle.h" 61 bool LoadModel(
const std::string& fileName,
bool mirrored,
int variant = 0);
64 bool AddModelReference(
const std::string& fileName,
bool mirrored,
int objRank,
int variant = 0);
67 bool AddModelCopy(
const std::string& fileName,
bool mirrored,
int objRank,
int variant = 0);
70 bool IsModelLoaded(
const std::string& fileName,
bool mirrored,
int variant = 0);
79 void UnloadModel(
const std::string& fileName,
bool mirrored,
int variant = 0);
85 void Mirror(std::vector<ModelTriangle>& triangles);
87 void ChangeVariant(std::vector<ModelTriangle>& triangles,
int variant);
92 std::vector<ModelTriangle> triangles;
101 inline FileInfo(
const std::string& _fileName,
bool _mirrored,
int _variant = 0)
102 : fileName(_fileName)
103 , mirrored(_mirrored)
107 inline bool operator<(
const FileInfo& other)
const 109 int compare = fileName.compare(other.fileName);
115 if (variant < other.variant)
118 return !mirrored && mirrored != other.mirrored;
121 std::map<FileInfo, ModelInfo> m_models;
122 std::vector<int> m_copiesBaseRanks;
void ChangeVariant(std::vector< ModelTriangle > &triangles, int variant)
Changes variant.
Definition: oldmodelmanager.cpp:186
bool AddModelCopy(const std::string &fileName, bool mirrored, int objRank, int variant=0)
Adds an instance of model to the given object rank as a copy (copied base object) ...
Definition: oldmodelmanager.cpp:105
void UnloadModel(const std::string &fileName, bool mirrored, int variant=0)
Unloads the given model.
Definition: oldmodelmanager.cpp:149
CSingleton base class for singletons.
int GetModelBaseObjRank(const std::string &fileName, bool mirrored, int variant=0)
Returns the rank of base engine object of given loaded model.
Definition: oldmodelmanager.cpp:130
void Mirror(std::vector< ModelTriangle > &triangles)
Mirrors the model along the Z axis.
Definition: oldmodelmanager.cpp:168
Manager for static models.
Definition: oldmodelmanager.h:54
void UnloadAllModels()
Unloads all models.
Definition: oldmodelmanager.cpp:160
void DeleteAllModelCopies()
Deletes all copied objects.
Definition: oldmodelmanager.cpp:139
bool IsModelLoaded(const std::string &fileName, bool mirrored, int variant=0)
Returns true if given model is loaded.
Definition: oldmodelmanager.cpp:125
Namespace for (new) graphics code.
Definition: app.h:49
The graphics engine.
Definition: engine.h:585
bool LoadModel(const std::string &fileName, bool mirrored, int variant=0)
Loads a model from given file.
Definition: oldmodelmanager.cpp:48
bool AddModelReference(const std::string &fileName, bool mirrored, int objRank, int variant=0)
Adds an instance of model to the given object rank as a reference to base object. ...
Definition: oldmodelmanager.cpp:89