VisuGlExtNodeVectors

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

Synopsis

struct              VisuGlExtNodeVectors;
struct              VisuGlExtNodeVectorsClass;
VisuGlExtNodeVectors * visu_gl_ext_geodiff_getDefault   ();
void                visu_gl_ext_node_vectors_draw       (VisuGlExtNodeVectors *vect);
VisuData *          visu_gl_ext_node_vectors_getData    (VisuGlExtNodeVectors *vect);
float               visu_gl_ext_node_vectors_getNormalisation
                                                        (VisuGlExtNodeVectors *vect);
VisuGlExtNodeVectors * visu_gl_ext_node_vectors_new     (const gchar *name,
                                                         const gchar *propId);
gboolean            visu_gl_ext_node_vectors_setArrow   (VisuGlExtNodeVectors *vect,
                                                         float tailLength,
                                                         float tailRadius,
                                                         guint tailN,
                                                         float headLength,
                                                         float headRadius,
                                                         guint headN);
gboolean            visu_gl_ext_node_vectors_setCentering
                                                        (VisuGlExtNodeVectors *vect,
                                                         VisuGlArrowCentering centering);
gboolean            visu_gl_ext_node_vectors_setColor   (VisuGlExtNodeVectors *vect,
                                                         gboolean follow);
gboolean            visu_gl_ext_node_vectors_setData    (VisuGlExtNodeVectors *vect,
                                                         VisuData *dataObj);
gboolean            visu_gl_ext_node_vectors_setLabelThreshold
                                                        (VisuGlExtNodeVectors *vect,
                                                         float val);
gboolean            visu_gl_ext_node_vectors_setNormalisation
                                                        (VisuGlExtNodeVectors *vect,
                                                         float norm);
gboolean            visu_gl_ext_node_vectors_setRenderedSize
                                                        (VisuGlExtNodeVectors *vect,
                                                         gfloat scale);
gboolean            visu_gl_ext_node_vectors_setTranslation
                                                        (VisuGlExtNodeVectors *vect,
                                                         float trans);
gboolean            visu_gl_ext_node_vectors_setVectorThreshold
                                                        (VisuGlExtNodeVectors *vect,
                                                         float val);
VisuGlExtNodeVectors * visu_gl_ext_vibration_getDefault ();

Object Hierarchy

  GObject
   +----VisuGlExt
         +----VisuGlExtNodeVectors
               +----VisuGlExtForces

Properties

  "propId"                   gchar*                : Read / Write / Construct Only

Description

A generic VisuGlExt to represent vectors on nodes.

Details

struct VisuGlExtNodeVectors

struct VisuGlExtNodeVectors;

An opaque structure.

Since 3.7


struct VisuGlExtNodeVectorsClass

struct VisuGlExtNodeVectorsClass {
  VisuGlExtClass parent;
};

A short way to identify _VisuGlExtNodeVectorsClass structure.

VisuGlExtClass parent;

the parent class;

Since 3.7


visu_gl_ext_geodiff_getDefault ()

VisuGlExtNodeVectors * visu_gl_ext_geodiff_getDefault   ();

V_Sim has a private internal VisuGlExtNodeVectors object to represent geometry differences.

Returns :

the default VisuGlExtNodeVectors object used for geometry differences. [transfer none]

Since 3.7


visu_gl_ext_node_vectors_draw ()

void                visu_gl_ext_node_vectors_draw       (VisuGlExtNodeVectors *vect);

Compile the OpenGL list that draw arrows on nodes.

vect :

a VisuGlExtNodeVectors object.

Since 3.7


visu_gl_ext_node_vectors_getData ()

VisuData *          visu_gl_ext_node_vectors_getData    (VisuGlExtNodeVectors *vect);

Retrieves associated VisuData, if any.

vect :

a VisuGlExtNodeVectors object.

Returns :

a VisuData object. [transfer none]

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().

vect :

the VisuGlExtNodeVectors object to inquire.

Returns :

the normalisation factor used by vact.

Since 3.7


visu_gl_ext_node_vectors_new ()

VisuGlExtNodeVectors * visu_gl_ext_node_vectors_new     (const gchar *name,
                                                         const gchar *propId);

Creates a new VisuGlExt to draw a box.

name :

the name to give to the extension. [allow-none]

propId :

the name of the VisuNodeProperty that stores the vector representation.

Returns :

a pointer to the VisuGlExt it created or NULL otherwise.

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.

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_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.

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_setColor ()

gboolean            visu_gl_ext_node_vectors_setColor   (VisuGlExtNodeVectors *vect,
                                                         gboolean follow);

If follow is TRUE, the vectors are drawn with the color of the currently drawn VisuElement. If FALSE, it is drawn with a highlighted color.

vect :

the VisuGlExtNodeVectors object to modify.

follow :

a boolean.

Returns :

TRUE if setting has been changed.

Since 3.7


visu_gl_ext_node_vectors_setData ()

gboolean            visu_gl_ext_node_vectors_setData    (VisuGlExtNodeVectors *vect,
                                                         VisuData *dataObj);

Attach an VisuGlView to render to and setup the legend to get the node population also.

vect :

The VisuGlExtNodeVectors to attached to.

dataObj :

the nodes to get the population of.

Returns :

TRUE if visu_gl_ext_node_vectors_draw() should be called and then 'OpenGLAskForReDraw' signal be emitted.

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.

vect :

the VisuGlExtNodeVectors object to modify.

val :

a 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.

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_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()).

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_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.

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_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.

vect :

the VisuGlExtNodeVectors object to modify.

val :

a value.

Returns :

TRUE if setting has been changed.

Since 3.7


visu_gl_ext_vibration_getDefault ()

VisuGlExtNodeVectors * visu_gl_ext_vibration_getDefault ();

V_Sim has a private internal VisuGlExtNodeVectors object to represent phonons with arrows.

Returns :

the default VisuGlExtNodeVectors object used for representing phonons with arrows. [transfer none]

Since 3.7

Property Details

The "propId" property

  "propId"                   gchar*                : Read / Write / Construct Only

property name to get vectors from.

Default value: ""