VisuGlExtNodeVectors

VisuGlExtNodeVectors — Draw arrows at each node to represent forces, displacements, vibrations...

Functions

Properties

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuGlExt
            ╰── VisuGlExtNodeVectors
                ├── VisuGlExtForces
                ├── VisuGlExtGeodiff
                ╰── VisuGlExtVibrations

Description

A generic VisuGlExt to represent vectors on nodes.

Functions

visu_gl_ext_node_vectors_new ()

VisuGlExtNodeVectors *
visu_gl_ext_node_vectors_new (const gchar *name);

Creates a new VisuGlExt to draw a box.

Parameters

name

the name to give to the extension.

[allow-none]

Returns

a pointer to the VisuGlExt it created or NULL otherwise.

Since: 3.7


visu_gl_ext_node_vectors_set ()

gboolean
visu_gl_ext_node_vectors_set (VisuGlExtNodeVectors *vect,
                              VisuNodeValuesVector *vectors,
                              VisuNodeArrayRenderer *renderer);

Set the vector field from vectors . Use the VisuElementRenderer properties from renderer to display vector properties.

Parameters

vect

The VisuGlExtNodeVectors to attached to.

 

vectors

a VisuNodeValuesVector object.

[allow-none]

renderer

a VisuNodeArrayRenderer object.

[allow-none]

Returns

TRUE if changed.

Since: 3.7


visu_gl_ext_node_vectors_get ()

VisuNodeValuesVector *
visu_gl_ext_node_vectors_get (VisuGlExtNodeVectors *vect);

Retrieves associated VisuData, if any.

Parameters

vect

a VisuGlExtNodeVectors object.

 

Returns

a VisuData object.

[transfer none]

Since: 3.7


visu_gl_ext_node_vectors_setRenderedSize ()

gboolean
visu_gl_ext_node_vectors_setRenderedSize
                               (VisuGlExtNodeVectors *vect,
                                gfloat scale);

scale governs how large the node vectors are drawn. For a positive value, a vector with a normalised size of 1 (see visu_gl_ext_node_vectors_setNormalisation()) will be drawn with the size of scale . For a negative value, a vector of normalised size of 1 will be drawn with a size of -scale times the maximum element size (see visu_node_array_getMaxElementSize()).

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

scale

a floating point value.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_setNormalisation ()

gboolean
visu_gl_ext_node_vectors_setNormalisation
                               (VisuGlExtNodeVectors *vect,
                                float norm);

norm governs how the input node vector field is normalised. With a positive value, all node vectors will be normalised by norm . With a negative value, all node vectors are normalised with respect to the biggest one.

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

norm

a floating point value.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_setTranslation ()

gboolean
visu_gl_ext_node_vectors_setTranslation
                               (VisuGlExtNodeVectors *vect,
                                float trans);

Defines a translation with respect to the center of each node. The vector is shifted outwards, following the vector direction by an amount given by the product of trans and the element size currently drawn.

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

trans

a positive floating point value.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_setColor ()

gboolean
visu_gl_ext_node_vectors_setColor (VisuGlExtNodeVectors *vect,
                                   VisuGlExtNodeVectorsColorScheme scheme);

If scheme is VISU_COLOR_ELEMENT, the vectors are drawn with the color of the currently drawn VisuElement. If scheme is VISU_COLOR_BRIGHT, they are drawn with a highlighted color. If scheme is VISU_COLOR_ORIENTATION, they are drawn with a hue depending onn orientation.

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

scheme

a value.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_setCentering ()

gboolean
visu_gl_ext_node_vectors_setCentering (VisuGlExtNodeVectors *vect,
                                       VisuGlArrowCentering centering);

Change how vectors are position with respect to to center of each node.

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

centering

a VisuGlArrowCentering id.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_setAddLength ()

gboolean
visu_gl_ext_node_vectors_setAddLength (VisuGlExtNodeVectors *vect,
                                       gfloat addLength);

Change the additional length that is used to draw the tail.

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

addLength

a positive value.

 

Returns

TRUE if settings has been changed.

Since: 3.8


visu_gl_ext_node_vectors_setVectorThreshold ()

gboolean
visu_gl_ext_node_vectors_setVectorThreshold
                               (VisuGlExtNodeVectors *vect,
                                float val);

Vectors are indeed drawn if a threshold value is reach. If val is strictly positive, the norm of each vector is compared to val . If val is negative, the normalised [0;1] norm is compared to -val .

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

val

a value.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_setLabelThreshold ()

gboolean
visu_gl_ext_node_vectors_setLabelThreshold
                               (VisuGlExtNodeVectors *vect,
                                float val);

Vector norms can be drawn if a threshold value is reach. If val is strictly positive, the norm of each vector is compared to val . If val is negative, the normalised [0;1] norm is compared to -val .

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

val

a value.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_setArrow ()

gboolean
visu_gl_ext_node_vectors_setArrow (VisuGlExtNodeVectors *vect,
                                   float tailLength,
                                   float tailRadius,
                                   guint tailN,
                                   float headLength,
                                   float headRadius,
                                   guint headN);

Defines the profile of the arrows representing the vectors.

Parameters

vect

the VisuGlExtNodeVectors object to modify.

 

tailLength

the length for the tail part of the vector.

 

tailRadius

the radius for the tail part of the vector.

 

tailN

the number of polygons to draw the tail part of the vector.

 

headLength

the length for the head part of the vector.

 

headRadius

the radius for the head part of the vector.

 

headN

the number of polygons to draw the head part of the vector.

 

Returns

TRUE if setting has been changed.

Since: 3.7


visu_gl_ext_node_vectors_getNormalisation ()

float
visu_gl_ext_node_vectors_getNormalisation
                               (VisuGlExtNodeVectors *vect);

Gets the normalisation factor, see visu_gl_ext_node_vectors_setNormalisation().

Parameters

vect

the VisuGlExtNodeVectors object to inquire.

 

Returns

the normalisation factor used by vact .

Since: 3.7

Types and Values

enum VisuGlExtNodeVectorsColorScheme

Different colour schemes used to colourize the vectors.

Members

VISU_COLOR_ELEMENT

use the VisuElement colour for vectors.

 

VISU_COLOR_BRIGHT

use a bright colour derived from the VisuElement colour for the vectors.

 

VISU_COLOR_ORIENTATION

use the orientation to colour the vectors.

 

Since: 3.8

Property Details

The “model” property

  “model”                    VisuNodeValuesVector *

vectors data.

Flags: Read


The “normalisation” property

  “normalisation”            gfloat

normalisation factor.

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “rendering-size” property

  “rendering-size”           gfloat

rendering size.

Flags: Read / Write

Default value: -2