# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::Material Class Reference

Wraps the OpenGL function glMaterial() and glColorMaterial(), see also http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml and http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml for more information. More...

`#include <Shader.hpp>`

Inheritance diagram for vl::Material:

List of all members.

## Public Member Functions

| Material ()
virtual const char * | className ()
| Returns the name of the class.
virtual ERenderState | type () const
virtual void | apply (const Camera *) const
void | setTransparency (float alpha)
void | setFrontTransparency (float alpha)
void | setBackTransparency (float alpha)
void | setFrontFlatColor (const fvec4 &color)
void | setBackFlatColor (const fvec4 &color)
void | setFlatColor (const fvec4 &color)
void | setAmbient (fvec4 color)
void | setDiffuse (fvec4 color)
void | setSpecular (fvec4 color)
void | setEmission (fvec4 color)
void | setShininess (float shininess)
void | setFrontAmbient (fvec4 color)
void | setFrontDiffuse (fvec4 color)
void | setFrontSpecular (fvec4 color)
void | setFrontEmission (fvec4 color)
void | setFrontShininess (float shininess)
fvec4 | frontAmbient () const
fvec4 | frontDiffuse () const
fvec4 | frontSpecular () const
fvec4 | frontEmission () const
float | frontShininess () const
void | setBackAmbient (fvec4 color)
void | setBackDiffuse (fvec4 color)
void | setBackSpecular (fvec4 color)
void | setBackEmission (fvec4 color)
void | setBackShininess (float shininess)
fvec4 | backAmbient () const
fvec4 | backDiffuse () const
fvec4 | backSpecular () const
fvec4 | backEmission () const
float | backShininess () const
void | setColorMaterial (EPolygonFace face, EColorMaterial color)
EPolygonFace | colorMaterialFace () const
EColorMaterial | colorMaterial () const
void | setColorMaterialEnabled (bool enabled)
bool | colorMaterialEnabled () const

## Protected Attributes

fvec4 | mFrontAmbient
fvec4 | mFrontDiffuse
fvec4 | mFrontSpecular
fvec4 | mFrontEmission
fvec4 | mBackAmbient
fvec4 | mBackDiffuse
fvec4 | mBackSpecular
fvec4 | mBackEmission
float | mBackShininess
float | mFrontShininess
EPolygonFace | mColorMaterialFace
EColorMaterial | mColorMaterial
bool | mColorMaterialEnabled

## Detailed Description

Wraps the OpenGL function glMaterial() and glColorMaterial(), see also http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml and http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml for more information.

See also:
  Shader, Effect, Actor, vl::EN_LIGHTING

## Constructor & Destructor Documentation

Material::Material | ( |  | ) |

## Member Function Documentation

virtual const char* vl::Material::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::RenderState.

virtual ERenderState vl::Material::type | ( |  | ) | const`[inline, virtual]`

Reimplemented from vl::RenderState.

void Material::apply | ( | const Camera * |  | ) | const`[virtual]`

Implements vl::RenderState.

void Material::setTransparency | ( | float | alpha | ) |

void Material::setFrontTransparency | ( | float | alpha | ) |

void Material::setBackTransparency | ( | float | alpha | ) |

void Material::setFrontFlatColor | ( | const fvec4 & | color | ) |

void Material::setBackFlatColor | ( | const fvec4 & | color | ) |

void Material::setFlatColor | ( | const fvec4 & | color | ) |

void vl::Material::setAmbient | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setDiffuse | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setSpecular | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setEmission | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setShininess | ( | float | shininess | ) | `[inline]`

void vl::Material::setFrontAmbient | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setFrontDiffuse | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setFrontSpecular | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setFrontEmission | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setFrontShininess | ( | float | shininess | ) | `[inline]`

fvec4 vl::Material::frontAmbient | ( |  | ) | const`[inline]`

fvec4 vl::Material::frontDiffuse | ( |  | ) | const`[inline]`

fvec4 vl::Material::frontSpecular | ( |  | ) | const`[inline]`

fvec4 vl::Material::frontEmission | ( |  | ) | const`[inline]`

float vl::Material::frontShininess | ( |  | ) | const`[inline]`

void vl::Material::setBackAmbient | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setBackDiffuse | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setBackSpecular | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setBackEmission | ( | fvec4 | color | ) | `[inline]`

void vl::Material::setBackShininess | ( | float | shininess | ) | `[inline]`

fvec4 vl::Material::backAmbient | ( |  | ) | const`[inline]`

fvec4 vl::Material::backDiffuse | ( |  | ) | const`[inline]`

fvec4 vl::Material::backSpecular | ( |  | ) | const`[inline]`

fvec4 vl::Material::backEmission | ( |  | ) | const`[inline]`

float vl::Material::backShininess | ( |  | ) | const`[inline]`

void vl::Material::setColorMaterial | ( | EPolygonFace | face,
|  | EColorMaterial | color |
| ) |  |  | `[inline]`

EPolygonFace vl::Material::colorMaterialFace | ( |  | ) | const`[inline]`

EColorMaterial vl::Material::colorMaterial | ( |  | ) | const`[inline]`

void vl::Material::setColorMaterialEnabled | ( | bool | enabled | ) | `[inline]`

bool vl::Material::colorMaterialEnabled | ( |  | ) | const`[inline]`

## Member Data Documentation

fvec4 vl::Material::mFrontAmbient`[protected]`

fvec4 vl::Material::mFrontDiffuse`[protected]`

fvec4 vl::Material::mFrontSpecular`[protected]`

fvec4 vl::Material::mFrontEmission`[protected]`

fvec4 vl::Material::mBackAmbient`[protected]`

fvec4 vl::Material::mBackDiffuse`[protected]`

fvec4 vl::Material::mBackSpecular`[protected]`

fvec4 vl::Material::mBackEmission`[protected]`

float vl::Material::mBackShininess`[protected]`

float vl::Material::mFrontShininess`[protected]`

EPolygonFace vl::Material::mColorMaterialFace`[protected]`

EColorMaterial vl::Material::mColorMaterial`[protected]`

bool vl::Material::mColorMaterialEnabled`[protected]`

The documentation for this class was generated from the following files:

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Shader.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Shader.cpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:40 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.