vtMaterial Class Reference
[Scene Graph]

Inheritance diagram for vtMaterial:

Inheritance graph
[legend]
List of all members.

Detailed Description

A material is a description of how a surface should be rendered. For a good description of how Materials work, see the opengl.org website or the OpenGL Red Book.

Much of the functionality of vtMaterial is inherited from its base class, vtMaterialBase.


Public Member Functions

void SetDiffuse (float r, float g, float b, float a=1.0f)
RGBAf GetDiffuse () const
void SetSpecular (float r, float g, float b)
RGBf GetSpecular () const
void SetAmbient (float r, float g, float b)
RGBf GetAmbient () const
void SetEmission (float r, float g, float b)
RGBf GetEmission () const
void SetCulling (bool bCulling)
bool GetCulling () const
void SetLighting (bool bLighting)
bool GetLighting () const
void SetTransparent (bool bOn, bool bAdd=false)
bool GetTransparent () const
void SetWireframe (bool bOn)
bool GetWireframe () const
void SetTexture (vtImage *pImage)
bool SetTexture2 (const char *szFilename)
vtImageGetTexture () const
void ModifiedTexture ()
void SetClamp (bool bClamp)
bool GetClamp () const
void SetMipMap (bool bMipMap)
bool GetMipMap () const


Member Function Documentation

RGBf vtMaterial::GetAmbient  )  const [virtual]
 

Get the ambient color of this material.

Implements vtMaterialBase.

bool vtMaterial::GetClamp  )  const
 

Get the texture clamping property of this material.

bool vtMaterial::GetCulling  )  const [virtual]
 

Get the backface culling property of this material.

Implements vtMaterialBase.

RGBAf vtMaterial::GetDiffuse  )  const [virtual]
 

Get the diffuse color of this material.

Implements vtMaterialBase.

RGBf vtMaterial::GetEmission  )  const [virtual]
 

Get the emissive color of this material.

Implements vtMaterialBase.

bool vtMaterial::GetLighting  )  const [virtual]
 

Get the lighting property of this material.

Implements vtMaterialBase.

bool vtMaterial::GetMipMap  )  const
 

Get the texture mipmapping property of this material.

RGBf vtMaterial::GetSpecular  )  const [virtual]
 

Get the specular color of this material.

Implements vtMaterialBase.

vtImage * vtMaterial::GetTexture  )  const
 

Returns the texture (image) associated with a material.

bool vtMaterial::GetTransparent  )  const [virtual]
 

Get the transparent property of this material.

Implements vtMaterialBase.

bool vtMaterial::GetWireframe  )  const
 

Get the wireframe property of this material.

void vtMaterial::ModifiedTexture  ) 
 

Call this method to tell vtlib that you have modified the contents of a texture so it needs to be sent again to the graphics card.

void vtMaterial::SetAmbient float  r,
float  g,
float  b
[virtual]
 

Set the ambient color of this material.

Implements vtMaterialBase.

void vtMaterial::SetClamp bool  bClamp  ) 
 

Set the texture clamping property for this material.

void vtMaterial::SetCulling bool  bCulling  )  [virtual]
 

Set the backface culling property of this material.

Implements vtMaterialBase.

void vtMaterial::SetDiffuse float  r,
float  g,
float  b,
float  a = 1.0f
[virtual]
 

Set the diffuse color of this material.

Parameters:
r,g,b The rgb value (0.0 to 1.0) of this material
a For a material with transparency enabled, the alpha component of the diffuse color determines the overall transparency of the material. This value ranges from 0 (totally transparent) to 1 (totally opaque.)

Implements vtMaterialBase.

void vtMaterial::SetEmission float  r,
float  g,
float  b
[virtual]
 

Set the emissive color of this material.

Implements vtMaterialBase.

void vtMaterial::SetLighting bool  bLighting  )  [virtual]
 

Set the lighting property of this material.

Implements vtMaterialBase.

void vtMaterial::SetMipMap bool  bMipMap  ) 
 

Set the texture mipmapping property for this material.

void vtMaterial::SetSpecular float  r,
float  g,
float  b
[virtual]
 

Set the specular color of this material.

Implements vtMaterialBase.

void vtMaterial::SetTexture vtImage pImage  )  [virtual]
 

Set the texture for this material.

"Note, If the mode is set USE_IMAGE_DATA_FORMAT, USE_ARB_COMPRESSION, USE_S3TC_COMPRESSION the internalFormat is automatically selected, and will overwrite the previous _internalFormat.

Implements vtMaterialBase.

bool vtMaterial::SetTexture2 const char *  szFilename  ) 
 

Loads and sets the texture for a material.

void vtMaterial::SetTransparent bool  bOn,
bool  bAdd = false
[virtual]
 

Set the transparent property of this material.

Parameters:
bOn True to turn on transparency (blending).
bAdd True for additive blending.

Implements vtMaterialBase.

void vtMaterial::SetWireframe bool  bOn  ) 
 

Set the wireframe property of this material.

Parameters:
bOn True to turn on wireframe.


Generated on Tue Apr 22 10:11:07 2008 for vtlib library by  doxygen 1.4.5