This class implements fog inside the world. More...
#include <CFog.h>
Public Member Functions | |
cFog () | |
Constructor of cFog. More... | |
virtual | ~cFog () |
Destructor of cFog. More... | |
virtual void | render (cRenderOptions &a_options) |
This method renders the fog using OpenGL. More... | |
void | setEnabled (const bool a_enabled) |
This method enables of disables fog. More... | |
bool | getEnabled () const |
This method returns true if fog is enabled, false otherwise. More... | |
void | setFogMode (const GLint a_fogMode) |
This method sets the fog mode by passing the OpenGL fog mode constant as parameter (GL_LINEAR, GL_EXP, GL_EXP2). More... | |
void | setFogModeLINEAR () |
This method sets the fog mode to GL_LINEAR. More... | |
void | setFogModeEXP () |
This method sets the fog mode to GL_EXP. More... | |
void | setFogModeEXP2 () |
This method sets the fog mode to GL_EXP2. More... | |
GLint | getFogMode () |
This method returns the current fog mode. More... | |
void | setProperties (const double a_start, const double a_end, const double a_density) |
This method sets the fog properties. More... | |
Public Attributes | |
cColorf | m_color |
Fog color. More... | |
Protected Attributes | |
bool | m_enabled |
If true, then fog is enabled, false otherwise. More... | |
GLint | m_fogMode |
Fog mode. (GL_LINEAR, GL_EXP, GL_EXP2). More... | |
float | m_start |
Fog start distance. More... | |
float | m_end |
Fog end distance. More... | |
float | m_density |
Fog density. More... | |
This class implements support for OpenGL's fog capability. When fog is enabled, objects that are farther from the viewpoint begin to fade into the fog color. You can control the density of the fog, which determines the rate at which objects fade as the distance increases, as well as the fog's color.
chai3d::cFog::cFog | ( | ) |
Constructor of cFog.
|
inlinevirtual |
|
virtual |
This method render fog using OpenGL.
a_options | Rendering options |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void chai3d::cFog::setProperties | ( | const double | a_start, |
const double | a_end, | ||
const double | a_density | ||
) |
This method sets the fog properties.
a_start | Distance from viewport. |
a_end | Distance from viewport. |
a_density | Fog density |
cColorf chai3d::cFog::m_color |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |