Osiris Framework  0.3
OWavefrontObjectFile Class Reference

Class that parses an Waveffront Object file and loads vertex information on a OMesh class object. More...

#include <OsirisSDK/OWavefrontObjectFile.h>

Public Member Functions

 OWavefrontObjectFile (const char *filename)
 Class constructor. More...
 
virtual ~OWavefrontObjectFile ()
 Class destructor.
 
const char ** objectList (int *count)
 Provides the object list from the file. More...
 
void loadMesh (const char *objName, OMesh *mesh)
 Loads a given object into an OMesh class object, previously created. More...
 

Protected Member Functions

void loadObjectList ()
 Scans the file for objecs.
 
int readNextLine ()
 Reads the next line into the class internal buffer.
 
const char * readNextWord ()
 Reads the next word on the line. More...
 
unsigned int currLine ()
 Returns the current line of the file that is being processed.
 

Detailed Description

Class that parses an Waveffront Object file and loads vertex information on a OMesh class object.

Constructor & Destructor Documentation

OWavefrontObjectFile::OWavefrontObjectFile ( const char *  filename)

Class constructor.

Parameters
filenameObject file name.

Member Function Documentation

void OWavefrontObjectFile::loadMesh ( const char *  objName,
OMesh mesh 
)

Loads a given object into an OMesh class object, previously created.

Parameters
objNameObject name.
meshOMesh class object in which the vertex data will be loaded.
const char ** OWavefrontObjectFile::objectList ( int *  count)

Provides the object list from the file.

Parameters
countPointer to an integer where the object count will be written.
Returns
Vector with object names that can be used to load meshes.
const char * OWavefrontObjectFile::readNextWord ( )
protected

Reads the next word on the line.

Returns
Returns the next word. If the end of line has been reached or the buffer overflowed, returns NULL.

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