#include <marbletexture.h>
Inheritance diagram for ScEng::MarbleTexture:

Public Types | |
| enum | DATAID { , id_color2, id_map1_on, id_map2_on } |
| Enum DATAID. More... | |
| enum | CHUNKS { NAME_CHUNKID = 0x00000005 } |
| Enum Chunks. More... | |
| enum | DEPENDENCIES { PLACE3DTEX_DEPENDENCY = 0, COLOR1TEX_DEPENDENCY = 1, COLOR2TEX_DEPENDENCY = 2, DATA_TABLE_DEPENDENCY = 3 } |
| Enum DEPENDENCIES. More... | |
Public Member Functions | |
| MarbleTexture (bool create_dependencies) | |
| Constructor. | |
| std::string | GetClassName () |
| Returns the name for this class. | |
| BlockType | GetBlockType () |
| Virtual function. | |
| void | SetColor1 (GMT::Color color1, int t) |
| Sets the Color 1. | |
| void | SetColor2 (GMT::Color color2, int t) |
| Sets the Color 2. | |
| void | SetMap1On (bool map1, int t) |
| Sets if this Marble uses the map1. | |
| void | SetMap2On (bool map2, int t) |
| Sets if this Marble uses the map2. | |
| GMT::Color | GetColor1 (int t) |
| Gets the Color 1. | |
| GMT::Color | GetColor2 (int t) |
| Gets the Color 1. | |
| bool | GetMap1On (int t) |
| Returns if this Marble uses the map1. | |
| bool | GetMap2On (int t) |
| Returns if this Marble uses the map2. | |
| int | NumDependencies () |
| Returns the number of dependencies for this class. | |
| void | SetDependency (int i, Block *dependency) |
| Sets a Dependency. | |
| Block * | GetDependency (int i) |
| Returns a specific dependency. | |
| std::string | GetDependencyName (int i) |
| Gets the name for the specified dependency. | |
| unsigned int | GetDependencyType (int i) |
| std::string | GetName () |
| Returns the name for this texture. | |
| void | SetName (std::string new_name) |
| Sets the name for this texture. | |
| void | SetNumSubTextures (int num) |
| Sets the number of sub-textures. | |
| int | GetNumSubTextures () |
| Returns the number of sub-textures for this texture. | |
| Texture * | GetSubTexture (int i) |
| Returns the specified sub-texture. | |
| void | SetSubTexture (int i, Texture *texture) |
| Sets the specified sub-texture. | |
| void | SetPlace3DTexture (Place3DTexture *place_3D_texture) |
| Sets the Place3DTexture. | |
| Place3DTexture * | GetPlace3DTexture () |
| Returns the Place3DTexture. | |
| int | GetNumDataTables () |
| Returns the number of DataTables used for this class. | |
| 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 () |
| 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) |
| 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 of this texture. | |
| Place3DTexture * | place_tex |
| The 3DPlace of the texture. | |
| Texture * | color_1_tex |
| One of the textures of the noise texture. | |
| Texture * | color_2_tex |
| One of the textures of the noise texture. | |
| DataTable * | dt |
| The DataTable to hold the info for this class. | |
Static Public Attributes | |
| static BlockType | block_type |
Creates a perturbation using two colors or textures
Enum DATAID.
Enums the Ids for the differents Data used for the NoiseTexture
Enum DEPENDENCIES.
Enums the possible dependencies for this class
| PLACE3DTEX_DEPENDENCY | Place3DTexture dependency |
| COLOR1TEX_DEPENDENCY | Color1 Texture dependency |
| COLOR2TEX_DEPENDENCY | Color2 Texture dependency |
| DATA_TABLE_DEPENDENCY | DataTable dependency |
| std::string ScEng::MarbleTexture::GetClassName | ( | ) | [virtual] |
| int ScEng::MarbleTexture::NumDependencies | ( | ) | [virtual] |
| void ScEng::MarbleTexture::SetDependency | ( | int | i, | |
| Block * | dependency | |||
| ) | [virtual] |
Sets a Dependency.
| id | the ID for the dependency | |
| dependency | the dependency |
Implements ScEng::Block.
| Block * ScEng::MarbleTexture::GetDependency | ( | int | i | ) | [virtual] |
Returns a specific dependency.
If the id is equal to COLOR1TEX_DEPENDENCY returns the color_1_tex
If the id is equal to COLOR2TEX_DEPENDENCY returns the color_2_tex
Implements ScEng::Block.
| unsigned int ScEng::MarbleTexture::GetDependencyType | ( | int | i | ) | [virtual] |
Returns the type of the i-th dependency of this block.
Reimplemented from ScEng::Block.
| int ScEng::MarbleTexture::GetNumSubTextures | ( | ) | [virtual] |
| Texture * ScEng::MarbleTexture::GetSubTexture | ( | int | i | ) | [virtual] |
Returns the specified sub-texture.
If i equal to 2 returns the color_1_tex
If i is not 1 or 2 returns NULL
Implements ScEng::Material.
| void ScEng::MarbleTexture::SetSubTexture | ( | int | i, | |
| Texture * | texture | |||
| ) | [virtual] |
Sets the specified sub-texture.
Implements ScEng::Material.
| void ScEng::MarbleTexture::SetPlace3DTexture | ( | Place3DTexture * | place_3D_texture | ) |
Sets the Place3DTexture.
Sets the Place3DTexture using MakeDependencyByID
| place_3D_texture | the Place3DTexture to be set |
| int ScEng::MarbleTexture::GetNumDataTables | ( | ) | [virtual] |
Returns the number of DataTables used for this class.
Reimplemented from ScEng::Block.
| Block * ScEng::MarbleTexture::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::MarbleTexture::ActionBegin | ( | int | time, | |
| int | action | |||
| ) | [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::MarbleTexture::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::MarbleTexture::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.
The type of this block BlockType NoiseTexture::block_type( BlockType::TEXTURE, 0x00500000, 0x00000020 );
1.5.1-p1