CIvfMaterial Class Reference

#include <ivf/IvfMaterial.h>

Inheritance diagram for CIvfMaterial:

CIvfObject CIvfBase CIvfRefCountBase CIvfRTTIBase List of all members.

Public Member Functions

bool getColorMaterial ()
void setColorMaterial (bool flag)
 CIvfMaterial ()
virtual ~CIvfMaterial ()
 IvfClassInfo ("CIvfMaterial", CIvfObject)
void setShininess (float shininess)
void getShininess (float &shininess)
void setEmissionColor (const float red, const float green, const float blue, const float alfa)
void getEmissionColor (float &red, float &green, float &blue, float &alfa)
void setDiffuseColor (const float red, const float green, const float blue, const float alfa)
void getDiffuseColor (float &red, float &green, float &blue, float &alfa)
void setSpecularColor (const float red, const float green, const float blue, const float alfa)
void getSpecularColor (float &red, float &green, float &blue, float &alfa)
void setAmbientColor (const float red, const float green, const float blue, const float alfa)
void getAmbientColor (float &red, float &green, float &blue, float &alfa)
void setAlphaValue (float alpha)
void multiplyColor (double factor)
void multiplyEmission (double factor)
void multiplyAmbient (double factor)
void multiplyDiffuse (double factor)
void multiplySpecular (double factor)
void assignFrom (CIvfMaterial *material)
void brightnessEmission (double factor)
void brightnessAmbient (double factor)
void brightnessDiffuse (double factor)
void brightnessSpecular (double factor)

Protected Member Functions

virtual void createMaterial ()

Detailed Description

OpenGL material definition.

CIvfMateral contains a material definition as used in OpenGL. The class is used by classes derived from the CIvfShape class.

Author:
Jonas Lindemann
Examples:

actionctl.cpp, advgeom.cpp, controllers.cpp, culling.cpp, extrusion.cpp, handlers.cpp, lighting.cpp, lod.cpp, manip.cpp, placement.cpp, robot.cpp, selection.cpp, and textures.cpp.

Definition at line 40 of file IvfMaterial.h.


Constructor & Destructor Documentation

CIvfMaterial::CIvfMaterial (   ) 
 

CIvfMaterial constructor

virtual CIvfMaterial::~CIvfMaterial (   )  [virtual]
 

CIvfMaterial destructor


Member Function Documentation

virtual void CIvfMaterial::createMaterial (   )  [protected, virtual]
 

Creates the material of the object.

This method is called from the render() method when material rendering is to be done. Objects derived from CIvfObject should implement material routines from this method using OpenGL.

Reimplemented from CIvfObject.

void CIvfMaterial::getAmbientColor (  float &  red,
float &  green,
float &  blue,
float &  alfa
) 
 

Returns the ambient color components

void CIvfMaterial::getDiffuseColor (  float &  red,
float &  green,
float &  blue,
float &  alfa
) 
 

Returns the diffuse color components

void CIvfMaterial::getEmissionColor (  float &  red,
float &  green,
float &  blue,
float &  alfa
) 
 

Returns the emissive color components

void CIvfMaterial::getShininess (  float &  shininess  ) 
 

Returns the shininess property

void CIvfMaterial::getSpecularColor (  float &  red,
float &  green,
float &  blue,
float &  alfa
) 
 

Returns the specular color components

void CIvfMaterial::setAlphaValue (  float  alpha  ) 
 

Set material alpha value for all material properties

void CIvfMaterial::setAmbientColor (  const float  red,
const float  green,
const float  blue,
const float  alfa
) 
 

Sets the ambient color components

Sets the ambient color components using red, green and blue components. See OpenGL documentation.

Parameters:
red Red color component (0.0f-1.0f)
green Green color component (0.0f-1.0f)
blue Blue color component (0.0f-1.0f)
alfa Opacity component (0.0f-1.0f)

void CIvfMaterial::setDiffuseColor (  const float  red,
const float  green,
const float  blue,
const float  alfa
) 
 

Sets the diffuse color components

Sets the diffuse color components using red, green and blue components. See OpenGL documentation.

Parameters:
red Red color component (0.0f-1.0f)
green Green color component (0.0f-1.0f)
blue Blue color component (0.0f-1.0f)
alfa Opacity component (0.0f-1.0f)

void CIvfMaterial::setEmissionColor (  const float  red,
const float  green,
const float  blue,
const float  alfa
) 
 

Sets the emsissive color components

Sets the emissive color components using red, green and blue components. See OpenGL documentation.

Parameters:
red Red color component (0.0f-1.0f)
green Green color component (0.0f-1.0f)
blue Blue color component (0.0f-1.0f)
alfa Opacity component (0.0f-1.0f)

void CIvfMaterial::setShininess (  float  shininess  ) 
 

Sets the shininess property.

See OpenGL documentation

Parameters:
shininess Has a range between 0 and 128

void CIvfMaterial::setSpecularColor (  const float  red,
const float  green,
const float  blue,
const float  alfa
) 
 

Sets the specular color components

Sets the specular color components using red, green and blue components. See OpenGL documentation.

Parameters:
red Red color component (0.0f-1.0f)
green Green color component (0.0f-1.0f)
blue Blue color component (0.0f-1.0f)
alfa Opacity component (0.0f-1.0f)


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 15:36:53 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO