ScEng::NodeMaterials Class Reference

This class describes the materials used by a node. More...

#include <nodematerials.h>

Inheritance diagram for ScEng::NodeMaterials:

ScEng::Material ScEng::Block List of all members.

Public Types

enum  CHUNKS
 Enum Chunks. More...

Public Member Functions

 NodeMaterials (bool create_dependencies)
 Constructor.
 ~NodeMaterials ()
 Destructor.
std::string GetClassName ()
 Returns the name for this class.
BlockType GetBlockType ()
 Virtual function.
int NumDependencies ()
 Returns the number of dependencies for this class.
void SetDependency (int id, Block *dependency)
 Sets a Dependency.
BlockGetDependency (int id)
 Returns the materials pointer.
std::string GetDependencyName (int id)
 Gets the name for the specified dependency.
unsigned int GetDependencyType (int i)
std::string GetName ()
 Returns the name for this material.
void SetName (std::string new_name)
 Sets the name for this material.
int GetNumDataTables ()
 This class has no DataTables.
DataTableGetDataTable (int id=0)
 This class has no DataTables.
void SetDataTable (DataTable *d, int i=0)
 Sets the i_th data table.
void UpdateDataTable (int id=0)
 This class has no DataTables.
BlockClone ()
 Creates a copy of this object and return it.
int Save (SceneSave *scene_save)
 Saves the info for this class.
int Load (SceneLoad *scene_load)
 Loads the info for this class.
void DeleteThis ()
 Deletes this class.
void ActionBegin (int time, int action)
void ActionEnd (int time, int action)
void Update (int time)
void SetNumSubMaterials (int num)
 Sets the number of submaterials.
int GetNumSubMaterials ()
 Returns the number of submaterials.
MaterialGetSubMaterial (int i)
 Returns a specific submaterial.
void SetSubMaterial (int i, Material *material)
 Sets a submaterial in a specific position.
void DeleteSubMaterial (int i)
void SetNumSubTextures (int num)
 This material has no sub-textures.
int GetNumSubTextures ()
 This material has no sub-textures.
TextureGetSubTexture (int i)
 This material has no sub-textures.
void SetSubTexture (int i, Texture *texture)
 This material has no sub-textures.
void Shade (DifferentialGeometry &dg)
 Virtual function.

Public Attributes

BlockVectormaterials
 The array with the sub-materials.

Static Public Attributes

static BlockType block_type

Detailed Description

This class describes the materials used by a node.

This material can hold multiplematerials. Please add comments here


Member Enumeration Documentation

enum ScEng::NodeMaterials::CHUNKS

Enum Chunks.

Enums the chunks used for this class


Constructor & Destructor Documentation

ScEng::NodeMaterials::NodeMaterials ( bool  create_dependencies  ) 

Constructor.

Allocates memory to the materials pointer.


Member Function Documentation

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

Returns the name for this class.

Returns:
Returns "NodeMaterials"

Implements ScEng::Block.

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

Returns the number of dependencies for this class.

Returns:
Returns 1

Implements ScEng::Block.

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

Sets a Dependency.

Sets the dependency argument to the materials member.

Parameters:
id the id for the dependency
dependency the dependency

Implements ScEng::Block.

unsigned int ScEng::NodeMaterials::GetDependencyType ( int  i  )  [virtual]

Returns the type of the specified dependency. Although our dependency is a BlockVector, we return BlockType::MATERIAL so the scripts can know what type of blocks this BlockVector uses.

Reimplemented from ScEng::Block.

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

This class has no DataTables.

Returns:
Returns NULL

Reimplemented from ScEng::Block.

Block * ScEng::NodeMaterials::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.

Implements ScEng::Block.

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

Material * ScEng::NodeMaterials::GetSubMaterial ( int  i  )  [virtual]

Returns a specific submaterial.

Parameters:
i the index for the submaterial

Implements ScEng::Material.

void ScEng::NodeMaterials::SetSubMaterial ( int  i,
Material material 
) [virtual]

Sets a submaterial in a specific position.

Parameters:
i the index where the material will be set
material the material to be set

Implements ScEng::Material.

void ScEng::NodeMaterials::DeleteSubMaterial ( int  i  ) 

Parameters:
i the index where the material will be deleted


Member Data Documentation

BlockType ScEng::NodeMaterials::block_type [static]

The type of this block BlockType NodeMaterials::block_type( BlockType::MATERIAL, 0x00300000, 0x00000000 );


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