ScEng::MaskTexture Class Reference

Please add comments here. More...

#include <masktexture.h>

Inheritance diagram for ScEng::MaskTexture:

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

Public Types

enum  DATAID { , id_mask_on, id_invert }
 Enum DATAID. More...
enum  DEPENDENCIES { DATA_TABLE_DEPENDENCY, MAP_DEPENDENCY, MASK_DEPENDENCY }
 Enum DEPENDENCIES. More...
enum  CHUNKS { NAME_CHUNKID = 0x00000005 }
 Enum CHUNKS. More...

Public Member Functions

 MaskTexture (bool create_dependencies)
 Constructor.
std::string GetClassName ()
 Returns the name for this class.
BlockType GetBlockType ()
 Virtual function.
int NumDependencies ()
 Returns the number of Dependencies for this class.
void SetDependency (int id, Block *dependency)
 Sets a Dependency.
BlockGetDependency (int i)
 Returns the specific dependency.
std::string GetDependencyName (int i)
 Gets the name for the specified dependency.
unsigned int GetDependencyType (int i)
BlockClone ()
 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.
void SetNumSubTextures (int num)
 Sets the number of subtextures.
int GetNumSubTextures ()
 Returns the number of subtextures.
TextureGetSubTexture (int i)
 Returns a specific sub-texture.
void SetSubTexture (int i, Texture *texture)
 Sets a specific sub-texture.
int GetNumDataTables ()
 This class has no DataTables.
DataTableGetDataTable (int id=0)
 This class has no DataTables.
void SetDataTable (DataTable *d, int i=0)
 Sets the i_th data table.
void UpdateDataTable (int id=0)
 This class has no DataTables.
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 the texture layer.
DataTabledt
 The DataTable to hold the info for this class.

Static Public Attributes

static BlockType block_type

Detailed Description

Please add comments here.


Member Enumeration Documentation

enum ScEng::MaskTexture::DATAID

Enum DATAID.

Enums the Ids for the differents Data used for the NoiseTexture

Enumerator:
id_mask_on  <The id for the double sided value in the DataTable
id_invert  <The id for the specular_level in the DataTable

enum ScEng::MaskTexture::DEPENDENCIES

Enum DEPENDENCIES.

Enums the chunks used for this class

Enumerator:
DATA_TABLE_DEPENDENCY  The dependency to the data table
MAP_DEPENDENCY  The dependency to the map texture
MASK_DEPENDENCY  The dependency to the mask texture

enum ScEng::MaskTexture::CHUNKS

Enum CHUNKS.

Enums the differents types of dependency for this class

Enumerator:
NAME_CHUNKID  Name chunk


Constructor & Destructor Documentation

ScEng::MaskTexture::MaskTexture ( bool  create_dependencies  ) 

Constructor.

Sets the layers array to NULL


Member Function Documentation

std::string ScEng::MaskTexture::GetClassName (  )  [virtual]

Returns the name for this class.

Returns:
Returns "MaskTexture"

Implements ScEng::Block.

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

Returns the number of Dependencies for this class.

Returns:
Returns 1

Implements ScEng::Block.

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

Sets a Dependency.

Sets the layers pointer

Parameters:
id the id for the dependency
dependency the dependency

Implements ScEng::Block.

Block * ScEng::MaskTexture::GetDependency ( int  i  )  [virtual]

Returns the specific dependency.

Returns:
Return the layer pointer

Implements ScEng::Block.

unsigned int ScEng::MaskTexture::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::MaskTexture::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::MaskTexture::SetNumSubTextures ( int  num  )  [virtual]

Sets the number of subtextures.

Sets the vector size for the layers

Parameters:
num the size for the layers

Implements ScEng::Material.

int ScEng::MaskTexture::GetNumSubTextures (  )  [virtual]

Returns the number of subtextures.

Returns:
Returns the vector size of the layers

Implements ScEng::Material.

Texture * ScEng::MaskTexture::GetSubTexture ( int  i  )  [virtual]

Returns a specific sub-texture.

Parameters:
i the id for the texture
Returns:
Returns the element in the i position in the array of layers

Implements ScEng::Material.

void ScEng::MaskTexture::SetSubTexture ( int  i,
Texture texture 
) [virtual]

Sets a specific sub-texture.

Parameters:
i the index for the texture
texture the Texture to be set

Implements ScEng::Material.

DataTable * ScEng::MaskTexture::GetDataTable ( int  id = 0  )  [virtual]

This class has no DataTables.

Returns:
Returns NULL

Reimplemented from ScEng::Block.

void ScEng::MaskTexture::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::MaskTexture::ActionEnd ( int  time,
int  action 
) [inline, 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::MaskTexture::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.

Parameters:
time the time at which the block needs to update its data.

Reimplemented from ScEng::Block.


Member Data Documentation

BlockType ScEng::MaskTexture::block_type [static]

The type of this block BlockType MaskTexture::block_type( BlockType::TEXTURE, 0x00500000,0x00000010 );


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