VisuGlExtSet

VisuGlExtSet — Defines a storage object to handle a bunch of VisuGlExt objects.

Functions

Properties

gfloat bg-alpha Read / Write
gfloat bg-blue Read / Write
gfloat bg-green Read / Write
gfloat bg-red Read / Write
gboolean dirty Read
gboolean fog-active Read / Write
gfloat fog-alpha Read / Write
gfloat fog-blue Read / Write
gboolean fog-follows-bg Read / Write
gfloat fog-full Read / Write
gfloat fog-green Read / Write
gfloat fog-red Read / Write
gfloat fog-start Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuGl
            ╰── VisuGlExtSet
                ╰── VisuGlNodeScene

Description

A storage to display several VisuGlExt objects. It takes care of ordering display, following priority of each object.

Functions

visu_gl_ext_set_new ()

VisuGlExtSet *
visu_gl_ext_set_new ();

Create an object to handle a set of VisuGlExt objects and draw them together.

Returns

a newly created VisuGlExtSet object.

[transfer full]

Since: 3.8


visu_gl_ext_set_add ()

gboolean
visu_gl_ext_set_add (VisuGlExtSet *set,
                     VisuGlExt *ext);

Add ext in the list of drawn VisuGlExt by set .

Parameters

set

a VisuGlExtSet object.

 

ext

a VisuGlExt object.

 

Returns

TRUE if not already existing.

Since: 3.8


visu_gl_ext_set_setGlView ()

gboolean
visu_gl_ext_set_setGlView (VisuGlExtSet *set,
                           VisuGlView *view);

Apply the given view on all VisuGlExt objects stored in set .

Parameters

set

a VisuGlExtSet object.

 

view

a VisuGlView object.

 

Returns

TRUE if the view actually change.

Since: 3.8


visu_gl_ext_set_getAll ()

GList *
visu_gl_ext_set_getAll (VisuGlExtSet *set);

Retrieve as a GList all the VisuGlExt objects drawn by set .

Parameters

set

a VisuGlExtSet object.

 

Returns

only the container list should be freed after.

[transfer container][element-type VisuGlExt*]

Since: 3.8


visu_gl_ext_set_draw ()

void
visu_gl_ext_set_draw (VisuGlExtSet *set);

Basic drawing method : it clears the OpenGL area and call all lists stored in set .

Parameters

set

a VisuGlExtSet object.

 

Since: 3.8


visu_gl_ext_set_getPixmapData ()

GArray *
visu_gl_ext_set_getPixmapData (VisuGlExtSet *set,
                               guint width,
                               guint height,
                               gboolean hasAlpha);

Create an image from the OpenGL area. The size can be changed, using width and height . If these pointers contains positive values, then they are used to set the size for the image. If not, the size of the view is used and stored in these pointers.

Parameters

set

a VisuGlExtSet object ;

 

view

a VisuGlView object ;

 

width

the desired width or 0 for current ;

 

height

the desired height or 0 for current ;

 

hasAlpha

if TRUE, the returned data is RGBA, else only RGB.

 

Returns

image data, row by row.

[transfer full][element-type int]

Since: 3.8


visu_gl_ext_set_setBgColor ()

gboolean
visu_gl_ext_set_setBgColor (VisuGlExtSet *set,
                            float rgba[4],
                            int mask);

Method used to change the value of the parameter background_color.

Parameters

set

a VisuGlExtSet object.

 

rgba

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.

[in][array fixed-size=4]

mask

use TOOL_COLOR_MASK_R, TOOL_COLOR_MASK_G, TOOL_COLOR_MASK_B, TOOL_COLOR_MASK_RGBA or a combinaison to indicate what values in the rgb array must be taken into account.

 

Returns

TRUE if changed.

Since: 3.8


visu_gl_ext_set_getBgColor ()

void
visu_gl_ext_set_getBgColor (const VisuGlExtSet *set,
                            float rgba[4]);

Read the RGBA value of the specific background colour (in [0;1]).

Parameters

set

a VisuGlExtSet object.

 

rgba

a storage for four values.

[array fixed-size=4][out]

Since: 3.8


visu_gl_ext_set_setFogColor ()

gboolean
visu_gl_ext_set_setFogColor (VisuGlExtSet *set,
                             float rgba[4],
                             int mask);

Change the fog specific colour. Activate it with visu_gl_ext_set_setFogFollowsBg().

Parameters

set

a VisuGlExtSet object.

 

rgba

four [0;1] float values.

[array fixed-size=4]

mask

a mask, see TOOL_COLOR_MASK_R for instance.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_gl_ext_set_setFogActive ()

gboolean
visu_gl_ext_set_setFogActive (VisuGlExtSet *set,
                              gboolean value);

Activates the fog rendering, or not.

Parameters

set

a VisuGlExtSet object.

 

value

a boolean.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_gl_ext_set_setFogFollowsBg ()

gboolean
visu_gl_ext_set_setFogFollowsBg (VisuGlExtSet *set,
                                 gboolean value);

Specifies if the fog is coloured with the background colour or with its own colour, see visu_gl_ext_set_setFogColor().

Parameters

set

a VisuGlExtSet object.

 

value

a boolean.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_gl_ext_set_setFogStartFull ()

gboolean
visu_gl_ext_set_setFogStartFull (VisuGlExtSet *set,
                                 float startEnd[2],
                                 int mask);

Change the starting and ending point of fog.

Parameters

set

a VisuGlExtSet object.

 

startEnd

two [0;1] floating point values.

[array fixed-size=2]

mask

a mask, see VISU_GL_EXT_SET_FOG_MASK_START and VISU_GL_EXT_SET_FOG_MASK_FULL.

 

Returns

TRUE if values are actually changed.

Since: 3.8


visu_gl_ext_set_getFogColor ()

void
visu_gl_ext_set_getFogColor (VisuGlExtSet *set,
                             float rgba[4]);

Gives the actual fog color, for the specific color, use visu_gl_ext_set_getFogSpecificColor().

Parameters

set

a VisuGlExtSet object.

 

rgba

a storage for three values.

[out][array fixed-size=4]

Since: 3.8


visu_gl_ext_set_getFogSpecificColor ()

void
visu_gl_ext_set_getFogSpecificColor (VisuGlExtSet *set,
                                     float rgba[4]);

Gives the specific fog color, for the actual color, use visu_gl_ext_set_getFogColor().

Parameters

set

a VisuGlExtSet object.

 

rgba

a storage for three values.

[out][array fixed-size=4]

Since: 3.8


visu_gl_ext_set_getFogActive ()

gboolean
visu_gl_ext_set_getFogActive (VisuGlExtSet *set);

Read if fog is used or not.

Parameters

set

a VisuGlExtSet object.

 

Returns

TRUE if the fog is rendered, FALSE otherwise.

Since: 3.8


visu_gl_ext_set_getFogFollowsBg ()

gboolean
visu_gl_ext_set_getFogFollowsBg (VisuGlExtSet *set);

Read if fog uses a specific colour or not.

Parameters

set

a VisuGlExtSet object.

 

Returns

TRUE if the fog uses its own color or FALSE if it uses the color of the background.

Since: 3.8


visu_gl_ext_set_getFogStartFull ()

void
visu_gl_ext_set_getFogStartFull (VisuGlExtSet *set,
                                 float startFull[2]);

Retrieves the starting and ending value (reduced) of fog extension.

Parameters

set

a VisuGlExtSet object.

 

startFull

two float location.

[out caller-allocates][array fixed-size=2]

Since: 3.8

Types and Values

VISU_GL_EXT_SET_FOG_MASK_START

#define VISU_GL_EXT_SET_FOG_MASK_START (1 << 0)

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


VISU_GL_EXT_SET_FOG_MASK_FULL

#define VISU_GL_EXT_SET_FOG_MASK_FULL (1 << 1)

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


struct VisuGlExtSet

struct VisuGlExtSet;

Common name to refer to a _VisuGlExtSet.


struct VisuGlExtSetClass

struct VisuGlExtSetClass {
  VisuGlClass parent;
};

Common name to refer to a _VisuGlExtSetClass.

Members

VisuGlClass parent;

private.

 

Property Details

The “bg-alpha” property

  “bg-alpha”                 gfloat

background alpha channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “bg-blue” property

  “bg-blue”                  gfloat

background blue channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “bg-green” property

  “bg-green”                 gfloat

background green channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “bg-red” property

  “bg-red”                   gfloat

background red channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “dirty” property

  “dirty”                    gboolean

one of the object rendering is out of date.

Flags: Read

Default value: FALSE


The “fog-active” property

  “fog-active”               gboolean

Fog is used.

Flags: Read / Write

Default value: TRUE


The “fog-alpha” property

  “fog-alpha”                gfloat

specific fog alpha channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 1


The “fog-blue” property

  “fog-blue”                 gfloat

specific fog blue channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “fog-follows-bg” property

  “fog-follows-bg”           gboolean

Fog color is the bg color.

Flags: Read / Write

Default value: TRUE


The “fog-full” property

  “fog-full”                 gfloat

depth where fog hides all.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.7


The “fog-green” property

  “fog-green”                gfloat

specific fog green channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “fog-red” property

  “fog-red”                  gfloat

specific fog red channel.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0


The “fog-start” property

  “fog-start”                gfloat

starting fog depth.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.3