fogAndBGColor

fogAndBGColor —

Synopsis




OpenGLExtension* initExtensionFogAndBGColor ();
int         setFogRGBValues                 (float rgb[3],
                                             int mask);
int         setFogIsOn                      (int value);
int         setFogColorSpecific             (int value);
#define     MASK_FOG_START
#define     MASK_FOG_END
int         setFogStartEndValues            (float startEnd[2],
                                             int mask);
float       getFogRedValue                  ();
float       getFogGreenValue                ();
float       getFogBlueValue                 ();
int         isFogOn                         ();
int         getFogColorSpecific             ();
float       getFogStart                     ();
float       getFogEnd                       ();
int         setBgRGBValues                  (float rgb[3],
                                             int mask);
float       getBgRedValue                   ();
float       getBgGreenValue                 ();
float       getBgBlueValue                  ();
void        createFog                       (VisuData *data);
void        createFogColor                  ();

Description

Details

initExtensionFogAndBGColor ()

OpenGLExtension* initExtensionFogAndBGColor ();

Returns :

setFogRGBValues ()

int         setFogRGBValues                 (float rgb[3],
                                             int mask);

Method used to change the value of the parameter fog_specific_color. This color is actually used only if fog_color_is_specific is set to 1, use setFogColorSpecific() to do that.

rgb : a three floats array with values (0 <= values <= 1) for the red, the green and the blue color. Only values specified by the mask are really relevant.
mask : use MASK_RGB_R, MASK_RGB_G, MASK_RGB_B, MASK_RGB_ALL or a combinaison to indicate what values in the rgb array must be taken into account.
Returns : 0 if redrawing is not necessary. 1 if the rendering window must be redrawn.

setFogIsOn ()

int         setFogIsOn                      (int value);

Method used to change the value of the parameter fog_is_on.

value : 1 if fog must be rendered, 0 otherwise.
Returns : 0 if redrawing is not necessary. 1 if the rendering window must be redrawn.

setFogColorSpecific ()

int         setFogColorSpecific             (int value);

Method used to change the value of the parameter fog_color_is_specific.

value : 1 if fog is rendered with its own color specified by setFogRGBValues() or 0 if the fog uses the background color.
Returns : 1 if createFog() should be called. In all cases, 'OpenGLAskForReDraw' signal should then be emitted.

MASK_FOG_START

#define MASK_FOG_START (1 << 0)

Value used by the second parameter of setFogStartEndValues() to specified the value that must be changed. This actually changes the fog_start value.


MASK_FOG_END

#define MASK_FOG_END (1 << 1)

Value used by the second parameter of setFogStartEndValues() to specified the value that must be changed. This actually changes the fog_end value.


setFogStartEndValues ()

int         setFogStartEndValues            (float startEnd[2],
                                             int mask);

Method used to change the value of the parameters fog_start and fog_end.

startEnd : a two floats array with values (0 <= values <= 1) for the beging and the ending of the fog position. Only values specified by the mask are really relevant.
mask : use MASK_FOG_START, MASK_FOG_END to indicate what values in the startEnd array must be taken into account.
Returns : 1 if createFog() should be called and then 'OpenGLAskForReDraw' signal be emitted.

getFogRedValue ()

float       getFogRedValue                  ();

Returns : the red value of the specific color of the fog.

getFogGreenValue ()

float       getFogGreenValue                ();

Returns : the green value of the specific color of the fog.

getFogBlueValue ()

float       getFogBlueValue                 ();

Returns : the blue value of the specific color of the fog.

isFogOn ()

int         isFogOn                         ();

Returns : 1 if the fog is rendered, 0 otherwise.

getFogColorSpecific ()

int         getFogColorSpecific             ();

Returns : 1 if the fog uses its own color or 0 if it uses the color of the background.

getFogStart ()

float       getFogStart                     ();

Returns : the position where the fog starts.

getFogEnd ()

float       getFogEnd                       ();

Returns : the position where the fog ends.

setBgRGBValues ()

int         setBgRGBValues                  (float rgb[3],
                                             int mask);

Method used to change the value of the parameter background_color.

rgb : a three floats array with values (0 <= values <= 1) for the red, the green and the blue color. Only values specified by the mask are really relevant.
mask : use MASK_RGB_R, MASK_RGB_G, MASK_RGB_B, MASK_RGB_ALL or a combinaison to indicate what values in the rgb array must be taken into account.
Returns : 0 if redrawing is not necessary. 1 if the rendering window must be redrawn.

getBgRedValue ()

float       getBgRedValue                   ();

Returns : the red value of the current background color.

getBgGreenValue ()

float       getBgGreenValue                 ();

Returns : the gree value of the current background color.

getBgBlueValue ()

float       getBgBlueValue                  ();

Returns : the blue value of the current background color.

createFog ()

void        createFog                       (VisuData *data);

data :

createFogColor ()

void        createFogColor                  ();