VisuGlExtAxes

VisuGlExtAxes — Defines methods to draw axes.

Synopsis

#define             VISU_GL_EXT_AXES_ID
struct              VisuGlExtAxes;
struct              VisuGlExtAxesClass;
void                visu_gl_ext_axes_draw               (VisuGlExtAxes *axes);
VisuGlExtAxes *     visu_gl_ext_axes_getDefault         ();
guint16             visu_gl_ext_axes_getLineStipple     (VisuGlExtAxes *axes);
float               visu_gl_ext_axes_getLineWidth       (VisuGlExtAxes *axes);
void                visu_gl_ext_axes_getPosition        (VisuGlExtAxes *axes,
                                                         float *xpos,
                                                         float *ypos);
float *             visu_gl_ext_axes_getRGB             (VisuGlExtAxes *axes);
VisuGlExtAxes *     visu_gl_ext_axes_new                (const gchar *name);
gboolean            visu_gl_ext_axes_setBasis           (VisuGlExtAxes *axes,
                                                         double matrix[3][3]);
gboolean            visu_gl_ext_axes_setBasisFromBox    (VisuGlExtAxes *axes,
                                                         VisuBox *box);
gboolean            visu_gl_ext_axes_setGlView          (VisuGlExtAxes *axes,
                                                         VisuGlView *view);
gboolean            visu_gl_ext_axes_setLineStipple     (VisuGlExtAxes *axes,
                                                         guint16 stipple);
gboolean            visu_gl_ext_axes_setLineWidth       (VisuGlExtAxes *axes,
                                                         float width);
gboolean            visu_gl_ext_axes_setPosition        (VisuGlExtAxes *axes,
                                                         float xpos,
                                                         float ypos);
gboolean            visu_gl_ext_axes_setRGB             (VisuGlExtAxes *axes,
                                                         float rgb[3],
                                                         int mask);

Object Hierarchy

  GObject
   +----VisuGlExt
         +----VisuGlExtAxes

Description

The axes are the X, Y and Z lines drawn on the bottom right of the screen defining a given orthogonal basis set in which the box is projected.

The axis may be different, depending on the rendering method currently used. For instance, when the spin is used, a projection of the colour scheme is added to the simple lines of the basis set. Besides that, axes are defined by their width (see visu_gl_ext_axes_setLineWidth()) and their colour (see visu_gl_ext_axes_setRGB()).

Details

VISU_GL_EXT_AXES_ID

#define VISU_GL_EXT_AXES_ID "Axes"

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


struct VisuGlExtAxes

struct VisuGlExtAxes;

An opaque structure.

Since 3.7


struct VisuGlExtAxesClass

struct VisuGlExtAxesClass {
  VisuGlExtClass parent;
};

A short way to identify _VisuGlExtAxesClass structure.

VisuGlExtClass parent;

the parent class;

Since 3.7


visu_gl_ext_axes_draw ()

void                visu_gl_ext_axes_draw               (VisuGlExtAxes *axes);

This method creates a compiled list that draws axes.

axes :

the VisuBox object to build axes for.

visu_gl_ext_axes_getDefault ()

VisuGlExtAxes *     visu_gl_ext_axes_getDefault         ();

V_Sim is using a default axes object.

Returns :

a VisuGlExtAxes object used by default. [transfer none]

Since 3.7


visu_gl_ext_axes_getLineStipple ()

guint16             visu_gl_ext_axes_getLineStipple     (VisuGlExtAxes *axes);

Read the line pattern used to draw axes.

axes :

the VisuGlExtAxes object to inquire.

Returns :

the value of current axes pattern.

visu_gl_ext_axes_getLineWidth ()

float               visu_gl_ext_axes_getLineWidth       (VisuGlExtAxes *axes);

Read the line width used to draw axes.

axes :

the VisuGlExtAxes object to inquire.

Returns :

the value of current axes width.

visu_gl_ext_axes_getPosition ()

