OpenSceneGraph 2.8.3
|
Fog - encapsulates OpenGL fog state. More...
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 ©op=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 bool | getModeUsage (StateAttribute::ModeUsage &usage) const |
Return the modes associated with this StateAttribute. | |
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 Vec4 & | getColor () const |
void | setFogCoordinateSource (GLint source) |
GLint | getFogCoordinateSource () const |
virtual void | apply (State &state) const |
apply the OpenGL state attributes. | |
Protected Member Functions | |
virtual | ~Fog () |
Protected Attributes | |
Mode | _mode |
float | _density |
float | _start |
float | _end |
Vec4 | _color |
GLint | _fogCoordinateSource |
Fog - encapsulates OpenGL fog state.
enum osg::Fog::Mode |
osg::Fog::Fog | ( | ) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::Fog::~Fog | ( | ) | [protected, virtual] |
virtual void osg::Fog::apply | ( | State & | ) | const [virtual] |
apply the OpenGL state attributes.
The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.
Reimplemented from 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.
References COMPARE_StateAttribute_Parameter, and COMPARE_StateAttribute_Types.
const Vec4& osg::Fog::getColor | ( | ) | const [inline] |
float osg::Fog::getDensity | ( | ) | const [inline] |
float osg::Fog::getEnd | ( | ) | const [inline] |
GLint osg::Fog::getFogCoordinateSource | ( | ) | const [inline] |
Mode osg::Fog::getMode | ( | ) | const [inline] |
virtual bool osg::Fog::getModeUsage | ( | StateAttribute::ModeUsage & | ) | const [inline, virtual] |
Return the modes associated with this StateAttribute.
Reimplemented from osg::StateAttribute.
References osg::StateAttribute::ModeUsage::usesMode().
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 | ( | float | density | ) | [inline] |
void osg::Fog::setEnd | ( | float | end | ) | [inline] |
void osg::Fog::setFogCoordinateSource | ( | GLint | source | ) | [inline] |
void osg::Fog::setMode | ( | Mode | mode | ) | [inline] |
void osg::Fog::setStart | ( | float | start | ) | [inline] |
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] |
![]() | Generated at Tue Mar 22 2011 13:20:21 for the OpenSceneGraph by doxygen 1.7.3. |