![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct VisuGlExtScale; struct VisuGlExtScaleClass; guint visu_gl_ext_scale_add (VisuGlExtScale *scale
,float origin[3]
,float orientation[3]
,float length
,const gchar *legend
); void visu_gl_ext_scale_draw (VisuGlExtScale *scale
); VisuGlExtScale * visu_gl_ext_scale_getDefault (); float visu_gl_ext_scale_getDefaultLineWidth (); float * visu_gl_ext_scale_getDefaultRGB (); guint16 visu_gl_ext_scale_getDefaultStipple (); const gchar * visu_gl_ext_scale_getLegend (VisuGlExtScale *scale
,guint i
); float visu_gl_ext_scale_getLength (VisuGlExtScale *scale
,guint i
); guint visu_gl_ext_scale_getNArrows (VisuGlExtScale *scale
); float * visu_gl_ext_scale_getOrientation (VisuGlExtScale *scale
,guint i
); float * visu_gl_ext_scale_getOrigin (VisuGlExtScale *scale
,guint i
); gboolean visu_gl_ext_scale_setDefaultLineWidth (float width
); gboolean visu_gl_ext_scale_setDefaultRGB (float rgba[4]
,int mask
); gboolean visu_gl_ext_scale_setDefaultStipple (guint16 stipple
); gboolean visu_gl_ext_scale_setGlView (VisuGlExtScale *scale
,VisuGlView *view
); gboolean visu_gl_ext_scale_setLegend (VisuGlExtScale *scale
,guint i
,const gchar *value
); gboolean visu_gl_ext_scale_setLength (VisuGlExtScale *scale
,guint i
,float lg
); gboolean visu_gl_ext_scale_setOrientation (VisuGlExtScale *scale
,guint i
,float xyz[3]
,int mask
); gboolean visu_gl_ext_scale_setOrigin (VisuGlExtScale *scale
,guint i
,float xyz[3]
,int mask
);
This little extension is used to draw an arrow at a given position displaying a given length.
struct VisuGlExtScale;
All fields are private, use the access routines.
Since 3.3
struct VisuGlExtScaleClass { VisuGlExtClass parent; };
An opaque structure.
VisuGlExtClass |
parent structure. |
Since 3.3
guint visu_gl_ext_scale_add (VisuGlExtScale *scale
,float origin[3]
,float orientation[3]
,float length
,const gchar *legend
);
Create a new arrow pointing somewhere in the box with a label.
If legend
is NULL, then the label will be the value of the length.
|
the VisuGlExtScale object to add to. |
|
the origin ;. [array fixed-size=3] |
|
the orientation in cartesian coordinates ;. [array fixed-size=3] |
|
the length of the arrow ; |
|
the text going with the arrow (can be NULL). [allow-none] |
Returns : |
the id of the newly added arrow. |
Since 3.7
void visu_gl_ext_scale_draw (VisuGlExtScale *scale
);
This method creates a compile list that draw all arrow of a scale.
|
the VisuGlExtScale object to draw. |
Since 3.3
VisuGlExtScale * visu_gl_ext_scale_getDefault ();
The default VisuGlExtScale object used by V_Sim.
Returns : |
a VisuGlExtScale object. [transfer none] |
Since 3.7
float visu_gl_ext_scale_getDefaultLineWidth
();
The scales share a line width for the stick of the arrow.
Returns : |
the value of current width. |
Since 3.3
float * visu_gl_ext_scale_getDefaultRGB ();
All the scales shared a common colour.
Returns : |
a four component array. [array fixed-size=4][transfer none] |
Since 3.3
guint16 visu_gl_ext_scale_getDefaultStipple ();
The scales share a line pattern for the stick of the arrow.
Returns : |
the value of current stipple pattern. |
Since 3.3
const gchar * visu_gl_ext_scale_getLegend (VisuGlExtScale *scale
,guint i
);
A VisuGlExtScale can have a legend. This is not actualy the string printed on screen but the one used to generate it.
|
the VisuGlExtScale to poll. |
|
the ith arrow. |
Returns : |
a string (private, do not free it). [allow-none] |
Since 3.3
float visu_gl_ext_scale_getLength (VisuGlExtScale *scale
,guint i
);
A VisuGlExtScale is characterised by its length.
|
the VisuGlExtScale to poll. |
|
the ith arrow. |
Returns : |
a positive floating point value or a negative value if i
is not in the arrow list. |
Since 3.3
guint visu_gl_ext_scale_getNArrows (VisuGlExtScale *scale
);
A VisuGlExtScale is characterised by a set of arrows.
|
the VisuGlExtScale to poll. |
Returns : |
the number of stored arrows. |
Since 3.7
float * visu_gl_ext_scale_getOrientation (VisuGlExtScale *scale
,guint i
);
A VisuGlExtScale is characterised by its orientation in cartesian coordinates.
|
the VisuGlExtScale to poll. |
|
the ith arrow. |
Returns : |
three floating point values. [array fixed-size=3][transfer none][allow-none] |
Since 3.3
float * visu_gl_ext_scale_getOrigin (VisuGlExtScale *scale
,guint i
);
A VisuGlExtScale is characterised by its origin in cartesian coordinates.
|
the VisuGlExtScale to poll. |
|
the ith arrow. |
Returns : |
three floating point values. [array fixed-size=3][transfer none][allow-none] |
Since 3.3
gboolean visu_gl_ext_scale_setDefaultLineWidth
(float width
);
Method used to change the value of the parameter scale_line_width. This affects all the drawn scales.
|
value of the desired width. |
Returns : |
TRUE if scaleDraw() should be called and then 'OpenGLAskForReDraw'
signal be emitted. |
Since 3.3
gboolean visu_gl_ext_scale_setDefaultRGB (float rgba[4]
,int mask
);
Method used to change the value of the private parameter scales_color. This affects all the drawn scales.
|
a four floats array with values (0 <= values <= 1) for the red, the green, the blue and the alpha 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 scaleDraw() should be called and then 'OpenGLAskForReDraw'
signal be emitted. |
Since 3.3
gboolean visu_gl_ext_scale_setDefaultStipple (guint16 stipple
);
The scales share a line pattern for the stick of the arrow.
|
a pattern for line. |
Returns : |
TRUE if scale are drawn, FALSE otherwise. |
Since 3.3
gboolean visu_gl_ext_scale_setGlView (VisuGlExtScale *scale
,VisuGlView *view
);
Attach view
to scale
, so rendering is updated when view
is
modified.
|
a VisuGlExtScale object. |
|
a VisuGlView object. [transfer full] |
Returns : |
TRUE if view is changed. |
Since 3.7
gboolean visu_gl_ext_scale_setLegend (VisuGlExtScale *scale
,guint i
,const gchar *value
);
Routine that changes the legend of the scale. If value
is NULL
then the length of the scale is printed.
|
the VisuGlExtScale to modify ; |
|
the ith arrow ; |
|
a string (can be NULL). [allow-none] |
Returns : |
TRUE if visu_gl_ext_scale_draw() should be called. |
Since 3.3
gboolean visu_gl_ext_scale_setLength (VisuGlExtScale *scale
,guint i
,float lg
);
Routine that changes the length of the scale.
|
the VisuGlExtScale to modify ; |
|
the ith arrow ; |
|
a positive length. |
Returns : |
TRUE if visu_gl_ext_scale_draw() should be called. |
Since 3.3
gboolean visu_gl_ext_scale_setOrientation (VisuGlExtScale *scale
,guint i
,float xyz[3]
,int mask
);
Routine that changes the direction of the scale.
|
the VisuGlExtScale to modify ; |
|
the ith arrow ; |
|
a vector in cartesian coordinates ;. [array fixed-size=3] |
|
relevant values in xyz , see TOOL_XYZ_MASK_X... |
Returns : |
TRUE if visu_gl_ext_scale_draw() should be called. |
Since 3.3
gboolean visu_gl_ext_scale_setOrigin (VisuGlExtScale *scale
,guint i
,float xyz[3]
,int mask
);
Routine that changes the origin of the scale.
|
the VisuGlExtScale to modify ; |
|
the ith arrow ; |
|
a vector in cartesian coordinates ;. [array fixed-size=3] |
|
relevant values in xyz , see TOOL_XYZ_MASK_X... |
Returns : |
TRUE if visu_gl_ext_scale_draw() should be called. |
Since 3.3