VisuGlExtAxes

VisuGlExtAxes — Defines methods to draw axes.

Functions

Properties

VisuBox * basis Read / Write
gboolean display-orientation Read / Write
gfloat orientation-omega Read / Write
gfloat orientation-phi Read / Write
gfloat orientation-theta Read / Write
gfloat size Read / Write
VisuGlView * view Read / Write
gchar * x-label Read / Write
gfloat x-pos Read / Write
gchar * y-label Read / Write
gfloat y-pos Read / Write
gchar * z-label Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuGlExt
            ╰── VisuGlExtAxes

Implemented Interfaces

VisuGlExtAxes implements VisuGlExtLined.

Description

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_lined_setWidth()) and their colour (see visu_gl_ext_lined_setRGBA()).

Functions

visu_gl_ext_axes_new ()

VisuGlExtAxes *
visu_gl_ext_axes_new (const gchar *name);

Creates a new VisuGlExt to draw axes.

Parameters

name

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


visu_gl_ext_axes_setBasisFromBox ()

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.

Parameters

axes

the VisuGlExtAxes object to modify.

 

box

the VisuBox to use as basis-set.

[allow-none]

Returns

TRUE if the basis is actually changed.

Since: 3.7


visu_gl_ext_axes_setBasis ()

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.

Parameters

axes

the VisuGlExtAxes object to modify.

 

matrix

the definition of the three basis axis.

 

Returns

TRUE if the basis is actually changed.

Since: 3.7


visu_gl_ext_axes_setPosition ()

gboolean
visu_gl_ext_axes_setPosition (VisuGlExtAxes *axes,
                              float xpos,
                              float ypos);

Change the position of the axes representation.

Parameters

axes

the VisuGlExtAxes object to modify.

 

xpos

the reduced x position (1 to the right).

 

ypos

the reduced y position (1 to the bottom).

 

Returns

TRUE if the position is actually changed.

Since: 3.7


visu_gl_ext_axes_setLabel ()

gboolean
visu_gl_ext_axes_setLabel (VisuGlExtAxes *axes,
                           const gchar *lbl,
                           ToolXyzDir dir);

Set the label lbl for the given axis dir .

Parameters

axes

a VisuGlExtAxes object.

 

lbl

a string.

 

dir

an axis direction.

 

Returns

TRUE if the label is modified.

Since: 3.8


visu_gl_ext_axes_setLengthFactor ()

gboolean
visu_gl_ext_axes_setLengthFactor (VisuGlExtAxes *axes,
                                  float factor);

Change the scaling factor to draw the axis.

Parameters

axes

a VisuGlExtAxes object.

 

factor

a floating point value between 0. and 10.

 

Returns

TRUE if value is indeed changed.

Since: 3.8


visu_gl_ext_axes_useOrientation ()

gboolean
visu_gl_ext_axes_useOrientation (VisuGlExtAxes *axes,
                                 gboolean use);

If TRUE, axes also draws a coloured cone to display orientation information.

Parameters

axes

a VisuGlExtAxes object.

 

use

a boolean.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_gl_ext_axes_setOrientationTop ()

gboolean
visu_gl_ext_axes_setOrientationTop (VisuGlExtAxes *axes,
                                    const gfloat top[3],
                                    int dir);

Define the camera orientation of the top orientation when axes are used to display orientation information.

Parameters

axes

a VisuGlExtAxes object.

 

top

a camera orientation.

[array fixed-size=3]

dir

flags used to specify which angles to set.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_gl_ext_axes_getPosition ()

void
visu_gl_ext_axes_getPosition (VisuGlExtAxes *axes,
                              float *xpos,
                              float *ypos);

Inquire the position of the representation of tha axes.

Parameters

axes

the VisuGlExtAxes object to inquire.

 

xpos

a location to store the x position.

[out][allow-none]

ypos

a location to store the y position.

[out][allow-none]

Since: 3.7


visu_gl_ext_axes_getLengthFactor ()

float
visu_gl_ext_axes_getLengthFactor (VisuGlExtAxes *axes);

Retrieve the scaling factor used to draw axis.

Parameters

axes

a VisuGlExtAxes object.

 

Returns

the scaling factor.

Since: 3.8

Types and Values

struct VisuGlExtAxes

struct VisuGlExtAxes;

An opaque structure.

Since: 3.7


struct VisuGlExtAxesClass

struct VisuGlExtAxesClass {
  VisuGlExtClass parent;
};

A short way to identify _VisuGlExtAxesClass structure.

Members

VisuGlExtClass parent;

the parent class;

 

Since: 3.7


VISU_GL_EXT_AXES_ID

#define VISU_GL_EXT_AXES_ID "Axes"

The id used to identify this extension, see visu_gl_ext_rebuild() for instance.

Property Details

The “basis” property

  “basis”                    VisuBox *

provides the basis-set to draw the axes.

Flags: Read / Write


The “display-orientation” property

  “display-orientation”      gboolean

display orientation information.

Flags: Read / Write

Default value: FALSE


The “orientation-omega” property

  “orientation-omega”        gfloat

omega defining top.

Flags: Read / Write

Allowed values: [0,360]

Default value: 0


The “orientation-phi” property

  “orientation-phi”          gfloat

phi defining top.

Flags: Read / Write

Allowed values: [0,360]

Default value: 0


The “orientation-theta” property

  “orientation-theta”        gfloat

theta defining top.

Flags: Read / Write

Allowed values: [0,180]

Default value: 0


The “size” property

  “size”                     gfloat

portion of the screen for the axis.

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.16


The “view” property

  “view”                     VisuGlView *

rendering view for the axes.

Flags: Read / Write


The “x-label” property

  “x-label”                  gchar *

label for the x axis.

Flags: Read / Write

Default value: "x"


The “x-pos” property

  “x-pos”                    gfloat

position along x axis.

Flags: Read / Write

Allowed values: [0,1]

Default value: 1


The “y-label” property

  “y-label”                  gchar *

label for the y axis.

Flags: Read / Write

Default value: "y"


The “y-pos” property

  “y-pos”                    gfloat

position along y axis.

Flags: Read / Write

Allowed values: [0,1]

Default value: 1


The “z-label” property

  “z-label”                  gchar *

label for the z axis.

Flags: Read / Write

Default value: "z"