ScEng::BitmapTexture Class Reference

#include <bitmaptexture.h>

Inheritance diagram for ScEng::BitmapTexture:

ScEng::Texture ScEng::Material ScEng::Block List of all members.

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)
BlockGetDependency (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.
TextureGetSubTexture (int i)
 Virtual function.
void SetSubTexture (int i, Texture *texture)
 Virtual function.
void SetPlace2DTexture (Place2DTexture *place_2D_texture)
Place2DTextureGetPlace2DTexture ()
 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 ()
DataTableGetDataTable (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)
BlockClone ()
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

Detailed Description

A Bitmap Texture This class describes a texture that use a bitmap


Member Enumeration Documentation

enum ScEng::BitmapTexture::DATAID

Enum DATAID Enums the Ids for the differents Data used for the BitmapTexture

Enumerator:
id_alpha_source  <The id for the filter type value in the DataTable
id_premultiplied_alpha  <The id for the premultiplied alpha in the DataTable

enum ScEng::BitmapTexture::CHUNKS

Enum CHUNKS Enum the chunks used for the Texture bitmap

Enumerator:
NAME_CHUNKID  Name Chunk.
FILTER_CHUNKID  Filter Chunk.
ALFA_CHUNKID  Alfa Chunk.
FILEPATH_CHUNKID  Filepath Chunk.
PREMULTIPLIED_ALPHA_CHUNKID  Premultiplied alpha Chunk.

enum ScEng::BitmapTexture::DEPENDENCIES

Enum DEPENDENCIES Enum the dependencies for the Texture bitmap

Enumerator:
BITMAP_PLACE2DTEX_DEPENDENCY  Place2DTex Dependency.
DATA_TABLE_DEPENDENCY  DataTable Dependency.


Constructor & Destructor Documentation

ScEng::BitmapTexture::BitmapTexture ( bool  create_dependencies  ) 

Constructor Sets the filter type and the alpha source to 0.


Member Function Documentation

BlockType ScEng::BitmapTexture::GetBlockType (  )  [virtual]

Returns the BlockType for this class

Returns:
Returns SE_BITMAP_BLOCK_TYPE

Implements ScEng::Block.

int ScEng::BitmapTexture::NumDependencies (  )  [virtual]

Returns the number of dependencies for this class

Returns:
Returns 1

Implements ScEng::Block.

void ScEng::BitmapTexture::SetDependency ( int  id,
Block dependency 
) [virtual]

Sets a dependency The id for the dependencie must be BITMAP_PLACE2DTEX_DEPENDENCY

Parameters:
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

Parameters:
id the id for the depedency
Returns:
Returns a pointer to the dependency.

Implements ScEng::Block.

unsigned int ScEng::BitmapTexture::GetDependencyType ( int  i  )  [virtual]

Returns the type of the i-th dependency of this block.

Returns:
The type of the dependency. This is the type defined in BlockType::type.
See also:
BlockType

Reimplemented from ScEng::Block.

void ScEng::BitmapTexture::SetName ( std::string  new_name  )  [virtual]

Sets the name for the texture

Parameters:
new_name the name for the texture

Implements ScEng::Material.

void ScEng::BitmapTexture::SetPlace2DTexture ( Place2DTexture place_2D_texture  ) 

Sets the Place2DTexture for this texture

Parameters:
place_2D_texture the Place2DTexture to be assigned

int ScEng::BitmapTexture::GetNumDataTables (  )  [virtual]

Returns the number of DataTables used for this class

Returns:
Returns 1

Reimplemented from ScEng::Block.

void ScEng::BitmapTexture::ActionBegin ( int  time,
int  action 
) [virtual]

Informs the block that an action will begin

Parameters:
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.

Parameters:
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.

Parameters:
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.


Member Data Documentation

BlockType ScEng::BitmapTexture::block_type [static]

The type of this block BlockType BitmapTexture::block_type( BlockType::TEXTURE, 0x00500000, 0x00000000 )


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 10:49:21 2007 for SceneEngine by  doxygen 1.5.1-p1