| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#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);
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()).
#define VISU_GL_EXT_AXES_ID "Axes"
The id used to identify this extension, see
visu_gl_ext_rebuild() for instance.
struct VisuGlExtAxesClass {
VisuGlExtClass parent;
};
A short way to identify _VisuGlExtAxesClass structure.
VisuGlExtClass |
the parent class; |
Since 3.7
void visu_gl_ext_axes_draw (VisuGlExtAxes *axes);
This method creates a compiled list that draws axes.
|
the VisuBox object to build axes for. |
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
guint16 visu_gl_ext_axes_getLineStipple (VisuGlExtAxes *axes);
Read the line pattern used to draw axes.
|
the VisuGlExtAxes object to inquire. |
Returns : |
the value of current axes pattern. |
float visu_gl_ext_axes_getLineWidth (VisuGlExtAxes *axes);
Read the line width used to draw axes.
|
the VisuGlExtAxes object to inquire. |
Returns : |
the value of current axes width. |
void visu_gl_ext_axes_getPosition (VisuGlExtAxes *axes,float *xpos,float *ypos);
Inquire the position of the representation of tha axes.
|
the VisuGlExtAxes object to inquire. |
|
a location to store the x position. [out][allow-none] |
|
a location to store the y position. [out][allow-none] |
Since 3.7
float * visu_gl_ext_axes_getRGB (VisuGlExtAxes *axes);
Read all the colour components of axes (in [0;1]).
|
the VisuGlExtAxes object to inquire. |
Returns : |
three RGB values, private from V_Sim, read only. [array fixed-size=3][transfer none] |
VisuGlExtAxes * visu_gl_ext_axes_new (const gchar *name);
Creates a new VisuGlExt to draw axes.
|
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
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.
|
the VisuGlExtAxes object to modify. |
|
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
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.
|
the VisuGlExtAxes object to modify. |
|
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
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().
|
the VisuGlExtAxes object to attached to rendering 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
gboolean visu_gl_ext_axes_setLineStipple (VisuGlExtAxes *axes,guint16 stipple);
Method used to change the value of the parameter axes_line_stipple.
|
the VisuGlExtAxes object to modify. |
|
value of the desired pattern. |
Returns : |
TRUE if visu_gl_ext_axes_draw() should be called and then 'OpenGLAskForReDraw'
signal be emitted. |
gboolean visu_gl_ext_axes_setLineWidth (VisuGlExtAxes *axes,float width);
Method used to change the value of the parameter axes_line_width.
|
the VisuGlExtAxes object to modify. |
|
value of the desired axe width. |
Returns : |
TRUE if visu_gl_ext_axes_draw() should be called and then 'OpenGLAskForReDraw'
signal be emitted. |
gboolean visu_gl_ext_axes_setPosition (VisuGlExtAxes *axes,float xpos,float ypos);
Change the position of the axes representation.
|
the VisuGlExtAxes object to modify. |
|
the reduced x position (1 to the right). |
|
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
gboolean visu_gl_ext_axes_setRGB (VisuGlExtAxes *axes,float rgb[3],int mask);
Method used to change the value of the parameter axes_color.
|
the VisuGlExtAxes object to modify. |
|
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. |
|
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. |