osg::Fog Class Reference

Inheritance diagram for osg::Fog:

osg::StateAttribute osg::Object osg::Referenced 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 Member Functions

 Fog ()
 Fog (const Fog &fog, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_StateAttribute (osg, Fog, FOG)
virtual int compare (const StateAttribute &sa) const
virtual bool getModeUsage (ModeUsage &usage) const
void setMode (Mode mode)
Mode getMode () const
void setDensity (float density)
float getDensity () const
void setStart (float start)
float getStart () const
void setEnd (float end)
float getEnd () const
void setColor (const Vec4 &color)
const Vec4getColor () const
void setFogCoordinateSource (GLint source)
GLint getFogCoordinateSource () const
virtual void apply (State &state) const

Protected Member Functions

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::Mode

Enumerator:
LINEAR 
EXP 
EXP2 

enum osg::Fog::FogCoordinateSource

Enumerator:
FOG_COORDINATE 
FRAGMENT_DEPTH 


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

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

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 bool osg::Fog::getModeUsage ( ModeUsage &  usage  )  const [inline, virtual]

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

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

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

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

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

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

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

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

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

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

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

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

virtual void osg::Fog::apply ( 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.


Member Data Documentation

Mode osg::Fog::_mode [protected]

float osg::Fog::_density [protected]

float osg::Fog::_start [protected]

float osg::Fog::_end [protected]

Vec4 osg::Fog::_color [protected]

GLint osg::Fog::_fogCoordinateSource [protected]


The documentation for this class was generated from the following file:
Generated on Thu Sep 27 06:07:16 2007 for OpenSceneGraph by  doxygen 1.5.2