Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::Fog Class Reference

Fog - encapsulates OpenGL fog state. More...

Inheritance diagram for osg::Fog:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Mode { LINEAR = GL_LINEAR, EXP = GL_EXP, EXP2 = GL_EXP2 }
enum  FogCoordinateSource { FOG_COORDINATE = GL_FOG_COORDINATE, FRAGMENT_DEPTH = GL_FRAGMENT_DEPTH }

Public Methods

 Fog ()
 Fog (const Fog &fog, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.

 META_StateAttribute (osg, Fog, FOG)
virtual int compare (const StateAttribute &sa) const
 return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

virtual void getAssociatedModes (std::vector< GLMode > &modes) const
 return the modes associated with this StateSet

void setMode (const Mode mode)
Mode getMode () const
void setDensity (const float density)
const float getDensity () const
void setStart (const float start)
const float getStart () const
void setEnd (const float end)
const float getEnd () const
void setColor (const Vec4 &color)
const Vec4 & getColor () const
void setFogCoordinateSource (GLint source)
GLint getFogCoordinateSource () const
virtual void apply (State &state) const
 apply the OpenGL state attributes.


Protected Methods

virtual ~Fog ()

Protected Attributes

Mode _mode
float _density
float _start
float _end
Vec4 _color
GLint _fogCoordinateSource

Detailed Description

Fog - encapsulates OpenGL fog state.


Member Enumeration Documentation

enum osg::Fog::FogCoordinateSource
 

Enumeration values:
FOG_COORDINATE 
FRAGMENT_DEPTH 

enum osg::Fog::Mode
 

Enumeration values:
LINEAR 
EXP 
EXP2 


Constructor & Destructor Documentation

osg::Fog::Fog (    ) 
 

osg::Fog::Fog (  const Fog &    fog,
const CopyOp &    copyop = CopyOp::SHALLOW_COPY
)  [inline]
 

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::Fog::~Fog (    )  [protected, virtual]
 


Member Function Documentation

virtual void osg::Fog::apply (  State &    state )  const [virtual]
 

apply the OpenGL state attributes.

The global state for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.

Implements osg::StateAttribute.

virtual int osg::Fog::compare (  const StateAttribute &    sa )  const [inline, virtual]
 

return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Implements osg::StateAttribute.

virtual void osg::Fog::getAssociatedModes (  std::vector< GLMode > &    modes )  const [inline, virtual]
 

return the modes associated with this StateSet

Reimplemented from osg::StateAttribute.

const Vec4& osg::Fog::getColor (    )  const [inline]
 

const float osg::Fog::getDensity (    )  const [inline]
 

const float osg::Fog::getEnd (    )  const [inline]
 

GLint osg::Fog::getFogCoordinateSource (    )  const [inline]
 

Mode osg::Fog::getMode (    )  const [inline]
 

const float osg::Fog::getStart (    )  const [inline]
 

osg::Fog::META_StateAttribute (  osg   ,
Fog   ,
FOG   
) 
 

void osg::Fog::setColor (  const Vec4 &    color )  [inline]
 

void osg::Fog::setDensity (  const float    density )  [inline]
 

void osg::Fog::setEnd (  const float    end )  [inline]
 

void osg::Fog::setFogCoordinateSource (  GLint    source )  [inline]
 

void osg::Fog::setMode (  const Mode    mode )  [inline]
 

void osg::Fog::setStart (  const float    start )  [inline]
 


Member Data Documentation

Vec4 osg::Fog::_color [protected]
 

float osg::Fog::_density [protected]
 

float osg::Fog::_end [protected]
 

GLint osg::Fog::_fogCoordinateSource [protected]
 

Mode osg::Fog::_mode [protected]
 

float osg::Fog::_start [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:30 2002 for the Open Scene Graph by doxygen 1.2.16.