Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::OofModelFile Class Reference

Class to load an Ogre Object File (oof). More...

#include <OgreOofModelFile.h>

List of all members.

Public Methods

 OofModelFile ()
 ~OofModelFile ()
void load (String filename)
 Loads the named oof file. More...

void load (DataChunk &chunk)
 Loads oof data from a chunk of memory, which has been read from a file or archive. More...

void freeMemory (void)
 Destroys all the data held in the object and frees up the memory. More...


Public Attributes

bool autoDeallocateMemory
 Indicates if this class should deallocate the memory it allocates for data when it is destroyed or more data is loaded. More...

String filename
 Filename of latest model loaded. More...

GeometryData sharedGeometry
 Geometry shared among sub-parts of the model. More...

std::vector< MaterialDatamaterials
 List of materials used by this model. More...


Detailed Description

Class to load an Ogre Object File (oof).

Remarks:
DEPRECATED in favour of MeshSerializer

This class loads the .oof files created by 3ds2oof (see readme.txt in the 3ds2oof folder for more info). For now these files use only a subset of the vertex formats that OGRE can handle, assuming only 1 set of 2D (u,v) texture coordinates (if present). The .oof format and this loader will develop to add more features in due course.


Constructor & Destructor Documentation

Ogre::OofModelFile::OofModelFile  
 

Ogre::OofModelFile::~OofModelFile  
 


Member Function Documentation

void Ogre::OofModelFile::freeMemory void   
 

Destroys all the data held in the object and frees up the memory.

void Ogre::OofModelFile::load DataChunk   chunk
 

Loads oof data from a chunk of memory, which has been read from a file or archive.

void Ogre::OofModelFile::load String    filename
 

Loads the named oof file.


Member Data Documentation

bool Ogre::OofModelFile::autoDeallocateMemory
 

Indicates if this class should deallocate the memory it allocates for data when it is destroyed or more data is loaded.

Remarks:
This parameter defaults to true (prevents memory leaks), however if another class wants to use the memory allocated by this object (without copying it out) it can set this member to false to prevent the memory being destroyed. However the caller must then ensure this memory is deallocated at the appropriate time, meaning ALL memory allocated by this object including geometry for each material.

String Ogre::OofModelFile::filename
 

Filename of latest model loaded.

std::vector<MaterialData> Ogre::OofModelFile::materials
 

List of materials used by this model.

Warning:
These are NOT automatically added to the SceneManager. Call registerMaterials() to perform this task.

GeometryData Ogre::OofModelFile::sharedGeometry
 

Geometry shared among sub-parts of the model.

The geometry of the model is split into chunks using the same material - these can either share this central geometry data or use separate buffers. See the readme.txt for the 3ds2oof utility for more info.

Copyright © 2002 by The OGRE Team