Main Page   Class Hierarchy   Compound List   File List   Compound Members  

StaticModel Class Reference

The StaticModel class represents a static model that has no sort of animation. More...

#include <StaticModel.h>

List of all members.

Public Methods

 StaticModel (const std::string &modelName)
 Loads a StaticModel from the given "X" file in the directory given by setModelDirectory.

virtual ~StaticModel ()
 Destructor.

void render ()
 Renders the model.


Static Public Methods

void setModelDirectory (const std::string &newDir)
 Sets a new directory to look for models and textures.

void initDebugMesh ()
 Initializes the debug mesh, so that it draws a sphere around every model's origin.


Detailed Description

The StaticModel class represents a static model that has no sort of animation.

Static models consist of a geometry mesh, and a set of 1 or more materials and textures to apply to that mesh.

The StaticModel class loads its models from the directory set in the static member "modelDirectory", and attempts to load any textures in that same directory. Pathnames to files in the .x files are ignored and instead the files are searched for in the "modelDirectory" directory.


Constructor & Destructor Documentation

StaticModel::StaticModel const std::string &    modelName [explicit]
 

Loads a StaticModel from the given "X" file in the directory given by setModelDirectory.

If the file is not found, or the model cannot be loaded for some other reason (such as texture not found), a GameException is thrown.


Member Function Documentation

void StaticModel::render  
 

Renders the model.

The appropriate world matrix should be set if desired. Vertex shaders, textures, materials, and stream sources may be set to different values, and not restored.

void StaticModel::setModelDirectory const std::string &    newDir [static]
 

Sets a new directory to look for models and textures.

This only affects models created after this method call.


The documentation for this class was generated from the following files:
Generated on Wed May 14 01:38:08 2003 for CG Skeletal Animation Project by doxygen1.2.18