#include <standardmaterial.h>
Inheritance diagram for ScEng::StandardMaterial:

Public Types | |
| enum | DATAID { , id_opacity, id_specular_level, id_glossiness, id_soften, id_use_color_selfillum, id_mono_selfillum, id_diffuse_color, id_ambient_color, id_specular_color, id_selfillu_color } |
| enum | SUBTEXTURES { ID_AMBIENT = 0, ID_DIFFUSE = 1, ID_SPECULAR = 2, ID_GLOSSINESS = 3, ID_SPECULARLEVEL = 4, ID_SELFILLU = 5, ID_OPACITY = 6, ID_FILTERCOLOR = 7, ID_BUMP = 8, ID_REFLECTION = 9, ID_REFRACTION = 10, ID_DISPLACEMENT = 11, ID_NUM_MAPS = 12 } |
| enum | DEPENDENCIES { DATA_TABLE_DEPENDENCY = 12, NUM_DEPENDENCIES = 13 } |
Public Member Functions | |
| StandardMaterial (bool create_dependencies) | |
| std::string | GetClassName () |
| BlockType | GetBlockType () |
| Virtual function. | |
| int | NumDependencies () |
| void | SetDependency (int i, Block *dependency) |
| Block * | GetDependency (int i) |
| std::string | GetDependencyName (int i) |
| Gets the name for the specified dependency. | |
| unsigned int | GetDependencyType (int i) |
| std::string | GetName () |
| Returns the name of the material. | |
| void | SetName (std::string new_name) |
| Sets the name for this material. | |
| void | SetNumSubMaterials (int num) |
| This Material has no sub-materials. | |
| int | GetNumSubMaterials () |
| Material * | GetSubMaterial (int i) |
| void | SetSubMaterial (int i, Material *material) |
| This Material has no sub-materials. | |
| void | SetNumSubTextures (int num) |
| Please add comments here. | |
| int | GetNumSubTextures () |
| Texture * | GetSubTexture (int i) |
| void | SetSubTexture (int id, Texture *texture) |
| void | SetShaderType (unsigned int type) |
| unsigned int | GetShaderType () |
| Returns the current shader type. | |
| float | GetSubTextureIntensity (int id) |
| Returns the intensity for the specified sub-texture. | |
| void | SetSubTextureIntensity (int id, float value) |
| Sets the intensity for the specified sub-texture. | |
| GMT::Color | GetAmbientColor (int t) |
| Returns the ambient color. | |
| GMT::Color | GetDiffuseColor (int t) |
| Returns the diffuse color. | |
| GMT::Color | GetSpecularColor (int t) |
| Returns the specular color. | |
| GMT::Color | GetSelfIlluminationColor (int t) |
| Returns the self illumination color. | |
| bool | GetDoubleSided (int t) |
| Returns if the material is or not double sided. | |
| float | GetOpacity (int t) |
| Returns the opacity value for this material. | |
| float | GetSpecularLevel (int t) |
| Returns the specular level for this material. | |
| float | GetSoften (int t) |
| Returns the soften value for this material. | |
| int | GetUseColorSelfIllum (int t) |
| Returns if the material uses or not the self color illumination. | |
| float | GetMonoSelfIllum (int t) |
| Returns the mono self illumination color. | |
| float | GetGlossiness (int t) |
| Returns the glossiness value for this material. | |
| void | SetSelfIlluminationColor (GMT::Color color_selfillum_val, int t) |
| Sets the self illumination color. | |
| void | SetDoubleSided (bool double_sided_val, int t) |
| Sets if this material is or not doble sided. | |
| void | SetSpecularLevel (float specular_level_val, int t) |
| Sets the specular color for this material. | |
| void | SetGlossiness (float glossiness_val, int t) |
| Sets the glossiness value for this material. | |
| void | SetSoften (float soften_val, int t) |
| Sets the soften value for this material. | |
| void | SetAmbientColor (GMT::Color color_ambient_val, int t) |
| Sets the ambient color. | |
| void | SetDiffuseColor (GMT::Color color_diffuse_val, int t) |
| Sets the diffuse color. | |
| void | SetSpecularColor (GMT::Color color_specular_val, int t) |
| Sets the specular color. | |
| void | SetOpacity (float opacity_val, int t) |
| Sets the opacity value for this material. | |
| void | SetUseColorSelfIllum (int use_color_selfillum_val, int t) |
| Sets if the material uses or not the self illumination color. | |
| void | SetMonoSelfIllum (float mono_selfillum_val, int t) |
| Sets the mono self illumination value. | |
| int | GetNumDataTables () |
| DataTable * | GetDataTable (int id=0) |
| Returns the DataTable for this class. | |
| void | SetDataTable (DataTable *d, int i=0) |
| Sets the i_th data table. | |
| void | UpdateDataTable (int id=0) |
| Updates the indexes for the DataTable. | |
| Block * | Clone () |
| 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 | Shade (DifferentialGeometry &dg) |
| Virtual function. | |
Public Attributes | |
| DataTable * | dt |
| The DataTable to hold the info for this class. | |
| Texture * | sub_textures [ID_NUM_MAPS] |
| The array to hold the sub-textures. | |
| float | sub_textures_intensity [ID_NUM_MAPS] |
| The array to hold the sub-textures intensity. | |
Static Public Attributes | |
| static BlockType | block_type |
Enum DATAID Enums the Ids for the differents Data used for the material
| id_opacity | <The id for the double sided value in the DataTable |
| id_specular_level | <The id for the opacity in the DataTable |
| id_glossiness | <The id for the specular level in the DataTable |
| id_soften | <The id for the glossiness in the DataTable |
| id_use_color_selfillum | <The id for the soften in the DataTable |
| id_mono_selfillum | <The id for the use color self illumination in the DataTable |
| id_diffuse_color | <The id for the mono self illumination in the DataTable |
| id_ambient_color | <The id for the diffuse color in the DataTable |
| id_specular_color | <The id for the ambient color in the DataTable |
| id_selfillu_color | <The id for the self illumination color in the DataTable |
Enum SubTextures Enums the possible sub-textures for this material
| ScEng::StandardMaterial::StandardMaterial | ( | bool | create_dependencies | ) |
Constructor Sets all the sub-textures to NULL
| std::string ScEng::StandardMaterial::GetClassName | ( | ) | [virtual] |
| int ScEng::StandardMaterial::NumDependencies | ( | ) | [virtual] |
Returns the number of Dependencies for this class
Implements ScEng::Block.
| void ScEng::StandardMaterial::SetDependency | ( | int | i, | |
| Block * | dependency | |||
| ) | [virtual] |
Sets a Dependency Sets the specified sub-texture.
| id | the ID for the sub-texture. Must be one of the values defined in the SUBTEXTURES enum. | |
| dependency | the dependency |
Implements ScEng::Block.
| Block * ScEng::StandardMaterial::GetDependency | ( | int | i | ) | [virtual] |
Returns the specified dependency
| id | the ID for the sub-texture. Must be one of the values defined in the SUBTEXTURES enum. |
Implements ScEng::Block.
| unsigned int ScEng::StandardMaterial::GetDependencyType | ( | int | i | ) | [virtual] |
Returns the type of the i-th dependency of this block.
Reimplemented from ScEng::Block.
| int ScEng::StandardMaterial::GetNumSubMaterials | ( | ) | [virtual] |
| Material * ScEng::StandardMaterial::GetSubMaterial | ( | int | i | ) | [virtual] |
| int ScEng::StandardMaterial::GetNumSubTextures | ( | ) | [virtual] |
Returns the number of sub-textures for this material
Implements ScEng::Material.
| Texture * ScEng::StandardMaterial::GetSubTexture | ( | int | i | ) | [virtual] |
Returns the specified sub-texture param i the ID for the sub-texture. Must be one of the values defined in the SUBTEXTURES enum. return If the ID is correct returns the correspondent sub-texture. If not returns NULL
Implements ScEng::Material.
| void ScEng::StandardMaterial::SetSubTexture | ( | int | id, | |
| Texture * | texture | |||
| ) | [virtual] |
Sets the specified sub-texture Sets the sub-texture using MakeDependencyByID
| id | the ID for the sub-texture. Must be one of the values defined in the SUBTEXTURES enum. | |
| texture | the Texture to be dependency |
Implements ScEng::Material.
| void ScEng::StandardMaterial::SetShaderType | ( | unsigned int | type | ) |
Sets the shader type to the specified type
| int ScEng::StandardMaterial::GetNumDataTables | ( | ) | [virtual] |
Returns the number of DataTables used for this class
Reimplemented from ScEng::Block.
| Block * ScEng::StandardMaterial::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::StandardMaterial::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::StandardMaterial::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::StandardMaterial::Update | ( | int | time | ) | [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.
The type of this block BlockType StandardMaterial::block_type( BlockType::MATERIAL, 0x00300000, 0x00000010 );
1.5.1-p1