Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

A3DL::Texture Class Reference

Represents a texture layer in a 3D object's Material. More...

#include <texture.hh>

Inheritance diagram for A3DL::Texture:

MetaObject List of all members.

Public Member Functions

Static Public Member Functions

Protected Attributes


Detailed Description

Represents a texture layer in a 3D object's Material.

Todo:
Need to add functions for setting shading (CS mixmode |= CS_FX_GORAUD), keycolor (CS mixmode |= CS_FX_KEYCOLOR), tiling (CS mixmode |= CS_FX_TILING)

Definition at line 46 of file texture.hh.


Constructor & Destructor Documentation

Texture::Texture MetaObject superobject  ) 
 

Definition at line 30 of file texture.cc.

Referenced by new_Texture().

Texture::~Texture  )  [virtual]
 

Definition at line 35 of file texture.cc.


Member Function Documentation

short Texture::getBlendMode  )  [virtual]
 

Get special blend mode.

Will be one of the following: MeshBase::BLEND_ADD MeshBase::BLEND_MULTIPLY MeshBase::BLEND_DOUBLE_MULTIPLY MeshBase::BLEND_NORMAL These blend modes determine how the background affects the object's material.

Exceptions:
Vobject::NoSuchObjectError if there is no "a3dl:blend-mode" property.

Definition at line 116 of file texture.cc.

Property * Texture::getBlendModeObj  )  [virtual]
 

Get blend mode property object.

Definition at line 135 of file texture.cc.

Property * Texture::getImage  )  [virtual]
 

Definition at line 70 of file texture.cc.

PropertyAccessControl* A3DL::Texture::getPropertyAccessControl  )  [inline]
 

Definition at line 59 of file texture.hh.

bool Texture::getShaded  )  [virtual]
 

Get whether this layer should have shading or not.

Exceptions:
Vobject:NoSuchObjectError if there is no "a3dl:shaded" object.

Definition at line 220 of file texture.cc.

Property * Texture::getShadedObj  )  [virtual]
 

Get shaded property object

Exceptions:
Vobject::NoSuchObjectError if there is no "a3dl:shaded" object.

Definition at line 225 of file texture.cc.

double Texture::getTransparency  )  [virtual]
 

Get transparency.

Will be between 0 (no transparency) and 1 (fully transparent).

Exceptions:
Vobject:NoSuchObjectError if there is no "a3dl:transparency" object.

Definition at line 152 of file texture.cc.

Property * Texture::getTransparencyObj  )  [virtual]
 

Get transparency property.

Definition at line 156 of file texture.cc.

void Texture::getTransparentKeycolor float &  r,
float &  g,
float &  b
[virtual]
 

Get the color in the texture that is rendered as transparent If there is no property, sets (r, g, b) to (0, 0, 0).

Todo:
Throw NoSuchObjectError if there is no object-- need to disable keycolor if the texture image has an alpha channel.

Definition at line 200 of file texture.cc.

const string Texture::getType  )  [virtual]
 

Definition at line 44 of file texture.cc.

void Texture::getUVScaleAndShift float &  uscale,
float &  vscale,
float &  ushift,
float &  vshift
[virtual]
 

Definition at line 176 of file texture.cc.

MetaObject * Texture::new_Texture MetaObject superobject,
const string &  type
[static]
 

Definition at line 39 of file texture.cc.

void Texture::registerExtenders  )  [static]
 

Definition at line 49 of file texture.cc.

void Texture::setBlendMode short  mode  )  [virtual]
 

Set special blend mode.

Must be one of the following: MeshBase::BLEND_ADD MeshBase::BLEND_MULTIPLY MeshBase::BLEND_DOUBLE_MULTIPLY MeshBase::BLEND_NORMAL These blend modes determine how the background affects the object's material.

Definition at line 100 of file texture.cc.

void Texture::setBlendModeObj Property p  )  [virtual]
 

Set blend mode property object.

Definition at line 139 of file texture.cc.

void Texture::setImage Property p  )  [virtual]
 

Definition at line 57 of file texture.cc.

void Texture::setImageData const string &  data,
const string &  datatype
[virtual]
 

Definition at line 66 of file texture.cc.

void Texture::setImageToFile const string &  filename,
const string &  datatype
[virtual]
 

Set a file backend for the image for this texture (using FileProperty).

See also:
FileProperty
Exceptions:
FileAccessError if there is an error opening the file

Definition at line 74 of file texture.cc.

void A3DL::Texture::setPropertyAccessControl PropertyAccessControl pac  )  [inline]
 

Definition at line 58 of file texture.hh.

void Texture::setShaded bool  s,
PropertyAccessControl ac = &NoPropertyAccessControl::static_
[virtual]
 

Set whether this layer should have shading.

Definition at line 216 of file texture.cc.

void Texture::setShadedObj Property obj  )  [virtual]
 

Set shaded property object.

Definition at line 229 of file texture.cc.

void Texture::setTransparency double  t,
PropertyAccessControl ac = &NoPropertyAccessControl::static_
[virtual]
 

Set general transparency of the texture.

Parameters:
t A value between 0 (no transparency) and 1 (fully transparent). Some renderers may round to certain values (e.g. 1.0, 0.75, 0.5, 0.25, 0.0) If t is > 1, 1 will be used. If t < 0, 0 will be used.

Definition at line 148 of file texture.cc.

void Texture::setTransparencyObj Property obj  )  [virtual]
 

Set transparency property object.

Definition at line 160 of file texture.cc.

void Texture::setTransparentKeycolor float  r,
float  g,
float  b
[virtual]
 

Set a color in the texture to be rendered transparent.

Definition at line 193 of file texture.cc.

void Texture::setUVScaleAndShift float  uscale,
float  vscale,
float  ushift,
float  vshift
[virtual]
 

Definition at line 169 of file texture.cc.


Member Data Documentation

PropertyAccessControl* A3DL::Texture::accesscontrol [protected]
 

Definition at line 49 of file texture.hh.

Referenced by setBlendMode(), setImageData(), setImageToFile(), setTransparentKeycolor(), and setUVScaleAndShift().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:56:01 2003 for Interreality Project - VOS by doxygen 1.3.2