void                visu_gl_ext_axes_getPosition        (VisuGlExtAxes *axes,
                                                         float *xpos,
                                                         float *ypos);

Inquire the position of the representation of tha axes.

axes :

the VisuGlExtAxes object to inquire.

xpos :

a location to store the x position. [out][allow-none]

ypos :

a location to store the y position. [out][allow-none]

Since 3.7


visu_gl_ext_axes_getRGB ()

float *             visu_gl_ext_axes_getRGB             (VisuGlExtAxes *axes);

Read all the colour components of axes (in [0;1]).

axes :

the VisuGlExtAxes object to inquire.

Returns :

three RGB values, private from V_Sim, read only. [array fixed-size=3][transfer none]

visu_gl_ext_axes_new ()

VisuGlExtAxes *     visu_gl_ext_axes_new                (const gchar *name);

Creates a new VisuGlExt to draw axes.

name :

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

Returns :

a pointer to the VisuGlExt it created or NULL otherwise.

Since 3.7


visu_gl_ext_axes_setBasis ()

gboolean            visu_gl_ext_axes_setBasis           (VisuGlExtAxes *axes,
                                                         double matrix[3][3]);

The axes can represent an arbitrary basis-set, provided by matrix. matrix[{0,1,2}] represents the {x,y,z} axis vector in a cartesian basis-set. See visu_gl_ext_axes_setBasisFromBox() if the basis-set should follow the one of a given VisuBox.

axes :

the VisuGlExtAxes object to modify.

matrix :

the definition of the three basis axis.

Returns :

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

Since 3.7


visu_gl_ext_axes_setBasisFromBox ()

gboolean            visu_gl_ext_axes_setBasisFromBox    (VisuGlExtAxes *axes,
                                                         VisuBox *box);

The axes can follow the basis-set defined by box. If NULL is passed, then the orthorombic default basis-set is used.

axes :

the VisuGlExtAxes object to modify.

box :

the VisuBox to use as basis-set. [allow-none]

Returns :

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

Since 3.7


visu_gl_ext_axes_setGlView ()

gboolean            visu_gl_ext_axes_setGlView          (VisuGlExtAxes *axes,
                                                         VisuGlView *view);

Attach axes to view, so it can be rendered there. See visu_gl_ext_axes_draw().

axes :

the VisuGlExtAxes object to attached to rendering view.

view :

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

Returns :

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

Since 3.7


visu_gl_ext_axes_setLineStipple ()

gboolean            visu_gl_ext_axes_setLineStipple     (VisuGlExtAxes *axes,
                                                         guint16 stipple);

Method used to change the value of the parameter axes_line_stipple.

axes :

the VisuGlExtAxes object to modify.

stipple :

value of the desired pattern.

Returns :

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

visu_gl_ext_axes_setLineWidth ()

gboolean            visu_gl_ext_axes_setLineWidth       (VisuGlExtAxes *axes,
                                                         float width);

Method used to change the value of the parameter axes_line_width.

axes :

the VisuGlExtAxes object to modify.

width :

value of the desired axe width.

Returns :

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

visu_gl_ext_axes_setPosition ()

gboolean            visu_gl_ext_axes_setPosition        (VisuGlExtAxes *axes,
                                                         float xpos,
                                                         float ypos);

Change the position of the axes representation.

axes :

the VisuGlExtAxes object to modify.

xpos :

the reduced x position (1 to the right).

ypos :

the reduced y position (1 to the bottom).

Returns :

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

Since 3.7


visu_gl_ext_axes_setRGB ()

gboolean            visu_gl_ext_axes_setRGB             (VisuGlExtAxes *axes,
                                                         float rgb[3],
                                                         int mask);

Method used to change the value of the parameter axes_color.

axes :

the VisuGlExtAxes object to modify.

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 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 visu_gl_ext_axes_draw() should be called and then 'OpenGLAskForReDraw' signal be emitted.