#include <StaticModel.h>
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. | |
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.
|
|
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. |
|
|
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. |
|
|
Sets a new directory to look for models and textures. This only affects models created after this method call. |
1.2.18