#include <nodematerials.h>
Inheritance diagram for ScEng::NodeMaterials:

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. | |
| Block * | GetDependency (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. | |
| DataTable * | GetDataTable (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. | |
| Block * | Clone () |
| 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. | |
| Material * | GetSubMaterial (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. | |
| Texture * | GetSubTexture (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 | |
| BlockVector * | materials |
| The array with the sub-materials. | |
Static Public Attributes | |
| static BlockType | block_type |
This material can hold multiplematerials. Please add comments here
Enum Chunks.
Enums the chunks used for this class
| ScEng::NodeMaterials::NodeMaterials | ( | bool | create_dependencies | ) |
Constructor.
Allocates memory to the materials pointer.
| std::string ScEng::NodeMaterials::GetClassName | ( | ) | [virtual] |
| int ScEng::NodeMaterials::NumDependencies | ( | ) | [virtual] |
| void ScEng::NodeMaterials::SetDependency | ( | int | id, | |
| Block * | dependency | |||
| ) | [virtual] |
Sets a Dependency.
Sets the dependency argument to the materials member.
| 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] |
| 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
| 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.
| 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.
| 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.
| 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.
| i | the index where the material will be set | |
| material | the material to be set |
Implements ScEng::Material.
| void ScEng::NodeMaterials::DeleteSubMaterial | ( | int | i | ) |
| i | the index where the material will be deleted |
The type of this block BlockType NodeMaterials::block_type( BlockType::MATERIAL, 0x00300000, 0x00000000 );
1.5.1-p1