mElite
1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
|
Loads objects as meshes (i.e. triangle list) from 3ds files. More...
#include <ObjectLoader3ds.h>
Public Member Functions | |
ObjectLoader3ds () | |
~ObjectLoader3ds () | |
bool | LoadModel (const char *fileName) |
void | ReadSubChunk (FILE *fp, stChunk *pChunk) |
void | MoveToNextChunk (FILE *fp, stChunk *pChunk) |
size_t | GetNextString (FILE *fp, char *str) |
void | ReadChunk (FILE *fp, stChunk *pChunk) |
void | ReadMaterials (FILE *fp, stChunk *pChunk) |
void | ReadDiffuse (FILE *fp, stChunk *pChunk) |
void | ReadAmbient (FILE *fp, stChunk *pChunk) |
void | ReadSpecular (FILE *fp, stChunk *pChunk) |
void | ReadMeshMaterials (FILE *fp, stChunk *pChunk) |
void | ReadFaces (FILE *fp, stChunk *pChunk) |
void | ReadVertices (FILE *fp, stChunk *pChunk) |
Reads the list of vertices. | |
void | ReadTexCoords (FILE *fp, stChunk *pChunk) |
Reads texture coordinates from a file. Everything else but textures is skipped. | |
void | shutdown () |
releases all created objects after all meshes have been loaded and processed. | |
Public Attributes | |
std::vector< stMesh > | meshList |
std::vector< stMaterial > | materialList |
int | totalMeshes |
int | totalMaterials |
Loads objects as meshes (i.e. triangle list) from 3ds files.
A loader that skips through the recoursively defined 3ds files. All unknown chunks are ignored, and only meshes are extracted. The meshes may contain texture coordinates and material information, such as color.
Definition at line 114 of file ObjectLoader3ds.h.
ObjectLoader3ds::ObjectLoader3ds | ( | ) |
Definition at line 14 of file ObjectLoader3ds.cpp.
ObjectLoader3ds::~ObjectLoader3ds | ( | ) |
Definition at line 18 of file ObjectLoader3ds.cpp.
size_t ObjectLoader3ds::GetNextString | ( | FILE * | fp, |
char * | str | ||
) |
Definition at line 210 of file ObjectLoader3ds.cpp.
bool ObjectLoader3ds::LoadModel | ( | const char * | fileName | ) |
Definition at line 22 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::MoveToNextChunk | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 202 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadAmbient | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 277 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadChunk | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 229 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadDiffuse | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 243 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadFaces | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 376 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadMaterials | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
void ObjectLoader3ds::ReadMeshMaterials | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 342 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadSpecular | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 311 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadSubChunk | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Definition at line 80 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadTexCoords | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Reads texture coordinates from a file. Everything else but textures is skipped.
[in,out] | fp | pointer to the file |
[in,out] | pChunk | pointer to the current chunk |
Definition at line 449 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::ReadVertices | ( | FILE * | fp, |
stChunk * | pChunk | ||
) |
Reads the list of vertices.
[in,out] | fp | pointer to the file |
[in,out] | pChunk | pointer to the current chunk |
Definition at line 418 of file ObjectLoader3ds.cpp.
void ObjectLoader3ds::shutdown | ( | ) |
releases all created objects after all meshes have been loaded and processed.
Definition at line 475 of file ObjectLoader3ds.cpp.
std::vector<stMaterial> ObjectLoader3ds::materialList |
Definition at line 144 of file ObjectLoader3ds.h.
std::vector<stMesh> ObjectLoader3ds::meshList |
Definition at line 143 of file ObjectLoader3ds.h.
int ObjectLoader3ds::totalMaterials |
Definition at line 146 of file ObjectLoader3ds.h.
int ObjectLoader3ds::totalMeshes |
Definition at line 145 of file ObjectLoader3ds.h.