IScene Class Reference

Stores the scene and it's parameters. More...

#include <scene.h>

Inheritance diagram for IScene:

CScene

List of all members.

Public Member Functions

virtual ~IScene (void)
 Destruction.
virtual void init (void)=0
 Initialzes the scene object.
virtual void shutdown (void)=0
 Shutdowns the object and cleans up state.
virtual void render (void)=0
 Renders the scene with the currently set parameters.
virtual ICameraStategetCameraState (void)=0
 Returns the ICameraState responsible for this scene.
virtual ILightingStategetLightingState (void)=0
 Returns the ILightingState object responsible for this scene.
virtual ITextureStategetTextureState (void)=0
 Returns the ITextureState object responsible for this scene.
virtual IShadergetShader (void)=0
 Returns the IShader object responsible for this scene.
virtual void setClearColor (const vec4_t &color)=0
 Sets the viewport clear color.
virtual void setCurrentModel (IModel *model)=0
 Sets the current test model.
virtual IModelgetCurrentModel (void)=0
 Returns the current test model.
virtual void setUseProgram (bool enable)=0
 Sets the 'use program' flag.
virtual void setShowOrigin (bool enable)=0
 Sets the 'show origin' flag.
virtual void setShowNormals (bool enable)=0
 Sets the 'show normals' flag.
virtual void setShowBoundingBox (bool enable)=0
 Sets the 'show bounding box' flag.
virtual void setShowTangents (bool enable)=0
 Sets the 'show tangent space vectors' flag.
virtual void setWireframe (bool enable)=0
 Sets the 'draw as wireframe' flag.
virtual void setBackFaceCulling (bool enable)=0
 Sets the 'enable backface culling' flag.

Static Public Member Functions

static IScenecreate (void)
 Creates a IScene object.


Detailed Description

Stores the scene and it's parameters.

This is the central rendering parameter container. It stores state like the current test model, the camera parameters, texture iamges and several state flags. Last but not least it stores the IShader object that is responsible for rendering the test model.


Member Function Documentation

IScene * IScene::create ( void   )  [static]

Creates a IScene object.

The object must then be initialized with init() in order to use it.

virtual void IScene::init ( void   )  [pure virtual]

Initialzes the scene object.

After this call the scene is ready to operate.

Precondition:
Assumes a valid OpenGL 2.0 context active.

Implemented in CScene.

virtual void IScene::setClearColor ( const vec4_t color  )  [pure virtual]

Sets the viewport clear color.

Parameters:
color Clear color.

Implemented in CScene.

virtual void IScene::setCurrentModel ( IModel model  )  [pure 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.

Parameters:
model The test model.

Implemented in CScene.

virtual IModel* IScene::getCurrentModel ( void   )  [pure virtual]

Returns the current test model.

Implemented in CScene.

virtual void IScene::setUseProgram ( bool  enable  )  [pure 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.

Implemented in CScene.

virtual void IScene::setShowOrigin ( bool  enable  )  [pure 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.

Implemented in CScene.

virtual void IScene::setShowNormals ( bool  enable  )  [pure virtual]

Sets the 'show normals' flag.

If this is set, the vertex normals of the current model will be drawn. The default is false.

Implemented in CScene.

virtual void IScene::setShowBoundingBox ( bool  enable  )  [pure virtual]

Sets the 'show bounding box' flag.

If this is set, the current model's bounding box will be drawn. The default is false.

Implemented in CScene.

virtual void IScene::setShowTangents ( bool  enable  )  [pure 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.

Implemented in CScene.

virtual void IScene::setWireframe ( bool  enable  )  [pure 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.

Implemented in CScene.

virtual void IScene::setBackFaceCulling ( bool  enable  )  [pure virtual]

Sets the 'enable backface culling' flag.

This enables/diables OpenGL back face culling for the test model. The default is false.

Implemented in CScene.


The documentation for this class was generated from the following files:
Generated on Sun Mar 2 17:12:32 2008 for Shader Maker by  doxygen 1.5.4