#include <sglFog.hpp>
Inheritance diagram for sglFog::
Public Types | |
enum | ModeEnum { eOFF = 0, eEXP = GL_EXP, eEXP2 = GL_EXP2, eLINEAR = GL_LINEAR } |
enum | DistanceEqEnum { eEYE_PLANE_ABSOLUTE = GL_EYE_PLANE_ABSOLUTE_NV, eEYE_RADIAL = GL_EYE_RADIAL_NV } |
Public Methods | |
sglFog () | |
virtual | ~sglFog () |
void | setMode (ModeEnum mode) |
ModeEnum | getMode () const |
void | setDistanceEquation (DistanceEqEnum eq) |
DistanceEqEnum | getDistanceEquation () const |
void | setExtent (float start, float end) |
void | getExtent (float &start, float &end) const |
void | setDensity (float density) |
float | getDensity () const |
void | setColor (const sglVec4f &color) |
void | setColor (float r, float g, float b, float a) |
const sglVec4f& | getColor () const |
void | apply (sglCurrState *) const |
virtual bool | getSorted () const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Attributes | |
ModeEnum | m_mode |
float | m_start |
float | m_end |
float | m_density |
DistanceEqEnum | m_distance_equation |
sglVec4f | m_color |
Example:
sglFog *fog = new sglFog; fog->setMode(sglFog::eLINEAR); fog->setColor(0.f, 0.f, 0.f, 1.0f); fog->setExtent(0.f, 100.f); fog->setDensity(0.025f); if (sgl::s_fog_distance_capable) { fog->setDistanceEquation(sglFog::eEYE_RADIAL); }
Definition at line 60 of file sglFog.hpp.
|
Valid sglFog modes:.
Definition at line 64 of file sglFog.hpp. |
|
Distance equations for systems with the NVIDIA extensions.
Definition at line 80 of file sglFog.hpp. |
|
Default constructor. Initializes a disabled fog statelet (i.e. no fog).
|
|
Virtual destructor.
|
|
Set the fog mode.
|
|
Get the current fog mode.
Definition at line 105 of file sglFog.hpp. |
|
Set the fog distance calculation equation.
|
|
Get the current fog distance calc. eq.
Definition at line 116 of file sglFog.hpp. |
|
Set the extent of the fog (distances from the viewer). This is used in eLinear mode only. Only values greater than or equal to zero are accepted and end must be greater than start.
|
|
Get the linear fog extents.
Definition at line 130 of file sglFog.hpp. |
|
Set the fog density parameter for exponential modes.
|
|
Get the density.
Definition at line 142 of file sglFog.hpp. |
|
Set the fog color.
Definition at line 148 of file sglFog.hpp. |
|
Set the fog color using 4 floating point values (from 0...1).
Definition at line 156 of file sglFog.hpp. |
|
Get the fog color.
Definition at line 161 of file sglFog.hpp. |
|
Apply this state change to the current rendering state.
Reimplemented from sglStatelet. |
|
Query the sorting mode for this statelet.
Reimplemented from sglStatelet. Definition at line 167 of file sglFog.hpp. |
|
Output the state of this node to the specified ostream.
Reimplemented from sglStatelet. |