ScEng::MainScene Class Reference

Describes the main scene. More...

#include <mainscene.h>

Inheritance diagram for ScEng::MainScene:

ScEng::Block List of all members.

Public Types

enum  DATAID
enum  DEPENDENCIES { MAIN_NODE_DEPENDENCY = 0, DATA_TABLE_DEPENDENCY = 1, SCENE_TOOL_DEPENDENCY = 2 }

Public Member Functions

 MainScene (bool create_dependencies)
std::string GetClassName ()
BlockType GetBlockType ()
int NumDependencies ()
void SetDependency (int id, Block *dependency)
BlockGetDependency (int id)
std::string GetDependencyName (int id)
 Gets the name for the specified dependency.
int GetNumDataTables ()
 This class has no DataTables.
DataTableGetDataTable (int id=0)
void SetDataTable (DataTable *d, int i=0)
 Sets the i_th data table.
void UpdateDataTable (int id=0)
 This class has no DataTables.
BlockClone ()
 Clones this object. Not implemented yetç.
int Save (SceneSave *scene_save)
 Saves the info for this class.
int Load (SceneLoad *scene_load)
 Loads the info for this class.
void DeleteThis ()
 Delete this class.
void ActionBegin (int time, int action)
void ActionEnd (int time, int action)
void Update (int time)
void DependancyChanged (Block *dependancy, unsigned int message=0, unsigned int parameters=0)
void AddSceneTool (ToolBlock *tool_block)
 Adds a tool to the scene tools vector.
int GetNumSceneTools ()
 Returns the number of scene tools.
ToolBlockGetSceneTool (int i)

Public Attributes

Nodemain_node
DataTabledata_table
BlockVectorscene_tools

Static Public Attributes

static BlockType block_type

Detailed Description

Describes the main scene.

Please add comments here


Member Enumeration Documentation

enum ScEng::MainScene::DATAID

Enum DATAID Enums the Ids for the differents Data used for the material

enum ScEng::MainScene::DEPENDENCIES

Enum DEPENDENCIES Enums the chunks used for this class

Enumerator:
MAIN_NODE_DEPENDENCY  The dependency id to the main_node
DATA_TABLE_DEPENDENCY  The dependency id to the data table
SCENE_TOOL_DEPENDENCY  The dependency id to the scene tools


Constructor & Destructor Documentation

ScEng::MainScene::MainScene ( bool  create_dependencies  ) 

Constructor Sets the main node to NULL


Member Function Documentation

std::string ScEng::MainScene::GetClassName (  )  [virtual]

Returns the name for this class

Returns:
Returns "MainScene"

Implements ScEng::Block.

BlockType ScEng::MainScene::GetBlockType (  )  [virtual]

Returns the BlockType for this class

Returns:
Returns SE_MAIN_SCENE_BLOCK_TYPE

Implements ScEng::Block.

int ScEng::MainScene::NumDependencies (  )  [virtual]

Returns the number of Dependencies for this class

Returns:
Returns 1

Implements ScEng::Block.

void ScEng::MainScene::SetDependency ( int  id,
Block dependency 
) [virtual]

Sets a Dependency Sets the main node

Parameters:
id the id for the dependency
se_block the Block to be dependency

Implements ScEng::Block.

Block * ScEng::MainScene::GetDependency ( int  id  )  [virtual]

Returns a dependency

Parameters:
id the id for the dependency
Returns:
Returns the main node

Implements ScEng::Block.

DataTable * ScEng::MainScene::GetDataTable ( int  id = 0  )  [virtual]

This class has no DataTables

Returns:
Returns NULL

Reimplemented from ScEng::Block.

void ScEng::MainScene::ActionBegin ( int  time,
int  action 
) [inline, virtual]

Informs the block that an action will begin

Parameters:
time the time at which the action begins. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION.

Reimplemented from ScEng::Block.

void ScEng::MainScene::ActionEnd ( int  time,
int  action 
) [inline, virtual]

Informs the block that an action will end.

Parameters:
time the time at which the action ends. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION.

Reimplemented from ScEng::Block.

void ScEng::MainScene::Update ( int  time  )  [inline, virtual]

Informs the block that it needs to update its data. For example, texture and material blocks usually move all their animated parameters from the data_table to int or float variables. This is specially useful when rendering, so there is no need to interpolate a data_value every time.

Parameters:
time the time at which the block needs to update its data.

Reimplemented from ScEng::Block.

void ScEng::MainScene::DependancyChanged ( Block dependancy,
unsigned int  message = 0,
unsigned int  parameters = 0 
) [inline, virtual]

A block receives this message when one of its dependencies has changed.

Parameters:
dependency The dependancy that changed
message A message about the change

Reimplemented from ScEng::Block.

ToolBlock * ScEng::MainScene::GetSceneTool ( int  i  ) 

Returns the i-th scene tool.

Parameters:
i specifies the index of the tool to retrieve.
Returns:
the i-th tool or NULL if i-th is out of range.


Member Data Documentation

BlockType ScEng::MainScene::block_type [static]

The type of this block BlockType MainScene::block_type( BlockType::MAIN_SCENE, 0x00100000,0x00000000 )

Node* ScEng::MainScene::main_node

The main node This node is the top-most node in the scene. All nodes are children of this node. This is the root-node or world in other 3d applications.

DataTable* ScEng::MainScene::data_table

The data table of the main scene This data table holds scene attributes like ambient color and

BlockVector* ScEng::MainScene::scene_tools

These are tool blocks that need to be saved.

See also:
ToolBlock


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 10:49:22 2007 for SceneEngine by  doxygen 1.5.1-p1