Back to index

extremetuxracer  0.5beta
Public Member Functions | Static Public Member Functions | Private Attributes
FogPlane Class Reference

#include <fog.h>

List of all members.

Public Member Functions

 FogPlane ()
 ~FogPlane ()
void reset ()
bool isEnabled () const
void setEnabled (const bool state=true)
GLfloat * getColor ()
void setMode (const GLint mode)
void setDensity (const GLfloat density)
void setStart (const GLfloat start)
void setEnd (const GLfloat end)
void setup ()

Static Public Member Functions

static void registerCallbacks (Tcl_Interp *ip)

Private Attributes

bool m_isOn
GLint m_mode
GLfloat m_density
GLfloat m_start
GLfloat m_end
GLfloat m_color [4]

Detailed Description

Definition at line 27 of file fog.h.


Constructor & Destructor Documentation

FogPlane::FogPlane ( ) [inline]

Definition at line 37 of file fog.h.

{};
FogPlane::~FogPlane ( ) [inline]

Definition at line 38 of file fog.h.

{};

Member Function Documentation

GLfloat* FogPlane::getColor ( ) [inline]

Definition at line 44 of file fog.h.

{return m_color;}

Here is the caller graph for this function:

bool FogPlane::isEnabled ( ) const [inline]

Definition at line 42 of file fog.h.

{return m_isOn;}

Here is the caller graph for this function:

void FogPlane::registerCallbacks ( Tcl_Interp *  ip) [static]

Definition at line 174 of file fog.cpp.

{
    Tcl_CreateCommand (ip, "tux_fog", fog_cb,  0,0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void FogPlane::reset ( )

Definition at line 32 of file fog.cpp.

{
    m_isOn = true;
    m_mode = GL_LINEAR;
    m_density = 0.005;
    m_start = 0.0;
    m_end = getparam_forward_clip_distance();
    init_glfloat_array( 4, m_color, 1.0, 1.0, 1.0, 1.0 );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void FogPlane::setDensity ( const GLfloat  density) [inline]

Definition at line 46 of file fog.h.

{m_density=density;}

Here is the caller graph for this function:

void FogPlane::setEnabled ( const bool  state = true) [inline]

Definition at line 43 of file fog.h.

{m_isOn=true;}

Here is the caller graph for this function:

void FogPlane::setEnd ( const GLfloat  end) [inline]

Definition at line 48 of file fog.h.

{m_end=end;}

Here is the caller graph for this function:

void FogPlane::setMode ( const GLint  mode) [inline]

Definition at line 45 of file fog.h.

{m_mode=mode;}

Here is the caller graph for this function:

void FogPlane::setStart ( const GLfloat  start) [inline]

Definition at line 47 of file fog.h.

{m_start=start;}

Here is the caller graph for this function:

void FogPlane::setup ( )

Definition at line 43 of file fog.cpp.

{
    if ( !m_isOn || getparam_disable_fog() ) {
              glDisable( GL_FOG );
              return;       
    }

    glEnable( GL_FOG );

    glFogi( GL_FOG_MODE, m_mode );
    glFogf( GL_FOG_DENSITY, m_density );
    glFogf( GL_FOG_START, m_start );
    glFogf( GL_FOG_END, m_end );
    glFogfv( GL_FOG_COLOR, m_color );

    if ( getparam_nice_fog() ) {
              glHint( GL_FOG_HINT, GL_NICEST );
    } else {
              glHint( GL_FOG_HINT, GL_FASTEST );
    }
       
}

Here is the caller graph for this function:


Member Data Documentation

GLfloat FogPlane::m_color[4] [private]

Definition at line 34 of file fog.h.

GLfloat FogPlane::m_density [private]

Definition at line 31 of file fog.h.

GLfloat FogPlane::m_end [private]

Definition at line 33 of file fog.h.

bool FogPlane::m_isOn [private]

Definition at line 29 of file fog.h.

GLint FogPlane::m_mode [private]

Definition at line 30 of file fog.h.

GLfloat FogPlane::m_start [private]

Definition at line 32 of file fog.h.


The documentation for this class was generated from the following files: