![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
geometrygeometry — different routines to do high level geometry studies on a box or a set of boxes. |
#define VISU_GEODIFF_ID VisuPaths; gchar * visu_geodiff_export (VisuData *data
); void visu_geodiff_getPeriodicDistance (float diff[3]
,VisuData *data
,VisuNode *node1
,VisuNode *node2
); gboolean visu_geodiff_hasData (VisuData *data
); gboolean visu_geodiff_new (VisuData *dataRef
,VisuData *data
,gboolean reorder
); void visu_geometry_init (); gboolean visu_paths_addFromDiff (VisuPaths *paths
,VisuData *data
); gboolean visu_paths_addNodeStep (VisuPaths *paths
,guint time
,guint nodeId
,float xyz[3]
,float dxyz[3]
,float energy
); void visu_paths_constrainInBox (VisuPaths *paths
,VisuData *data
); void visu_paths_draw (VisuPaths *paths
); void visu_paths_empty (VisuPaths *paths
); gboolean visu_paths_exportXMLFile (const VisuPaths *paths
,const gchar *filename
,GError **error
); void visu_paths_free (VisuPaths *paths
); guint visu_paths_getLength (VisuPaths *paths
); ToolShade * visu_paths_getToolShade (VisuPaths *paths
); VisuPaths * visu_paths_new (float translation[3]
); gboolean visu_paths_parseFromXML (const gchar *filename
,VisuPaths *paths
,GError **error
); void visu_paths_pinPositions (VisuPaths *paths
,VisuData *data
); VisuPaths * visu_paths_ref (VisuPaths *paths
); gboolean visu_paths_setToolShade (VisuPaths *paths
,ToolShade *shade
); void visu_paths_setTranslation (VisuPaths *paths
,float cartCoord[3]
); void visu_paths_unref (VisuPaths *paths
);
The first possibility of the geometry section is to make a two by two difference node position difference between two VisuData objects. The VisuNode positions are compared (number to number and not closed equivalent to closed equivalent) and stored for visualisation. The visualisation is done through small arrows position on the currently visualised file.
#define VISU_GEODIFF_ID "geometry_diff"
The default name used for the VisuGlExt representing
displacements, see visu_gl_ext_getFromName()
.
typedef struct _VisuPaths VisuPaths;
An opaque structure to save a set of paths.
Since 3.6
gchar * visu_geodiff_export (VisuData *data
);
Create a string with differences of coordinates stored in data
in
cartesian coordinates.
|
a VisuData object. |
Returns : |
a new string that should be freed after use. |
Since 3.6
void visu_geodiff_getPeriodicDistance (float diff[3]
,VisuData *data
,VisuNode *node1
,VisuNode *node2
);
Compute the shortest distance between node1
and node2
of data
taking into account the periodic boundary conditions.
|
a location to store the shift. [out][array fixed-size=3] |
|
a VisuData object. |
|
a VisuNode object. |
|
another VisuNode object. |
Since 3.5
gboolean visu_geodiff_hasData (VisuData *data
);
A set coordinate differences can be associated to a VisuData using visu_geodiff_new()
.
|
a VisuData object. |
Returns : |
TRUE if the given data has a set of differences associated. |
Since 3.6
gboolean visu_geodiff_new (VisuData *dataRef
,VisuData *data
,gboolean reorder
);
Compare the position of each VisuNode of dataRef
and data
,
the result is store as a property of data
and can be visualise
using a VisuGlExtNodeVectors object. If reorder
is TRUE, the nodes in
data
will be modified to follow the ordering of dataRef
.
|
a VisuData object ; |
|
another VisuData object. |
|
a boolean. |
Returns : |
TRUE if a difference is possible (same number of nodes). |
Since 3.5
void visu_geometry_init ();
Initialise the geometry routines. Should not be called except at initialisation time.
Since 3.5
gboolean visu_paths_addFromDiff (VisuPaths *paths
,VisuData *data
);
This routine read the geometry difference hold in data
and add a
new step in the set of paths. If new paths are created, one
should call visu_paths_setTranslation()
to be sure that all
paths are moved inside the box.
|
a VisuData object with a geometry difference (see
visu_geodiff_new() ). |
|
the set of paths to extend. |
Returns : |
TRUE if new paths have been added. |
Since 3.6
gboolean visu_paths_addNodeStep (VisuPaths *paths
,guint time
,guint nodeId
,float xyz[3]
,float dxyz[3]
,float energy
);
This routine expand the path for the given nodeId
at position xyz
of dxyz
. The energy
value will be used only if
visu_paths_setToolShade()
is used with a non NULL ToolShade. In that
case the energy
value will be used to colourise the provided path.
|
a set of paths. |
|
the flag that give the number of expansion to update. |
|
the node to expand the path of. |
|
the current position of the path. |
|
the variation in the path. |
|
the energy of the system. |
Returns : |
TRUE if a new path is started. |
Since 3.6
void visu_paths_constrainInBox (VisuPaths *paths
,VisuData *data
);
Modify the corrdinates of the path nodes to contraint them in a box (when applying translations for instance).
Since 3.6
void visu_paths_draw (VisuPaths *paths
);
OpenGL calls to create the paths.
|
a set of paths. |
Since 3.6
void visu_paths_empty (VisuPaths *paths
);
Reinitialise internal values of a given paths
.
|
a VisuPaths object. |
Since 3.6
gboolean visu_paths_exportXMLFile (const VisuPaths *paths
,const gchar *filename
,GError **error
);
Write an XML file with the description of the given paths
.
|
a VisuPaths object. |
|
a location on disk. |
|
a pointer on an error. |
Returns : |
TRUE if no error. |
Since 3.6
void visu_paths_free (VisuPaths *paths
);
Free a set of paths.
|
a VisuPaths object. |
Since 3.6
guint visu_paths_getLength (VisuPaths *paths
);
Get the number of steps stored in a VisuPaths.
|
a VisuPaths object. |
Returns : |
the number of steps. |
Since 3.6
ToolShade * visu_paths_getToolShade (VisuPaths *paths
);
The paths are drawn with a colourisation scheme.
Since 3.6
VisuPaths * visu_paths_new (float translation[3]
);
Create a new VisuPaths object.
|
the current box translation (cartesian). |
Returns : |
the newly create object VisuPaths, to be freed with
visu_paths_free() . |
Since 3.6
gboolean visu_paths_parseFromXML (const gchar *filename
,VisuPaths *paths
,GError **error
);
Read an XML containing a description of paths
. paths
is newly
created on success and should be freed with visu_paths_free()
.
|
a location on disk. |
|
a VisuPaths object. |
|
a pointer on an error. |
Returns : |
TRUE on success. |
Since 3.6
void visu_paths_pinPositions (VisuPaths *paths
,VisuData *data
);
Use the current positions of data
to extend paths
.
Since 3.6
VisuPaths * visu_paths_ref (VisuPaths *paths
);
Increase the ref counter.
|
a VisuPaths object. |
Returns : |
itself. |
Since 3.7
gboolean visu_paths_setToolShade (VisuPaths *paths
,ToolShade *shade
);
Set the colourisation scheme for the path.
Since 3.6
void visu_paths_setTranslation (VisuPaths *paths
,float cartCoord[3]
);
Change the translation of the path, stored in cartesian coordinates.
|
a VisuPaths object. |
|
three floats. |
Since 3.6