ScEng::BlockVector Class Reference

#include <blockvector.h>

Inheritance diagram for ScEng::BlockVector:

ScEng::Block List of all members.

Public Member Functions

 BlockVector (bool create_dependencies)
 Constructor.
 ~BlockVector ()
 Destructor.
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.
void SetVectorSize (int num)
int GetVectorSize ()
 Returns the size of the sub_blocks array.
void SetElement (int id, Block *block)
BlockGetElement (int id)
void PushBack (Block *block)
 
Parameters:
block the block to push_back

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 ()
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)

Public Attributes

std::vector< Block * > sub_blocks
 An array to hold the multiple Blocks.

Static Public Attributes

static BlockType block_type

Detailed Description

A Blocks Vector A special kind of block that keeps multiple blocks as dependencies
See also:
Block


Member Function Documentation

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

Returns the name for the class

Returns:
Returns "BlockVector"

Implements ScEng::Block.

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

Returns the block type for this block

Returns:
Returns SE_BLOCKVECTOR_BLOCK_TYPE

Implements ScEng::Block.

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

Returns the number of dependencies

Returns:
The number of sub blocks

Implements ScEng::Block.

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

Sets a Dependency Sets a block into the sub blocks array

Parameters:
id the id for the block. Must be less than the size of sub_blocks array
dependency the block to be dependency

Implements ScEng::Block.

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

Returns a dependency Returns a block of the sub_blocks array

Parameters:
id the id for the block. Must be less than the size of sub_blocks array
Returns:
If the given id was less tha the size of sub_blocks array returns the Block if not return NULL

Implements ScEng::Block.

void ScEng::BlockVector::SetVectorSize ( int  num  ) 

Sets the sub_blocks array size Resizes the array if its necesary

Parameters:
num the new size for the array

void ScEng::BlockVector::SetElement ( int  id,
Block block 
)

Sets an element Sets an element using MakeDependencyByID

Parameters:
id the id where the block will be dependency
block the Block to be dependency
See also:
Block::MakeDependencyByID

Block * ScEng::BlockVector::GetElement ( int  id  ) 

Parameters:
id the id for the block. Must be less than the size of sub_blocks array
Returns:
If the given id was less tha the size of sub_blocks array returns the Block if not return NULL

DataTable* ScEng::BlockVector::GetDataTable ( int  id = 0  )  [inline, virtual]

This class has no DataTables

Returns:
Returns NULL

Reimplemented from ScEng::Block.

Block * ScEng::BlockVector::Clone (  )  [virtual]

Creates a copy of this object and return it. The caller of this function is responsible to add this block to the DAG or to delete it.

Returns:
Returns the cloned block

Implements ScEng::Block.

void ScEng::BlockVector::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::BlockVector::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::BlockVector::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::BlockVector::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.


Member Data Documentation

BlockType ScEng::BlockVector::block_type [static]

The type of this block BlockType BitmapTexture::block_type( BlockType::BLOCKVECTOR, 0x00050000,0x00000000 )


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