VisuGlExtMaps

VisuGlExtMaps — Defines methods to draw maps.

Synopsis

#define             VISU_GL_EXT_MAPS_ID
struct              VisuGlExtMaps;
struct              VisuGlExtMapsClass;
gboolean            visu_gl_ext_maps_add                (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         float prec,
                                                         ToolShade *shade,
                                                         ToolColor *color,
                                                         gboolean alpha);
void                visu_gl_ext_maps_draw               (VisuGlExtMaps *maps);
VisuGlExtMaps *     visu_gl_ext_maps_new                (const gchar *name);
gboolean            visu_gl_ext_maps_remove             (VisuGlExtMaps *maps,
                                                         VisuMap *map);
gboolean            visu_gl_ext_maps_setDirty           (VisuGlExtMaps *maps,
                                                         VisuMap *map);
gboolean            visu_gl_ext_maps_setGlView          (VisuGlExtMaps *maps,
                                                         VisuGlView *view);
gboolean            visu_gl_ext_maps_setLineColor       (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         ToolColor *color);
gboolean            visu_gl_ext_maps_setPrecision       (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         float prec);
gboolean            visu_gl_ext_maps_setShade           (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         ToolShade *shade);
gboolean            visu_gl_ext_maps_setTransparent     (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         gboolean alpha);

Object Hierarchy

  GObject
   +----VisuGlExt
         +----VisuGlExtMaps

Description

Maps are coloured representation of a VisuScalarField on a VisuPlane.

Details

VISU_GL_EXT_MAPS_ID

#define VISU_GL_EXT_MAPS_ID "Maps"

The id used to identify this extension, see visu_gl_ext_rebuild() for instance.


struct VisuGlExtMaps

struct VisuGlExtMaps;

An opaque structure.

Since 3.7


struct VisuGlExtMapsClass

struct VisuGlExtMapsClass {
  VisuGlExtFrameClass parent;
};

A short way to identify _VisuGlExtMapsClass structure.

VisuGlExtFrameClass parent;

the parent class;

Since 3.7


visu_gl_ext_maps_add ()

gboolean            visu_gl_ext_maps_add                (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         float prec,
                                                         ToolShade *shade,
                                                         ToolColor *color,
                                                         gboolean alpha);

Add a new map to the list of drawn maps. If color is NULL, then iso-lines will be drawn in inverse color.

maps :

a VisuGlExtMaps object.

map :

a VisuMaps object. [transfer full]

prec :

rendering adaptivity level (default is 100).

shade :

a ToolShade object. [transfer full]

color :

a ToolColor object. [transfer full][allow-none]

alpha :

a boolean.

Returns :

FALSE if surf was already reguistered.

Since 3.7


visu_gl_ext_maps_draw ()

void                visu_gl_ext_maps_draw               (VisuGlExtMaps *maps);

Render the OpenGL list of maps.

maps :

a VisuGlExtMaps object.

Since 3.7


visu_gl_ext_maps_new ()

VisuGlExtMaps *     visu_gl_ext_maps_new                (const gchar *name);

Creates a new VisuGlExt to draw maps.

name :

the name to give to the extension (default is VISU_GL_EXT_MAPS_ID). [allow-none]

Returns :

a pointer to the VisuGlExt it created or NULL otherwise.

Since 3.7


visu_gl_ext_maps_remove ()

gboolean            visu_gl_ext_maps_remove             (VisuGlExtMaps *maps,
                                                         VisuMap *map);

Removes map from the list of drawn maps.

maps :

a VisuGlExtMaps object.

map :

a VisuMaps object.

Returns :

TRUE if visu_gl_ext_maps_draw(à should be called.

Since 3.7


visu_gl_ext_maps_setDirty ()

gboolean            visu_gl_ext_maps_setDirty           (VisuGlExtMaps *maps,
                                                         VisuMap *map);

Currently, VisuMap are not objects, so maps cannot react to a change on them. Callers have to set by hand that maps should be redrawn with this routine.

maps :

a VisuGlExtMaps object.

map :

a VisuMap object.

Returns :

TRUE is map is a drawn VisuMap of maps.

Since 3.7


visu_gl_ext_maps_setGlView ()

gboolean            visu_gl_ext_maps_setGlView          (VisuGlExtMaps *maps,
                                                         VisuGlView *view);

Attach maps to view, so it can be rendered there. See visu_gl_ext_maps_draw().

maps :

the VisuGlExtMaps object to attached to rendering view.

view :

a VisuGlView object. [transfer full][allow-none]

Returns :

TRUE if visu_gl_ext_maps_draw() should be called and then 'OpenGLAskForReDraw' signal be emitted.

Since 3.7


visu_gl_ext_maps_setLineColor ()

gboolean            visu_gl_ext_maps_setLineColor       (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         ToolColor *color);

Changes the rendered isoline color of map to color. If color is NULL, then the isolines will be color inversed to the ToolShade of map (see visu_gl_ext_maps_setShade()).

maps :

a VisuGlExtMaps object.

map :

a VisuMap object.

color :

a ToolColor object. [allow-none][transfer full]

Returns :

TRUE if color of map is changed.

Since 3.7


visu_gl_ext_maps_setPrecision ()

gboolean            visu_gl_ext_maps_setPrecision       (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         float prec);

Changes the adaptative mesh of map. At a value of 200, there is no adaptivity and all triangles are rendered. At a level of 100, a variation of less than 3% on neighbouring triangles make them merged.

maps :

a VisuGlExtMaps object.

map :

a VisuMap object.

prec :

a floating point value (default is 100).

Returns :

TRUE if prec of map is changed.

Since 3.7


visu_gl_ext_maps_setShade ()

gboolean            visu_gl_ext_maps_setShade           (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         ToolShade *shade);

Changes the ToolShade used to render data variation on the map.

maps :

a VisuGlExtMaps object.

map :

a VisuMap object.

shade :

a ToolShade object. [allow-none][transfer full]

Returns :

TRUE if shade of map is changed.

Since 3.7


visu_gl_ext_maps_setTransparent ()

gboolean            visu_gl_ext_maps_setTransparent     (VisuGlExtMaps *maps,
                                                         VisuMap *map,
                                                         gboolean alpha);

Sets if map is rendered with transparency or not. If alpha is TRUE, the lower the rendered value is, the more transparent the colour will be.

maps :

a VisuGlExtMaps object.

map :

a VisuMap object.

alpha :

a boolean.

Returns :

TRUE if transparency of map is changed.

Since 3.7