#include <mixtexture.h>
Inheritance diagram for ScEng::MixTexture:

Public Types | |
| enum | DATAID |
| Enum DATAID. More... | |
| enum | DEPENDENCIES { DATA_TABLE_DEPENDENCY, COLOR1TEX_DEPENDENCY, COLOR2TEX_DEPENDENCY, MIXTEX_DEPENDENCY } |
| Enum DEPENDENCIES. More... | |
| enum | CHUNKS { NAME_CHUNKID = 0x00000005 } |
| Enum CHUNKS. More... | |
Public Member Functions | |
| MixTexture (bool create_dependencies) | |
| Constructor. | |
| std::string | GetClassName () |
| Returns the name for this class. | |
| void | SetNumSubTextures (int num) |
| Virtual function. | |
| int | GetNumSubTextures () |
| Virtual function. | |
| Texture * | GetSubTexture (int i) |
| Virtual function. | |
| void | SetSubTexture (int i, Texture *texture) |
| Virtual function. | |
| 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 i) |
| Returns the specific dependency. | |
| std::string | GetDependencyName (int i) |
| Gets the name for the specified dependency. | |
| unsigned int | GetDependencyType (int i) |
| Block * | Clone () |
| Creates a copy of this object and return it. | |
| std::string | GetName () |
| Return the name for this texture. | |
| void | SetName (std::string new_name) |
| Sets the name for this texture. | |
| int | GetNumDataTables () |
| Return the number of DataTables. | |
| DataTable * | GetDataTable (int id=0) |
| Returns the DataTable. | |
| void | SetDataTable (DataTable *d, int i=0) |
| Sets the i_th data table. | |
| void | UpdateDataTable (int id=0) |
| 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) |
| GMT::AColor | EvaluateColor (DifferentialGeometry &dg) |
| Returns the color of the texture in the position specified by the differential geometry instance. | |
| GMT::Point3F | EvaluateBump (DifferentialGeometry &dg) |
| Returns the normal perturbation produced by the texture in the position specified by the differential geometry instance. | |
Public Attributes | |
| std::string | name |
| The name for this texture. | |
| Texture * | color_1_tex |
| The first color texture. | |
| Texture * | color_2_tex |
| The second color texture. | |
| Texture * | mix_tex |
| The mixing texture. Only its mono output is used to mix the color textures. | |
| DataTable * | dt |
| The DataTable to hold the info for this class. | |
Static Public Attributes | |
| static BlockType | block_type |
Enum DATAID.
Enums the Ids for the differents Data used for the MixTexture
| std::string ScEng::MixTexture::GetClassName | ( | ) | [virtual] |
| void ScEng::MixTexture::SetDependency | ( | int | id, | |
| Block * | dependency | |||
| ) | [virtual] |
Sets a Dependency.
| id | the id for the dependency | |
| dependency | the dependency |
Implements ScEng::Block.
| unsigned int ScEng::MixTexture::GetDependencyType | ( | int | i | ) | [virtual] |
Returns the type of the specified dependency. Although our dependency is a BlockVector, we return BlockType::TEXTURE so the scripts can know what type of blocks this BlockVector uses.
Reimplemented from ScEng::Block.
| Block * ScEng::MixTexture::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::MixTexture::UpdateDataTable | ( | int | id = 0 |
) | [virtual] |
Updates the data table. This fills the name variables in the data table so it can be used properly. This function is called after a scene is loaded and each block must call it after its data_table has been built or set.
Reimplemented from ScEng::Block.
| void ScEng::MixTexture::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::MixTexture::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::MixTexture::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.
BlockType ScEng::MixTexture::block_type [static] |
The type of this block BlockType MaskTexture::block_type( BlockType::TEXTURE, 0x00500000,0x00000010 );
The first color texture.
The second color texture.
The mixing texture. Only its mono output is used to mix the color textures.
1.5.1-p1