VisuGlExtNodes

VisuGlExtNodes — Defines methods to draw a set of nodes.

Synopsis

struct              VisuGlExtNodes;
struct              VisuGlExtNodesClass;
enum                VisuGlExtNodesEffects;
void                visu_gl_ext_nodes_draw              (VisuGlExtNodes *nodes);
VisuData *          visu_gl_ext_nodes_getData           (VisuGlExtNodes *nodes);
int                 visu_gl_ext_nodes_getSelection      (VisuGlExtNodes *ext,
                                                         VisuGlView *view,
                                                         int x,
                                                         int y);
GList *             visu_gl_ext_nodes_getSelectionByRegion
                                                        (VisuGlExtNodes *ext,
                                                         VisuGlView *view,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2);
VisuGlExtNodes *    visu_gl_ext_nodes_new               ();
void                visu_gl_ext_nodes_setData           (VisuGlExtNodes *nodes,
                                                         VisuGlView *view,
                                                         VisuData *dataObj);
gboolean            visu_gl_ext_nodes_setMaterialEffect (VisuGlExtNodes *nodes,
                                                         VisuGlExtNodesEffects effect);
void                visu_gl_ext_nodes_setRendering      (VisuGlExtNodes *nodes,
                                                         VisuRendering *method);

Object Hierarchy

  GObject
   +----VisuGlExt
         +----VisuGlExtNodes

Description

Details

struct VisuGlExtNodes

struct VisuGlExtNodes;

An opaque structure.

Since 3.7


struct VisuGlExtNodesClass

struct VisuGlExtNodesClass {
  VisuGlExtClass parent;
};

A short way to identify _VisuGlExtNodesClass structure.

VisuGlExtClass parent;

the parent class;

Since 3.7


enum VisuGlExtNodesEffects

typedef enum {
    VISU_GL_EXT_NODES_NO_EFFECT,
    VISU_GL_EXT_NODES_DESATURATE,
    VISU_GL_EXT_NODES_SATURATE,
    VISU_GL_EXT_NODES_DARKEN,
    VISU_GL_EXT_NODES_LIGHTEN,
    VISU_GL_EXT_NODES_FLATTEN_DARK,
    VISU_GL_EXT_NODES_FLATTEN,
    VISU_GL_EXT_NODES_FLATTEN_LIGHT
} VisuGlExtNodesEffects;

The rendering done by VisuGlExtNodes can alter the color and material of rendered nodes.

VISU_GL_EXT_NODES_NO_EFFECT

no effect (apply pristine element color and material).

VISU_GL_EXT_NODES_DESATURATE

desaturate colour.

VISU_GL_EXT_NODES_SATURATE

saturate colour.

VISU_GL_EXT_NODES_DARKEN

darken colour.

VISU_GL_EXT_NODES_LIGHTEN

lighten colour.

VISU_GL_EXT_NODES_FLATTEN_DARK

render darker without light efect.

VISU_GL_EXT_NODES_FLATTEN

render without light efect.

VISU_GL_EXT_NODES_FLATTEN_LIGHT

render lighter without light efect.

Since 3.7


visu_gl_ext_nodes_draw ()

void                visu_gl_ext_nodes_draw              (VisuGlExtNodes *nodes);

Create the OpenGL list that store nodes.

nodes :

a VisuGlExtNodes object.

Since 3.7


visu_gl_ext_nodes_getData ()

VisuData *          visu_gl_ext_nodes_getData           (VisuGlExtNodes *nodes);

Retrieves the associated VisuData of nodes.

nodes :

a VisuGlExtNodes object.

Returns :

a VisuData object. [transfer none]

Since 3.7


visu_gl_ext_nodes_getSelection ()

int                 visu_gl_ext_nodes_getSelection      (VisuGlExtNodes *ext,
                                                         VisuGlView *view,
                                                         int x,
                                                         int y);

Get the id of a VisuNode on top of the z-buffer.

ext :

a VisuGlExtNodes object;

view :

a VisuGlView object;

x :

a window coordinate;

y :

a window coordinate.

Returns :

-1 if no node found, or its id.

Since 3.7


visu_gl_ext_nodes_getSelectionByRegion ()

GList *             visu_gl_ext_nodes_getSelectionByRegion
                                                        (VisuGlExtNodes *ext,
                                                         VisuGlView *view,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2);

Get the VisuNode ids in the picked region defined by (x1, y1) - (x2, y2).

ext :

a VisuGlExtNodes object;

view :

a VisuGlView object;

x1 :

a window coordinate;

y1 :

a window coordinate;

x2 :

a window coordinate;

y2 :

a window coordinate.

Returns :

an empty list if no node found, or a newly created list of ids if any. [transfer full][element-type guint]

Since 3.7


visu_gl_ext_nodes_new ()

VisuGlExtNodes *    visu_gl_ext_nodes_new               ();

Creates a new VisuGlExt to draw a set of nodes. It can be used also for picking, see visu_gl_ext_nodes_getSelection().

Returns :

a pointer to the VisuGlExt it created or NULL otherwise.

Since 3.7


visu_gl_ext_nodes_setData ()

void                visu_gl_ext_nodes_setData           (VisuGlExtNodes *nodes,
                                                         VisuGlView *view,
                                                         VisuData *dataObj);

This setup nodes to render nodes of dataObj on view. Any changes on dataObj nodes will be automatically updated on the GL lists representing the nodes.

nodes :

the VisuGlExtNodes object that will render dataObj nodes.

view :

the VisuGlView to render to.

dataObj :

the nodes.

Since 3.7


visu_gl_ext_nodes_setMaterialEffect ()

gboolean            visu_gl_ext_nodes_setMaterialEffect (VisuGlExtNodes *nodes,
                                                         VisuGlExtNodesEffects effect);

Changes the effect applied on the color used to render VisuElement.

nodes :

a VisuGlExtNodes object.

effect :

a VisuGlExtNodesEffects id.

Returns :

TRUE if the effect has been changed.

Since 3.7


visu_gl_ext_nodes_setRendering ()

void                visu_gl_ext_nodes_setRendering      (VisuGlExtNodes *nodes,
                                                         VisuRendering *method);

Provide rendering method for nodes and elements.

nodes :

a VisuGlExtNodes object.

method :

a VisuRendering method. [transfer full][allow-none]

Since 3.7