| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#define VISU_GLEXT_XYZ_MASK_X #define VISU_GLEXT_XYZ_MASK_Y #define VISU_GLEXT_XYZ_MASK_Z #define VISU_GLEXT_XYZ_MASK_ALL #define VISU_GLEXT_SCALE_TYPE #define VISU_GLEXT_SCALE (obj) #define VISU_GLEXT_SCALE_CLASS (klass) #define VISU_GLEXT_IS_SCALE (obj) #define VISU_GLEXT_SCALE_GET_CLASS (obj) VisuGlExtScaleClass; VisuGlExtScale; gboolean visu_glExt_scale_setDefaultRGBValues (float rgba[4],int mask); gboolean visu_glExt_scale_setDefaultLineWidth (float width); gboolean visu_glExt_scale_setOn (gboolean value); gboolean visu_glExt_scale_setDefaultStipple (guint16 stipple); float* visu_glExt_scale_getDefaultRGBValues (); gboolean visu_glExt_scale_getOn (); float visu_glExt_scale_getDefaultLineWidth (); guint16 visu_glExt_scale_getDefaultStipple (); void visu_glExt_scale_drawAll (VisuOpenGLCamera *camera,guint winSize); GList* visu_glExt_scale_getAll (); VisuGlExtScale* visu_glExt_scale_new (float origin[3],float orientation[3],float length,const gchar *legend); gboolean visu_glExt_scale_setOrigin (VisuGlExtScale *scale,float xyz[3],int mask); gboolean visu_glExt_scale_setOrientation (VisuGlExtScale *scale,float xyz[3],int mask); gboolean visu_glExt_scale_setLength (VisuGlExtScale *scale,float lg); gboolean visu_glExt_scale_setLegend (VisuGlExtScale *scale,const gchar *value); const gchar* visu_glExt_scale_getLegend (VisuGlExtScale *scale); float visu_glExt_scale_getLength (VisuGlExtScale *scale); float* visu_glExt_scale_getOrigin (VisuGlExtScale *scale); float* visu_glExt_scale_getOrientation (VisuGlExtScale *scale);
This little extension is used to draw an arrow at a given position displaying a given length.
#define VISU_GLEXT_XYZ_MASK_X (1 << 0)
This value can be used to create a mask for methods that require one for reading xyz coordinates array. This value actually correspond to the x direction.
Since 3.3
#define VISU_GLEXT_XYZ_MASK_Y (1 << 1)
This value can be used to create a mask for methods that require one for reading xyz coordinates array. This value actually correspond to the y direction.
Since 3.3
#define VISU_GLEXT_XYZ_MASK_Z (1 << 2)
This value can be used to create a mask for methods that require one for reading xyz coordinates array. This value actually correspond to the z direction.
Since 3.3
#define VISU_GLEXT_XYZ_MASK_ALL (7)
This value can be used to create a mask for methods that require one for reading xyz coordinates array. This value is a shortcut for VISU_GLEXT_XYZ_MASK_X | VISU_GLEXT_XYZ_MASK_Y | VISU_GLEXT_XYZ_MASK_Z.
Since 3.3
#define VISU_GLEXT_SCALE_TYPE (visu_glExt_scale_get_type ())
return the type of VisuGlExtScale.
Since 3.3
#define VISU_GLEXT_SCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, VISU_GLEXT_SCALE_TYPE, VisuGlExtScale))
Cast the given obj into VisuGlExtScale type.
|
a GObject to cast. |
Since 3.3
#define VISU_GLEXT_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, VISU_GLEXT_SCALE_TYPE, VisuGlExtScaleClass))
Cast the given klass into VisuGlExtScaleClass.
|
a GObjectClass to cast. |
Since 3.3
#define VISU_GLEXT_IS_SCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, VISU_GLEXT_SCALE_TYPE))
Test if the given ogj is of the type of VisuGlExtScale object.
|
a GObject to test. |
Since 3.3
#define VISU_GLEXT_SCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, VISU_GLEXT_SCALE_TYPE, VisuGlExtScaleClass))
It returns the class of the given obj.
|
a GObject to get the class of. |
Since 3.3
typedef struct _VisuGlExtScaleClass VisuGlExtScaleClass;
An opaque structure.
Since 3.3
typedef struct _VisuGlExtScale VisuGlExtScale;
All fields are private, use the access routines.
Since 3.3
gboolean visu_glExt_scale_setDefaultRGBValues (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_glExt_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_glExt_scale_setOn (gboolean value);
Method used to change the value of the parameter Scale_are_on.
|
1 if a scale must be drawn, 0 otherwise. |
Returns : |
1 if scaleDraw() should be called. In all cases, 'OpenGLAskForReDraw'
signal should then be emitted.
|
Since 3.3
gboolean visu_glExt_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
float* visu_glExt_scale_getDefaultRGBValues
();
All the scales shared a common colour.
Returns : |
a four component array. |
Since 3.3
gboolean visu_glExt_scale_getOn ();
The scales can be turned off or on.
Returns : |
TRUE if scale are drawn, FALSE otherwise. |
Since 3.3
float visu_glExt_scale_getDefaultLineWidth
();
The scales share a line width for the stick of the arrow.
Returns : |
the value of current width. |
Since 3.3
guint16 visu_glExt_scale_getDefaultStipple ();
The scales share a line pattern for the stick of the arrow.
Returns : |
the value of current stipple pattern. |
Since 3.3
void visu_glExt_scale_drawAll (VisuOpenGLCamera *camera,guint winSize);
This method creates a compile list that draw all scales.
|
a VisuOpenGLCamera object. |
|
the size of the rendering area. |
Since 3.3
GList* visu_glExt_scale_getAll ();
All the available scales can be retrieve with this method.
Returns : |
a private GList. |
Since 3.3
VisuGlExtScale* visu_glExt_scale_new (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 origin ; |
|
the orientation in cartesian coordinates ; |
|
the length of the arrow ; |
|
the text going with the arrow (can be NULL). |
Returns : |
a newly created VisuGlExtScale object. |
Since 3.3
gboolean visu_glExt_scale_setOrigin (VisuGlExtScale *scale,float xyz[3],int mask);
Routine that changes the origin of the scale.
|
the VisuGlExtScale to modify ; |
|
a vector in cartesian coordinates ; |
|
relevant values in xyz.
|
Returns : |
TRUE if visu_glExt_scale_drawAll() should be called.
|
Since 3.3
gboolean visu_glExt_scale_setOrientation (VisuGlExtScale *scale,float xyz[3],int mask);
Routine that changes the direction of the scale.
|
the VisuGlExtScale to modify ; |
|
a vector in cartesian coordinates ; |
|
relevant values in xyz.
|
Returns : |
TRUE if visu_glExt_scale_drawAll() should be called.
|
Since 3.3
gboolean visu_glExt_scale_setLength (VisuGlExtScale *scale,float lg);
Routine that changes the length of the scale.
|
the VisuGlExtScale to modify ; |
|
a positive length. |
Returns : |
TRUE if visu_glExt_scale_drawAll() should be called.
|
Since 3.3
gboolean visu_glExt_scale_setLegend (VisuGlExtScale *scale,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 ; |
|
a string (can be NULL). |
Returns : |
TRUE if visu_glExt_scale_drawAll() should be called.
|
Since 3.3
const gchar* visu_glExt_scale_getLegend (VisuGlExtScale *scale);
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. |
Returns : |
a string (private, do not free it). |
Since 3.3
float visu_glExt_scale_getLength (VisuGlExtScale *scale);
A VisuGlExtScale is characterised by its length.
|
the VisuGlExtScale to poll. |
Returns : |
a positive floating point value. |
Since 3.3
float* visu_glExt_scale_getOrigin (VisuGlExtScale *scale);
A VisuGlExtScale is characterised by its origin in cartesian coordinates.
|
the VisuGlExtScale to poll. |
Returns : |
three floating point values. |
Since 3.3
float* visu_glExt_scale_getOrientation (VisuGlExtScale *scale);
A VisuGlExtScale is characterised by its orientation in cartesian coordinates.
|
the VisuGlExtScale to poll. |
Returns : |
three floating point values. |
Since 3.3