123 bool ReadModel(
const std::string &fileName);
147 void LODLevelToMinMax(
LODLevel lodLevel,
float& min,
float& max);
153 bool m_printDebugInfo;
int GetTriangleCount()
Returns the number of triangles in model.
Definition: modelfile.cpp:1202
int state
Rendering state to be set.
Definition: modelfile.h:78
void SetPrintDebugInfo(bool printDebugInfo)
Controls printing of debug information.
Definition: modelfile.cpp:1207
std::vector< ModelTriangle > m_triangles
Model triangles.
Definition: modelfile.h:152
bool variableTex2
If true, 2nd texture will be taken from current engine setting.
Definition: modelfile.h:74
Vertex with secondary texture coordinates.
Definition: vertex.h:109
Material material
Material.
Definition: modelfile.h:68
const std::vector< ModelTriangle > & GetTriangles()
Returns the triangle vector.
Definition: modelfile.cpp:1197
triangle is visible at farthest distance (lowest quality)
Definition: modelfile.h:50
triangle is visible at closest distance (highest quality)
Definition: modelfile.h:52
LODLevel
Level-of-detail.
Definition: modelfile.h:47
bool ReadBinaryModel(const std::string &fileName)
Reads a model in new binary format from file.
Definition: modelfile.cpp:1021
Material of a surface.
Definition: material.h:41
triangle is always visible, no matter at what distance
Definition: modelfile.h:49
VertexTex2 p3
3rd vertex
Definition: modelfile.h:66
bool WriteBinaryModel(const std::string &fileName)
Writes the model in binary format to a file.
Definition: modelfile.cpp:1126
bool WriteModel(const std::string &fileName)
Definition: modelfile.cpp:644
VertexTex2 p2
2nd vertex
Definition: modelfile.h:64
bool WriteTextModel(const std::string &fileName)
Writes the model in text format to a file.
Definition: modelfile.cpp:939
triangle is visible at medium distance (medium quality)
Definition: modelfile.h:51
Vector struct and related functions.
bool ReadModel(const std::string &fileName)
Definition: modelfile.cpp:431
Triangle of a 3D model.
Definition: modelfile.h:59
LODLevel lodLevel
LOD level.
Definition: modelfile.h:76
LODLevel MinMaxToLodLevel(float min, float max)
Definition: modelfile.cpp:724
std::string tex2Name
Name of 2nd texture.
Definition: modelfile.h:72
std::string tex1Name
Name of 1st texture.
Definition: modelfile.h:70
bool ReadTextModel(const std::string &fileName)
Reads a model in text format from file.
Definition: modelfile.cpp:824
VertexTex2 p1
1st vertex
Definition: modelfile.h:62
Model file reader/writer.
Definition: modelfile.h:95