VisuGlExtScale

VisuGlExtScale — Draw an arrow with a label.

Functions

Properties

guint current Read / Write
gchar * current-label Read / Write
gfloat current-length Read / Write
gfloat current-orientation-x Read / Write
gfloat current-orientation-y Read / Write
gfloat current-orientation-z Read / Write
gfloat current-origin-x Read / Write
gfloat current-origin-y Read / Write
gfloat current-origin-z Read / Write
guint n-arrows Read

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuGlExt
            ╰── VisuGlExtScale

Implemented Interfaces

VisuGlExtScale implements VisuGlExtLined.

Description

This little extension is used to draw an arrow at a given position displaying a given length.

Functions

visu_gl_ext_scale_new ()

VisuGlExtScale *
visu_gl_ext_scale_new (const gchar *name);

Create a new arrow set without any elements. Add arrows with visu_gl_ext_scale_add().

Parameters

name

a name for the VisuGlExt.

[allow-none]

Returns

a newly created VisuGlExtScale object.

Since: 3.3


visu_gl_ext_scale_add ()

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.

Parameters

scale

the VisuGlExtScale object to add to.

 

origin

the origin ;.

[array fixed-size=3]

orientation

the orientation in cartesian coordinates ;.

[array fixed-size=3]

length

the length of the arrow ;

 

legend

the text going with the arrow (can be NULL).

[allow-none]

Returns

the id of the newly added arrow.

Since: 3.7


visu_gl_ext_scale_setOrigin ()

gboolean
visu_gl_ext_scale_setOrigin (VisuGlExtScale *scale,
                             guint i,
                             float xyz[3],
                             int mask);

Routine that changes the origin of the scale.

Parameters

scale

the VisuGlExtScale to modify ;

 

i

the ith arrow ;

 

xyz

a vector in cartesian coordinates ;.

[array fixed-size=3]

mask

relevant values in xyz , see TOOL_XYZ_MASK_X...

 

Returns

TRUE if the origin was actually changed.

Since: 3.3


visu_gl_ext_scale_setOrientation ()

gboolean
visu_gl_ext_scale_setOrientation (VisuGlExtScale *scale,
                                  guint i,
                                  float xyz[3],
                                  int mask);

Routine that changes the direction of the scale.

Parameters

scale

the VisuGlExtScale to modify ;

 

i

the ith arrow ;

 

xyz

a vector in cartesian coordinates ;.

[array fixed-size=3]

mask

relevant values in xyz , see TOOL_XYZ_MASK_X...

 

Returns

TRUE if the orientation was actually changed.

Since: 3.3


visu_gl_ext_scale_setLength ()

gboolean
visu_gl_ext_scale_setLength (VisuGlExtScale *scale,
                             guint i,
                             float lg);

Routine that changes the length of the scale. If i is zero and scale has currently no arrow, a default one is created.

Parameters

scale

the VisuGlExtScale to modify ;

 

i

the ith arrow ;

 

lg

a positive length.

 

Returns

TRUE if the length was actually changed.

Since: 3.3


visu_gl_ext_scale_setLegend ()

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.

Parameters

scale

the VisuGlExtScale to modify ;

 

i

the ith arrow ;

 

value

a string (can be NULL).

[allow-none]

Returns

TRUE if the legend was actually changed.

Since: 3.3


visu_gl_ext_scale_getNArrows ()

guint
visu_gl_ext_scale_getNArrows (VisuGlExtScale *scale);

A VisuGlExtScale is characterised by a set of arrows.

Parameters

scale

the VisuGlExtScale to poll.

 

Returns

the number of stored arrows.

Since: 3.7


visu_gl_ext_scale_getLegend ()

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.

Parameters

scale

the VisuGlExtScale to poll.

 

i

the ith arrow.

 

Returns

a string (private, do not free it).

[allow-none]

Since: 3.3


visu_gl_ext_scale_getLength ()

float
visu_gl_ext_scale_getLength (VisuGlExtScale *scale,
                             guint i);

A VisuGlExtScale is characterised by its length.

Parameters

scale

the VisuGlExtScale to poll.

 

i

the ith arrow.

 

Returns

a positive floating point value or a negative value if i is not in the arrow list.

Since: 3.3


visu_gl_ext_scale_getOrigin ()

float *
visu_gl_ext_scale_getOrigin (VisuGlExtScale *scale,
                             guint i);

A VisuGlExtScale is characterised by its origin in cartesian coordinates.

Parameters

scale

the VisuGlExtScale to poll.

 

i

the ith arrow.

 

Returns

three floating point values.

[array fixed-size=3][transfer none][allow-none]

Since: 3.3


visu_gl_ext_scale_getOrientation ()

float *
visu_gl_ext_scale_getOrientation (VisuGlExtScale *scale,
                                  guint i);

A VisuGlExtScale is characterised by its orientation in cartesian coordinates.

Parameters

scale

the VisuGlExtScale to poll.

 

i

the ith arrow.

 

Returns

three floating point values.

[array fixed-size=3][transfer none][allow-none]

Since: 3.3

Types and Values

struct VisuGlExtScale

struct VisuGlExtScale;

All fields are private, use the access routines.

Since: 3.3


struct VisuGlExtScaleClass

struct VisuGlExtScaleClass {
  VisuGlExtClass parent;
};

An opaque structure.

Members

VisuGlExtClass parent;

parent structure.

 

Since: 3.3

Property Details

The “current” property

  “current”                  guint

id of the current arrow.

Flags: Read / Write

Default value: 0


The “current-label” property

  “current-label”            gchar *

label of the current arrow.

Flags: Read / Write

Default value: ""


The “current-length” property

  “current-length”           gfloat

length of the current arrow.

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “current-orientation-x” property

  “current-orientation-x”    gfloat

orientation of the current arrow.

Flags: Read / Write

Default value: 0


The “current-orientation-y” property

  “current-orientation-y”    gfloat

orientation of the current arrow.

Flags: Read / Write

Default value: 0


The “current-orientation-z” property

  “current-orientation-z”    gfloat

orientation of the current arrow.

Flags: Read / Write

Default value: 0


The “current-origin-x” property

  “current-origin-x”         gfloat

origin of the current arrow.

Flags: Read / Write

Default value: 0


The “current-origin-y” property

  “current-origin-y”         gfloat

origin of the current arrow.

Flags: Read / Write

Default value: 0


The “current-origin-z” property

  “current-origin-z”         gfloat

origin of the current arrow.

Flags: Read / Write

Default value: 0


The “n-arrows” property

  “n-arrows”                 guint

number of stored arrows.

Flags: Read

Default value: 0