# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::Fog Class Reference

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

`#include <Shader.hpp>`

Inheritance diagram for vl::Fog:

List of all members.

## Public Member Functions
| Fog (EFogMode mode=FM_LINEAR, fvec4 color=fvec4(0, 0, 0, 0), float density=1, float start=0, float end=1)
virtual const char * | className ()
| Returns the name of the class.
virtual ERenderState | type () const
virtual void | apply (const Camera *) const
void | set (EFogMode mode, fvec4 color, float density, float start, float end)
void | setColor (fvec4 color)
void | setMode (EFogMode mode)
void | setDensity (float density)
void | setStart (float start)
void | setEnd (float end)
fvec4 | color () const
EFogMode | mode () const
float | density () const
float | start () const
float | end () const
## Protected Attributes
fvec4 | mColor
EFogMode | mMode
float | mDensity
float | mStart
float | mEnd

## Detailed Description

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

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

## Constructor & Destructor Documentation

vl::Fog::Fog | ( | EFogMode | mode = `FM_LINEAR`,
|  | fvec4 | color = `fvec4(0,0,0,0)`,
|  | float | density = `1`,
|  | float | start = `0`,
|  | float | end = `1` |
| ) |  |  | `[inline]`

## Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::RenderState.

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

Reimplemented from vl::RenderState.

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

Implements vl::RenderState.

void vl::Fog::set | ( | EFogMode | mode,
|  | fvec4 | color,
|  | float | density,
|  | float | start,
|  | float | end |
| ) |  |  | `[inline]`

void vl::Fog::setColor | ( | fvec4 | color | ) | `[inline]`

void vl::Fog::setMode | ( | EFogMode | mode | ) | `[inline]`

void vl::Fog::setDensity | ( | float | density | ) | `[inline]`

void vl::Fog::setStart | ( | float | start | ) | `[inline]`

void vl::Fog::setEnd | ( | float | end | ) | `[inline]`

fvec4 vl::Fog::color | ( |  | ) | const`[inline]`

EFogMode vl::Fog::mode | ( |  | ) | const`[inline]`

float vl::Fog::density | ( |  | ) | const`[inline]`

float vl::Fog::start | ( |  | ) | const`[inline]`

float vl::Fog::end | ( |  | ) | const`[inline]`

## Member Data Documentation

fvec4 vl::Fog::mColor`[protected]`

EFogMode vl::Fog::mMode`[protected]`

float vl::Fog::mDensity`[protected]`

float vl::Fog::mStart`[protected]`

float vl::Fog::mEnd`[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.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 29 11:11:51 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.