version 3.3

VRS::Fog Class Reference

Fog Volume Shader. More...

#include <vrs/fog.h>

Inheritance diagram for VRS::Fog:

VRS::MonoAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  FogMode { Linear, Exp, Exp2 }

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (FogMode)
 Fog (double density=1, const Color &fogcolor=Color(0.7, 0.7, 0.7), FogMode mode=Fog::Linear, double start=0., double end=1.)
virtual void setColor (const Color &)
virtual Color getColor () const
 Fog color.
virtual void setMode (FogMode mode)
virtual FogMode getMode () const
 Fog equation.
virtual void setDensity (double)
virtual double getDensity () const
virtual void setStart (double)
virtual double getStart () const
virtual void setEnd (double)
virtual double getEnd () const
 VRS_TYPEINFO (Fog, MonoAttribute)
 VRS_SERIALIZABLE (Fog)


Detailed Description

Fog Volume Shader.

Member Enumeration Documentation

Enumerator:
Linear 
Exp 
Exp2 


Constructor & Destructor Documentation

VRS::Fog::Fog ( double  density = 1,
const Color fogcolor = Color(0.7, 0.7, 0.7),
FogMode  mode = Fog::Linear,
double  start = 0.,
double  end = 1. 
)

A fog shader mixes the fog color into the light accordinag to the distance between the surface and the viewpoint.


Member Function Documentation

VRS::Fog::VRS_SERIALIZABLE_CLASS_ENUM ( FogMode   ) 

virtual void VRS::Fog::setColor ( const Color  )  [virtual]

Color VRS::Fog::getColor (  )  const [inline, virtual]

Fog color.

virtual void VRS::Fog::setMode ( FogMode  mode  )  [virtual]

Fog::FogMode VRS::Fog::getMode (  )  const [inline, virtual]

Fog equation.

virtual void VRS::Fog::setDensity ( double   )  [virtual]

double VRS::Fog::getDensity (  )  const [inline, virtual]

The fog is mixed i with weight exp(-density * z-depth), which is 0 at depth 0 and increases with increasing depth, but never reaches 1.

virtual void VRS::Fog::setStart ( double   )  [virtual]

double VRS::Fog::getStart (  )  const [inline, virtual]

virtual void VRS::Fog::setEnd ( double   )  [virtual]

double VRS::Fog::getEnd (  )  const [inline, virtual]

VRS::Fog::VRS_TYPEINFO ( Fog  ,
MonoAttribute   
)

VRS::Fog::VRS_SERIALIZABLE ( Fog   ) 


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

Generated on Mon May 21 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact