Top | ![]() |
![]() |
![]() |
![]() |
VisuGlExtNodeVectorsVisuGlExtNodeVectors — Draw arrows at each node to represent forces, displacements, vibrations... |
VisuNodeValuesVector * | model | Read |
gfloat | normalisation | Read / Write |
gfloat | rendering-size | Read / Write |
GObject ╰── ToolDbgObj ╰── VisuGlExt ╰── VisuGlExtNodeVectors ├── VisuGlExtForces ├── VisuGlExtGeodiff ╰── VisuGlExtVibrations
VisuGlExtNodeVectors *
visu_gl_ext_node_vectors_new (const gchar *name
);
Creates a new VisuGlExt to draw a box.
Since: 3.7
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.
vect |
The VisuGlExtNodeVectors to attached to. |
|
vectors |
a VisuNodeValuesVector object. |
[allow-none] |
renderer |
a VisuNodeArrayRenderer object. |
[allow-none] |
Since: 3.7
VisuNodeValuesVector *
visu_gl_ext_node_vectors_get (VisuGlExtNodeVectors *vect
);
Retrieves associated VisuData, if any.
Since: 3.7
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()
).
Since: 3.7
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.
Since: 3.7
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.
Since: 3.7
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.
Since: 3.7
gboolean visu_gl_ext_node_vectors_setCentering (VisuGlExtNodeVectors *vect
,VisuGlArrowCentering centering
);
Change how vectors are position with respect to to center of each node.
Since: 3.7
gboolean visu_gl_ext_node_vectors_setAddLength (VisuGlExtNodeVectors *vect
,gfloat addLength
);
Change the additional length that is used to draw the tail.
Since: 3.8
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
.
Since: 3.7
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
.
Since: 3.7
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. |
Since: 3.7
float
visu_gl_ext_node_vectors_getNormalisation
(VisuGlExtNodeVectors *vect
);
Gets the normalisation factor, see visu_gl_ext_node_vectors_setNormalisation()
.
Since: 3.7
Different colour schemes used to colourize the vectors.
use the VisuElement colour for vectors. |
||
use a bright colour derived from the VisuElement colour for the vectors. |
||
use the orientation to colour the vectors. |
Since: 3.8