Public Member Functions | |
void | init (void) |
Initialzes the scene object. | |
void | shutdown (void) |
Shutdowns the object and cleans up state. | |
void | render (void) |
Renders the scene with the currently set parameters. | |
ICameraState * | getCameraState (void) |
Returns the ICameraState responsible for this scene. | |
ILightingState * | getLightingState (void) |
Returns the ILightingState object responsible for this scene. | |
ITextureState * | getTextureState (void) |
Returns the ITextureState object responsible for this scene. | |
IShader * | getShader (void) |
Returns the IShader object responsible for this scene. | |
void | setCurrentModel (IModel *model) |
Sets the current test model. | |
IModel * | getCurrentModel (void) |
Returns the current test model. | |
void | setClearColor (const vec4_t &color) |
Sets the viewport clear color. | |
void | setUseProgram (bool enable) |
Sets the 'use program' flag. | |
void | setWireframe (bool enable) |
Sets the 'draw as wireframe' flag. | |
void | setBackFaceCulling (bool enable) |
Sets the 'enable backface culling' flag. | |
void | setShowOrigin (bool enable) |
Sets the 'show origin' flag. | |
void | setShowNormals (bool enable) |
Sets the 'show normals' flag. | |
void | setShowBoundingBox (bool enable) |
Sets the 'show bounding box' flag. | |
void | setShowTangents (bool enable) |
Sets the 'show tangent space vectors' flag. |
This class doensn't add new functionality. It is only used to hide the class definition from the interface definition.
void CScene::init | ( | void | ) | [virtual] |
Initialzes the scene object.
After this call the scene is ready to operate.
Implements IScene.
void CScene::setCurrentModel | ( | IModel * | model | ) | [inline, virtual] |
Sets the current test model.
The default test model is NULL. The test model is NOT stored here, it only keeps a pointer to the model. You have to delete the model manually.
model | The test model. |
Implements IScene.
IModel* CScene::getCurrentModel | ( | void | ) | [inline, virtual] |
void CScene::setClearColor | ( | const vec4_t & | color | ) | [inline, virtual] |
void CScene::setUseProgram | ( | bool | enable | ) | [inline, virtual] |
Sets the 'use program' flag.
If this is set, the test model is rendered using the userdefines shader program. If this is cleared, the test model is rendered using the OpenGL fixed function pipeline. The default it true.
Implements IScene.
void CScene::setWireframe | ( | bool | enable | ) | [inline, virtual] |
Sets the 'draw as wireframe' flag.
If this is set, GL_POLYGON_MODE will be set to GL_LINES for the test model. Otherwise if is GL_FILL. The default is false.
Implements IScene.
void CScene::setBackFaceCulling | ( | bool | enable | ) | [inline, virtual] |
Sets the 'enable backface culling' flag.
This enables/diables OpenGL back face culling for the test model. The default is false.
Implements IScene.
void CScene::setShowOrigin | ( | bool | enable | ) | [inline, virtual] |
Sets the 'show origin' flag.
If enabled, the world origin is shown by three lines indicationg the primary coordinate system axes. The default is false.
Implements IScene.
void CScene::setShowNormals | ( | bool | enable | ) | [inline, virtual] |
Sets the 'show normals' flag.
If this is set, the vertex normals of the current model will be drawn. The default is false.
Implements IScene.
void CScene::setShowBoundingBox | ( | bool | enable | ) | [inline, virtual] |
Sets the 'show bounding box' flag.
If this is set, the current model's bounding box will be drawn. The default is false.
Implements IScene.
void CScene::setShowTangents | ( | bool | enable | ) | [inline, virtual] |
Sets the 'show tangent space vectors' flag.
If this is set, the tanget space vectors of every vertex of the current model will be drawn. The default is false.
Implements IScene.