Colobot
Public Member Functions | Protected Attributes | List of all members
Gfx::CModelFile Class Reference

Model file reader/writer. More...

#include <modelfile.h>

Public Member Functions

bool ReadTextModel (const std::string &fileName)
 Reads a model in text format from file.
 
bool ReadTextModel (std::istream &stream)
 Reads a model in text format from stream.
 
bool WriteTextModel (const std::string &fileName)
 Writes the model in text format to a file.
 
bool WriteTextModel (std::ostream &stream)
 Writes the model in text format to a stream.
 
bool ReadBinaryModel (const std::string &fileName)
 Reads a model in new binary format from file.
 
bool ReadBinaryModel (std::istream &stream)
 Reads a model in new binary format from stream.
 
bool WriteBinaryModel (const std::string &fileName)
 Writes the model in binary format to a file.
 
bool WriteBinaryModel (std::ostream &stream)
 Writes the model in binary format to a stream.
 
bool ReadModel (const std::string &fileName)
 
bool ReadModel (std::istream &stream)
 
bool WriteModel (const std::string &fileName)
 
bool WriteModel (std::ostream &stream)
 
int GetTriangleCount ()
 Returns the number of triangles in model.
 
const std::vector< ModelTriangle > & GetTriangles ()
 Returns the triangle vector.
 
void SetPrintDebugInfo (bool printDebugInfo)
 Controls printing of debug information.
 

Protected Member Functions

LODLevel MinMaxToLodLevel (float min, float max)
 
void LODLevelToMinMax (LODLevel lodLevel, float &min, float &max)
 

Protected Attributes

std::vector< ModelTrianglem_triangles
 Model triangles.
 
bool m_printDebugInfo
 

Detailed Description

Model file reader/writer.

Allows reading and writing model objects. Models are collections of ModelTriangle structs.

Member Function Documentation

LODLevel Gfx::CModelFile::MinMaxToLodLevel ( float  min,
float  max 
)
protected
Deprecated:
min, max conversions
bool Gfx::CModelFile::ReadModel ( const std::string &  fileName)

Reads a binary Colobot model from file

Deprecated:
bool Gfx::CModelFile::ReadModel ( std::istream &  stream)

Reads a binary Colobot model from stream

Deprecated:
bool Gfx::CModelFile::WriteModel ( const std::string &  fileName)

Writes the model to Colobot binary model file

Deprecated:
bool Gfx::CModelFile::WriteModel ( std::ostream &  stream)

Writes the model to Colobot binary model file

Deprecated:

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