MeshLoader Class Reference
static class which loads mesh data from external files in either OBJ or PLY formats (file extensions '.obj' and '.ply' respectively) More...
#include <MeshLoader.h>
Inheritance diagram for MeshLoader:

Public Member Functions | |
| virtual bool | load (const std::string &fileName, MeshData &outData) |
| Format-specific mesh loading from a file which defers actual parsing to _load. | |
Static Public Member Functions | |
| static Mesh * | load (const std::string &fileName) |
| Attempts to parse and initialize a Mesh from the given file, inferring its file format from the filename's extension. | |
| static bool | save (Mesh *mesh, const std::string &fileName) |
| Attempts to save the given mesh in OBJ format to the file given. | |
Protected Member Functions | |
| virtual bool | _load (std::istream &fileStream, MeshData &outData)=0 |
| Format-specific mesh loading from an ifstream (input file stream). | |
Detailed Description
static class which loads mesh data from external files in either OBJ or PLY formats (file extensions '.obj' and '.ply' respectively)
- Date:
- Spring 2008
Definition at line 21 of file MeshLoader.h.
Member Function Documentation
| Mesh * MeshLoader::load | ( | const std::string & | fileName | ) | [static] |
Attempts to parse and initialize a Mesh from the given file, inferring its file format from the filename's extension.
- Returns:
- NULL on error or a valid Mesh otherwise
Definition at line 22 of file MeshLoader.cpp.
| bool MeshLoader::save | ( | Mesh * | mesh, | |
| const std::string & | fileName | |||
| ) | [static] |
Attempts to save the given mesh in OBJ format to the file given.
- Returns:
- whether or not mesh was successfully written out to the file
Definition at line 59 of file MeshLoader.cpp.
| bool MeshLoader::load | ( | const std::string & | fileName, | |
| MeshData & | outData | |||
| ) | [virtual] |
Format-specific mesh loading from a file which defers actual parsing to _load.
- Returns:
- true on success with loaded data in outData, false otherwise
Definition at line 46 of file MeshLoader.cpp.
| virtual bool MeshLoader::_load | ( | std::istream & | fileStream, | |
| MeshData & | outData | |||
| ) | [protected, pure virtual] |
Format-specific mesh loading from an ifstream (input file stream).
- Returns:
- true on success with loaded data in outData, false otherwise
Implemented in MeshLoaderOBJ, and MeshLoaderPLY.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6