![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
VisuGlExtNodeVectorsVisuGlExtNodeVectors — Draw arrows at each node to represent forces, displacements, vibrations... |
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 ();
struct VisuGlExtNodeVectorsClass { VisuGlExtClass parent; };
A short way to identify _VisuGlExtNodeVectorsClass structure.
VisuGlExtClass |
the parent class; |
Since 3.7
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
void visu_gl_ext_node_vectors_draw (VisuGlExtNodeVectors *vect
);
Compile the OpenGL list that draw arrows on nodes.
|
a VisuGlExtNodeVectors object. |
Since 3.7
VisuData * visu_gl_ext_node_vectors_getData (VisuGlExtNodeVectors *vect
);
Retrieves associated VisuData, if any.
|
a VisuGlExtNodeVectors object. |
Returns : |
a VisuData object. [transfer none] |
Since 3.7
float visu_gl_ext_node_vectors_getNormalisation
(VisuGlExtNodeVectors *vect
);
Gets the normalisation factor, see visu_gl_ext_node_vectors_setNormalisation()
.
|
the VisuGlExtNodeVectors object to inquire. |
Returns : |
the normalisation factor used by vact . |
Since 3.7
VisuGlExtNodeVectors * visu_gl_ext_node_vectors_new (const gchar *name
,const gchar *propId
);
Creates a new VisuGlExt to draw a box.
|
the name to give to the extension. [allow-none] |
|
the name of the VisuNodeProperty that stores the vector representation. |
Returns : |
a pointer to the VisuGlExt it created or NULL otherwise. |
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.
|
the VisuGlExtNodeVectors object to modify. |
|
the length for the tail part of the vector. |
|
the radius for the tail part of the vector. |
|
the number of polygons to draw the tail part of the vector. |
|
the length for the head part of the vector. |
|
the radius for the head part of the vector. |
|
the number of polygons to draw the head part of the vector. |
Returns : |
TRUE if setting has been changed. |
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.
|
the VisuGlExtNodeVectors object to modify. |
|
a VisuGlArrowCentering id. |
Returns : |
TRUE if setting has been changed. |
Since 3.7
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.
|
the VisuGlExtNodeVectors object to modify. |
|
a boolean. |
Returns : |
TRUE if setting has been changed. |
Since 3.7
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.
|
The VisuGlExtNodeVectors to attached to. |
|
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
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
.
|
the VisuGlExtNodeVectors object to modify. |
|
a value. |
Returns : |
TRUE if setting has been changed. |
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.
|
the VisuGlExtNodeVectors object to modify. |
|
a floating point value. |
Returns : |
TRUE if setting has been changed. |
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()
).
|
the VisuGlExtNodeVectors object to modify. |
|
a floating point value. |
Returns : |
TRUE if setting has been changed. |
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.
|
the VisuGlExtNodeVectors object to modify. |
|
a positive floating point value. |
Returns : |
TRUE if setting has been changed. |
Since 3.7
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
.
|
the VisuGlExtNodeVectors object to modify. |
|
a value. |
Returns : |
TRUE if setting has been changed. |
Since 3.7
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
"propId"
property"propId" gchar* : Read / Write / Construct Only
property name to get vectors from.
Default value: ""