![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define VISU_GL_EXT_BOX_ID #define VISU_GL_EXT_BOX_LEGEND_ID struct VisuGlExtBox; struct VisuGlExtBoxClass; struct VisuGlExtBoxLegend; struct VisuGlExtBoxLegendClass; void visu_gl_ext_box_draw (VisuGlExtBox *box
); VisuGlExtBox * visu_gl_ext_box_getDefault (); guint16 visu_gl_ext_box_getExpandStipple (VisuGlExtBox *box
); guint16 visu_gl_ext_box_getLineStipple (VisuGlExtBox *box
); float visu_gl_ext_box_getLineWidth (VisuGlExtBox *box
); float * visu_gl_ext_box_getRGB (VisuGlExtBox *box
); float * visu_gl_ext_box_getSideRGB (VisuGlExtBox *box
); VisuGlExtBoxLegend * visu_gl_ext_box_legend_getDefault (); VisuGlExtBoxLegend * visu_gl_ext_box_legend_new (const gchar *name
); gboolean visu_gl_ext_box_legend_setBox (VisuGlExtBoxLegend *legend
,VisuBox *boxObj
); VisuGlExtBox * visu_gl_ext_box_new (const gchar *name
); gboolean visu_gl_ext_box_setBasis (VisuGlExtBox *box
,float orig[3]
,float mat[3][3]
); gboolean visu_gl_ext_box_setBox (VisuGlExtBox *box
,VisuBox *boxObj
); gboolean visu_gl_ext_box_setExpandStipple (VisuGlExtBox *box
,guint16 stipple
); gboolean visu_gl_ext_box_setLineStipple (VisuGlExtBox *box
,guint16 stipple
); gboolean visu_gl_ext_box_setLineWidth (VisuGlExtBox *box
,float width
); gboolean visu_gl_ext_box_setOrigin (VisuGlExtBox *box
,float origin[3]
); gboolean visu_gl_ext_box_setRGB (VisuGlExtBox *box
,float rgb[3]
,int mask
); gboolean visu_gl_ext_box_setSideRGB (VisuGlExtBox *box
,float rgba[4]
,int mask
);
GObject +----VisuGlExt +----VisuGlExtBox
GObject +----VisuGlExt +----VisuGlExtFrame +----VisuGlExtBoxLegend
This extension allows V_Sim to draw a box around the
nodes. The box is defined in the VisuBox structure and can be
retrieved with visu_box_getGeometry()
. This box is not necessary
orthogonal.
It has several properties, namely, its colour, its line width and its line pattern. It is represented in OpenGL with simple lines and is affected by the antialiasing property. Defined resources:
box_is_on (boolean): controls if a box is drawn around the rendering area (since 3.0).
box_color (RGB in [0;1]): defines the color of the box(since 3.0).
box_line_width (integer in [1;10]): defines the width of the lines of the box (since 3.0).
box_line_stipple (2 integers in ]0;65535]): dot scheme detail for the lines of the box. The first value is the pattern for the line of the main box and the second is the pattern for the lines of the expanded areas (since 3.4).
#define VISU_GL_EXT_BOX_ID "Box"
The id used to identify this extension, see
visu_gl_ext_rebuild()
for instance.
#define VISU_GL_EXT_BOX_LEGEND_ID "Box legend"
The id used to identify this extension, see
visu_gl_ext_rebuild()
for instance.
struct VisuGlExtBoxClass { VisuGlExtClass parent; };
A short way to identify _VisuGlExtBoxClass structure.
VisuGlExtClass |
the parent class; |
Since 3.7
struct VisuGlExtBoxLegendClass { VisuGlExtFrameClass parent; };
A short way to identify _VisuGlExtBoxLegendClass structure.
VisuGlExtFrameClass |
the parent class; |
Since 3.7
void visu_gl_ext_box_draw (VisuGlExtBox *box
);
This method create a compile list that draw a box for the given box
.
|
a VisuBox object. |
VisuGlExtBox * visu_gl_ext_box_getDefault ();
V_Sim is using a default box object.
Returns : |
a VisuGlExtBox object used by default. [transfer none] |
Since 3.7
guint16 visu_gl_ext_box_getExpandStipple (VisuGlExtBox *box
);
Read the line stipple pattern used for box (expanded part).
|
the VisuGlExtBox to inquire. |
Returns : |
the value of current box line pattern. |
guint16 visu_gl_ext_box_getLineStipple (VisuGlExtBox *box
);
Read the line stipple pattern used for box (main part).
|
the VisuGlExtBox to inquire. |
Returns : |
the value of current box line pattern. |
float visu_gl_ext_box_getLineWidth (VisuGlExtBox *box
);
Read the line width used for box.
|
the VisuGlExtBox to inquire. |
Returns : |
the value of current box line width. |
float * visu_gl_ext_box_getRGB (VisuGlExtBox *box
);
Read the colour components of box (in [0;1]).
|
the VisuGlExtBox to inquire. |
Returns : |
all the colour values of the current box line. |
float * visu_gl_ext_box_getSideRGB (VisuGlExtBox *box
);
Read the colour components of the sides of the box (in [0;1]).
|
the VisuGlExtBox to inquire. |
Returns : |
all the colour values of the current box line. |
VisuGlExtBoxLegend * visu_gl_ext_box_legend_getDefault ();
V_Sim is using a default box object.
Returns : |
a VisuGlExtBoxLegend object used by default. [transfer none] |
Since 3.7
VisuGlExtBoxLegend * visu_gl_ext_box_legend_new (const gchar *name
);
Creates a new VisuGlExt to draw a legend with the box size.
|
the name to give to the extension. [allow-none] |
Returns : |
a pointer to the VisuGlExt it created or NULL otherwise. |
Since 3.7
gboolean visu_gl_ext_box_legend_setBox (VisuGlExtBoxLegend *legend
,VisuBox *boxObj
);
Attach an VisuGlView to render to and setup the box to get the size of also.
|
The VisuGlExtBoxLegend to attached to. |
|
the box to get the size of. |
Returns : |
TRUE if visu_gl_ext_frame_draw() should be called and
then 'OpenGLAskForReDraw' signal be emitted. |
Since 3.7
VisuGlExtBox * visu_gl_ext_box_new (const gchar *name
);
Creates a new VisuGlExt to draw a box.
|
the name to give to the extension (default is VISU_GL_EXT_BOX_ID). [allow-none] |
Returns : |
a pointer to the VisuGlExt it created or NULL otherwise. |
Since 3.7
gboolean visu_gl_ext_box_setBasis (VisuGlExtBox *box
,float orig[3]
,float mat[3][3]
);
Define the box to draw with a simple matrix basis-set and an origin.
|
the VisuGlExtBox object to attach to. |
|
the origin. [array fixed-size=3] |
|
the basis-set. [array fixed-size=9] |
Returns : |
TRUE if visu_gl_ext_box_draw() should be called. |
Since 3.7
gboolean visu_gl_ext_box_setBox (VisuGlExtBox *box
,VisuBox *boxObj
);
Attach the VisuBox to draw the frame of.
|
the VisuGlExtBox object to attach to. |
|
the box to get the definition of. |
Returns : |
TRUE if visu_gl_ext_box_draw() should be called. |
Since 3.7
gboolean visu_gl_ext_box_setExpandStipple (VisuGlExtBox *box
,guint16 stipple
);
Method used to change the value of the parameter box_line_stipple (expanded part).
|
the VisuGlExtBox to update. |
|
a pattern for line stipple in OpenGL. |
Returns : |
TRUE if visu_gl_ext_box_draw() should be called. |
gboolean visu_gl_ext_box_setLineStipple (VisuGlExtBox *box
,guint16 stipple
);
Method used to change the value of the parameter box_line_stipple (main part).
|
the VisuGlExtBox to update. |
|
a pattern for line stipple in OpenGL. |
Returns : |
TRUE if visu_gl_ext_box_draw() should be called. |
gboolean visu_gl_ext_box_setLineWidth (VisuGlExtBox *box
,float width
);
Method used to change the value of the parameter box_line_width.
|
the VisuGlExtBox to update. |
|
value of the desired box line width. |
Returns : |
TRUE if visu_gl_ext_box_draw() should be called. |
gboolean visu_gl_ext_box_setOrigin (VisuGlExtBox *box
,float origin[3]
);
Change the origin of the drawn box. This should be used with care since the OpenGL rendering area is not changed by moving the box, some parts may become unrendered.
|
the VisuGlExtBox to update. |
|
the new origin in cartesian coordinates. [array fixed-size=3] |
Returns : |
TRUE if visu_gl_ext_box_draw() should be called. |
Since 3.7
gboolean visu_gl_ext_box_setRGB (VisuGlExtBox *box
,float rgb[3]
,int mask
);
Method used to change the value of the parameter box_color.
|
the VisuGlExtBox to update. |
|
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. [array fixed-size=3] |
|
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_box_draw() should be called. |
gboolean visu_gl_ext_box_setSideRGB (VisuGlExtBox *box
,float rgba[4]
,int mask
);
Change the colour to represent the side of the super-cell. A channel alpha of zero, means that the box is rendered as wire-frame only. The sides are indeed drawn only if the box has expansion.
|
the VisuGlExtBox to update. |
|
a four floats array with values (0 <= values <= 1) for the red, the green, the blue color and the alpha channel. Only values specified by the mask are really relevant. [array fixed-size=4] |
|
use TOOL_COLOR_MASK_R, TOOL_COLOR_MASK_G,
TOOL_COLOR_MASK_B, TOOL_COLOR_MASK_A or a combinaison to indicate
what values in the rgba array must be taken into account. |
Returns : |
TRUE if visu_gl_ext_box_draw() should be called. |
Since 3.7