GlistEngine
Loading...
Searching...
No Matches
gFog Class Reference

#include <gFog.h>

Inheritance diagram for gFog:
Collaboration diagram for gFog:

Public Member Functions

 gFog ()
 
void enable ()
 
void disable ()
 
void setColor (float r, float g, float b)
 
void setMode (int value)
 
void setDensity (float value)
 
void setGradient (float value)
 
void setLinearStart (float value)
 
void setLinearEnd (float value)
 
const gColorgetColor () const
 
int getMode () const
 
float getDensity () const
 
float getGradient () const
 
float getLinearStart () const
 
float getLinearEnd () const
 
- Public Member Functions inherited from gRenderObject
 gRenderObject ()
 
int getScreenWidth ()
 
int getScreenHeight ()
 
void pushMatrix ()
 
void popMatrix ()
 
- Public Member Functions inherited from gObject
 gObject ()
 
void logi (std::string message)
 
void logd (std::string message)
 
void logw (std::string message)
 
void loge (std::string message)
 
void logi (std::string tag, std::string message)
 
void logd (std::string tag, std::string message)
 
void logw (std::string tag, std::string message)
 
void loge (std::string tag, std::string message)
 

Static Public Attributes

static int fognum
 
- Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
 
static const int LOGLEVEL_DEBUG
 
static const int LOGLEVEL_INFO
 
static const int LOGLEVEL_WARNING
 
static const int LOGLEVEL_ERROR
 

Additional Inherited Members

- Static Public Member Functions inherited from gRenderObject
static void setScreenSize (int screenWidth, int screenHeight)
 
static void setUnitScreenSize (int unitWidth, int unitHeight)
 
static void setScreenScaling (int screenScaling)
 
static void enableShadowMapping ()
 
static void disableShadowMapping ()
 
static bool isShadowMappingEnabled ()
 
static gRenderergetRenderer ()
 
static void destroyRenderer ()
 
static void createRenderer ()
 
- Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
 
static std::string gGetAssetsDir ()
 
static void gSetAssetsDir (std::string assetsDir)
 
static std::string gGetFilesDir ()
 
static std::string gGetImagesDir ()
 
static std::string gGetFontsDir ()
 
static std::string gGetModelsDir ()
 
static std::string gGetTexturesDir ()
 
static std::string gGetShadersDir ()
 
static std::string gGetSoundsDir ()
 
static std::string gGetDatabasesDir ()
 
static std::string gGetVideosDir ()
 
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
 
- Static Protected Attributes inherited from gRenderObject
static bool isshadowmappingenabled
 
- Static Protected Attributes inherited from gObject
static int renderpassnum
 
static int renderpassno
 
static int releasescaling
 
static int releaseresolution
 

Detailed Description

Represents a fog object that can be enabled and configured. Inherits from gRenderObject.

Constructor & Destructor Documentation

◆ gFog()

gFog::gFog ( )

Member Function Documentation

◆ disable()

void gFog::disable ( )

Deactivates the fog

◆ enable()

void gFog::enable ( )

Sets the current fog as active. You can have multiple fog instances with different properties.

◆ getColor()

const gColor & gFog::getColor ( ) const

Gets the fog color.

Returns
The fog color.

◆ getDensity()

float gFog::getDensity ( ) const

Gets the fog density.

Returns
The fog density.

◆ getGradient()

float gFog::getGradient ( ) const

Gets the fog gradient.

Returns
The fog gradient.

◆ getLinearEnd()

float gFog::getLinearEnd ( ) const

Gets the end value of the linear mode.

Returns
The end value of the linear mode. Default is 1.0.

◆ getLinearStart()

float gFog::getLinearStart ( ) const

Gets the start value of the linear mode.

Returns
The start value of the linear mode. Default is 0.0.

◆ getMode()

int gFog::getMode ( ) const

Gets the fog mode.

Returns
The fog mode. Possible values are:

◆ setColor()

void gFog::setColor ( float  r,
float  g,
float  b 
)

Sets the color of the fog.

Parameters
r= red value of fogColor.
g= green value of fogColor.
b= blue value of fogColor.

◆ setDensity()

void gFog::setDensity ( float  value)

Sets density of the fog, increasing this will make it appear closer to the camera.

Parameters
valueDensity value.

◆ setGradient()

void gFog::setGradient ( float  value)

Sets the rate at which the fog density increases. A higher value will cause the fog to become denser more quickly.

Parameters
rateThe rate of fog density increase. Default is 2.0

◆ setLinearEnd()

void gFog::setLinearEnd ( float  value)

Sets the end value of the linear fog.

Parameters
valueEnd value of the linear mode.

◆ setLinearStart()

void gFog::setLinearStart ( float  value)

Sets the start value of the linear fog.

Parameters
valueStart value of the linear mode.

◆ setMode()

void gFog::setMode ( int  value)

Sets mode of the fog

Parameters
valueNew fog mode. Possible values are:

Member Data Documentation

◆ fognum

int gFog::fognum
static

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