#include <bitmaptexture.h>
Inheritance diagram for ScEng::BitmapTexture:

Public Types | |
| enum | DATAID { , id_alpha_source, id_premultiplied_alpha } |
| enum | CHUNKS { NAME_CHUNKID = 0x00000005, FILTER_CHUNKID = 0x00000010, ALFA_CHUNKID = 0x00000015, FILEPATH_CHUNKID = 0x00000020, PREMULTIPLIED_ALPHA_CHUNKID = 0x00000025 } |
| enum | DEPENDENCIES { BITMAP_PLACE2DTEX_DEPENDENCY = 0, DATA_TABLE_DEPENDENCY = 1 } |
Public Member Functions | |
| BitmapTexture (bool create_dependencies) | |
| std::string | GetClassName () |
| Returns the name for the class. | |
| BlockType | GetBlockType () |
| int | NumDependencies () |
| void | SetDependency (int id, Block *dependency) |
| Block * | GetDependency (int id) |
| std::string | GetDependencyName (int id) |
| Gets the name for the specified dependency. | |
| unsigned int | GetDependencyType (int i) |
| std::string | GetName () |
| Returns the name of the texture. | |
| void | SetName (std::string new_name) |
| void | SetNumSubTextures (int num) |
| Virtual function. | |
| int | GetNumSubTextures () |
| Virtual function. | |
| Texture * | GetSubTexture (int i) |
| Virtual function. | |
| void | SetSubTexture (int i, Texture *texture) |
| Virtual function. | |
| void | SetPlace2DTexture (Place2DTexture *place_2D_texture) |
| Place2DTexture * | GetPlace2DTexture () |
| Returns the Place2DTexture used for this texture. | |
| void | SetFilterType (int filter, int t) |
| Sets the filter type for this texture. | |
| void | SetAlfaSource (int alfa, int t) |
| Sets the alfa source for this texture. | |
| void | SetFilePath (std::string name) |
| Sets the path for the image file used for the texture. | |
| void | SetPremultipliedAlpha (bool pa, int t) |
| Sets if the texture use or not a premultiplied alpha. | |
| std::string | GetFilePath () |
| Returns the path for the image file used for the texture. | |
| int | GetFilterType (int t) |
| Returns the filter type used for the texture. | |
| int | GetAlfaSource (int t) |
| Returns the alfa source used for the texture. | |
| bool | GetPremultipliedAlpha (int t) |
| Returns if the texture used or not a premultiplied alpha. | |
| 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. | |
| int | Save (SceneSave *scene_save) |
| Saves the info of a bitmap texture. | |
| int | Load (SceneLoad *scene_load) |
| Loads the info for a bitmap texture. | |
| void | DeleteThis () |
| Delete this object. | |
| void | ActionBegin (int time, int action) |
| void | ActionEnd (int time, int action) |
| void | Update (int time) |
| Block * | Clone () |
| 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. | |
Static Public Attributes | |
| static BlockType | block_type |
Enum DATAID Enums the Ids for the differents Data used for the BitmapTexture
Enum CHUNKS Enum the chunks used for the Texture bitmap
| ScEng::BitmapTexture::BitmapTexture | ( | bool | create_dependencies | ) |
Constructor Sets the filter type and the alpha source to 0.
| BlockType ScEng::BitmapTexture::GetBlockType | ( | ) | [virtual] |
| int ScEng::BitmapTexture::NumDependencies | ( | ) | [virtual] |
| void ScEng::BitmapTexture::SetDependency | ( | int | id, | |
| Block * | dependency | |||
| ) | [virtual] |
Sets a dependency The id for the dependencie must be BITMAP_PLACE2DTEX_DEPENDENCY
| id | the id for the dependency | |
| dependency | the dependecy |
Implements ScEng::Block.
| Block * ScEng::BitmapTexture::GetDependency | ( | int | id | ) | [virtual] |
Gets the dependency The id for the dependency must be BITMAP_PLACE2DTEX_DEPENDENCY
| id | the id for the depedency |
Implements ScEng::Block.
| unsigned int ScEng::BitmapTexture::GetDependencyType | ( | int | i | ) | [virtual] |
Returns the type of the i-th dependency of this block.
Reimplemented from ScEng::Block.
| void ScEng::BitmapTexture::SetName | ( | std::string | new_name | ) | [virtual] |
Sets the name for the texture
| new_name | the name for the texture |
Implements ScEng::Material.
| void ScEng::BitmapTexture::SetPlace2DTexture | ( | Place2DTexture * | place_2D_texture | ) |
Sets the Place2DTexture for this texture
| place_2D_texture | the Place2DTexture to be assigned |
| int ScEng::BitmapTexture::GetNumDataTables | ( | ) | [virtual] |
Returns the number of DataTables used for this class
Reimplemented from ScEng::Block.
| void ScEng::BitmapTexture::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::BitmapTexture::ActionEnd | ( | int | time, | |
| int | action | |||
| ) | [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::BitmapTexture::Update | ( | int | time | ) | [virtual] |
This method moves all the values from the DataTable to raw variables for faster computations.
| time | the time for evaluating the DataTables. |
Reimplemented from ScEng::Block.
| Block * ScEng::BitmapTexture::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.
The type of this block BlockType BitmapTexture::block_type( BlockType::TEXTURE, 0x00500000, 0x00000000 )
1.5.1-p1