VisuData

VisuData — Give methods to store and manage data from input file(s).

Synopsis

struct              VisuData;
struct              VisuDataClass;
gboolean            (*VisuDataColorFunc)                (VisuData *visuData,
                                                         float rgba[4],
                                                         VisuElement *ele,
                                                         VisuNode *node);
float               (*VisuDataScalingFunc)              (VisuData *visuData,
                                                         VisuNode *node);
void                visu_data_addFile                   (VisuData *data,
                                                         const gchar *file,
                                                         int kind,
                                                         ToolFileFormat *format);
VisuNode *          visu_data_addNodeFromElement        (VisuData *data,
                                                         VisuElement *ele,
                                                         float xyz[3],
                                                         gboolean reduced,
                                                         gboolean emitSignal);
VisuNode *          visu_data_addNodeFromElementName    (VisuData *data,
                                                         const gchar *name,
                                                         float xyz[3],
                                                         gboolean reduced,
                                                         gboolean emitSignal);
VisuNode *          visu_data_addNodeFromIndex          (VisuData *data,
                                                         guint position,
                                                         float xyz[3],
                                                         gboolean reduced,
                                                         gboolean emitSignal);
guint               visu_data_addTimeout                (VisuData *data,
                                                         guint time,
                                                         GSourceFunc func,
                                                         gpointer user_data);
GList *             visu_data_class_getAllObjects       (void);
gboolean            visu_data_constrainedElementInTheBox
                                                        (VisuData *data,
                                                         VisuElement *element);
gboolean            visu_data_constrainedFree           (VisuData *data);
gboolean            visu_data_constrainedInTheBox       (VisuData *data);
gboolean            visu_data_forceXYZtranslation       (VisuData *data,
                                                         float xyz[3]);
void                visu_data_freePopulation            (VisuData *data);
gfloat              visu_data_getAllNodeExtens          (VisuData *dataObj,
                                                         VisuBox *box);
gboolean            visu_data_getChangeElementFlag      (VisuData *data);
VisuNodeInfo *      visu_data_getDistanceList           (VisuData *data,
                                                         guint nodeId,
                                                         float *minVal);
const gchar *       visu_data_getFile                   (VisuData *data,
                                                         int kind,
                                                         ToolFileFormat **format);
gchar *             visu_data_getFileCommentary         (VisuData *data,
                                                         gint iSet);
gchar *             visu_data_getFilesAsLabel           (const VisuData *data);
int                 visu_data_getISubset                (VisuData *data);
int                 visu_data_getNSubset                (VisuData *data);
gboolean            visu_data_getNodeBoxFromCoord       (VisuData *data,
                                                         float xcart[3],
                                                         int nodeBox[3]);
gboolean            visu_data_getNodeBoxFromNumber      (VisuData *data,
                                                         guint nodeId,
                                                         int nodeBox[3]);
void                visu_data_getNodeCoordinates        (VisuData *data,
                                                         VisuNode *node,
                                                         float *x,
                                                         float *y,
                                                         float *z);
void                visu_data_getNodePosition           (VisuData *data,
                                                         VisuNode *node,
                                                         float coord[3]);
float               visu_data_getNodeScalingFactor      (VisuData *data,
                                                         VisuNode *node);
void                visu_data_getNodeUserPosition       (VisuData *data,
                                                         VisuNode *node,
                                                         float coord[3]);
gboolean            visu_data_getTranslationStatus      (VisuData *data);
gboolean            visu_data_getUserColor              (VisuData *data,
                                                         VisuElement *ele,
                                                         VisuNode *node,
                                                         float rgba[4]);
float *             visu_data_getXYZtranslation         (VisuData *data);
gboolean            visu_data_hasUserColorFunc          (VisuData *data);
VisuData *          visu_data_new                       (void);
VisuData *          visu_data_new_withFiles             (const gchar **files);
void                visu_data_removeAllFiles            (VisuData *data);
gboolean            visu_data_removeTimeout             (VisuData *data,
                                                         guint timeoutId);
gboolean            visu_data_reorder                   (VisuData *data,
                                                         VisuData *dataRef);
gboolean            visu_data_replicate                 (VisuData *data,
                                                         float extension[3]);
gboolean            visu_data_restore                   (VisuData *data);
void                visu_data_setChangeElementFlag      (VisuData *data,
                                                         gboolean changeElement);
void                visu_data_setColorFunc              (VisuData *data,
                                                         VisuDataColorFunc func);
void                visu_data_setFileCommentary         (VisuData *data,
                                                         gchar *commentary,
                                                         gint iSet);
void                visu_data_setISubset                (VisuData *data,
                                                         int iSet);
void                visu_data_setNSubset                (VisuData *data,
                                                         int nSet);
gboolean            visu_data_setNewBasis               (VisuData *data,
                                                         float matA[3][3],
                                                         float O[3]);
gboolean            visu_data_setNewBasisFromNodes      (VisuData *data,
                                                         guint nO,
                                                         guint nA,
                                                         guint nB,
                                                         guint nC);
void                visu_data_setNodeScalingFunc        (VisuData *data,
                                                         VisuDataScalingFunc scaling);
VisuBox *           visu_data_setTightBox               (VisuData *data);
gboolean            visu_data_setXYZtranslation         (VisuData *data,
                                                         float xyz[3]);

Object Hierarchy

  GObject
   +----VisuNodeArray
         +----VisuData

Implemented Interfaces

VisuData implements VisuBoxed.

Properties

  "totalEnergy"              gdouble               : Read / Write / Construct

Signals

  "FilesChanged"                                   : No Hooks
  "TranslationsChanged"                            : No Hooks
  "objectFreed"                                    : No Hooks

Description

The main goal of V_Sim is to draw lists of elements. For example, when used to render atoms, a box that contains 24 silicon atoms and 46 germanium atoms is a box with two elements (silicon and germanium) where the silicon element has 24 nodes and the germanium element has 46 nodes. This module gives then methods to create nodes (see VisuElement to create and managed elements).

All nodes are stored in a structure called VisuNodes and VisuNodes is encapsulated in a VisuData for all not-node related information. V_Sim uses one VisuData per input file(s). This structure contains a list of pointers on all the VisuElement used in this file.

To iterate on nodes, one should use the provided iterators (see VisuNodeArrayIter) methods, like visu_node_array_iter_next().

Details

struct VisuData

struct VisuData;

Opaque structure for VisuData objects.


struct VisuDataClass

struct VisuDataClass {
  VisuNodeArrayClass parent;
};

A short way to identify _VisuDataClass structure.

VisuNodeArrayClass parent;

the parent class.

VisuDataColorFunc ()

gboolean            (*VisuDataColorFunc)                (VisuData *visuData,
                                                         float rgba[4],
                                                         VisuElement *ele,
                                                         VisuNode *node);

This prototype is used to specify an optional method to associate a color with external values to each node.

visuData :

a pointer to the calling object ;

ele :

a VisuElement ;

node :

a VisuNode ;

rgba :

an 4 allocated float area to store the return values. [in][array fixed-size=4]

Returns :

TRUE if the node should take colour read in rgba.

VisuDataScalingFunc ()

float               (*VisuDataScalingFunc)              (VisuData *visuData,
                                                         VisuNode *node);

Interface for routine that need to rescale node before drawing them.

visuData :

a pointer to the calling object ;

node :

a VisuNode ;

Returns :

the scaling factor.

visu_data_addFile ()

void                visu_data_addFile                   (VisuData *data,
                                                         const gchar *file,
                                                         int kind,
                                                         ToolFileFormat *format);

This method is used to add files of type kind to the data. The file attribute is copied. The format argument can be null.

data :

a VisuData object ;

file :

a string that points to a file ;

kind :

an integer to qualify the file to add ;

format :

a file format. [allow-none]

visu_data_addNodeFromElement ()

VisuNode *          visu_data_addNodeFromElement        (VisuData *data,
                                                         VisuElement *ele,
                                                         float xyz[3],
                                                         gboolean reduced,
                                                         gboolean emitSignal);

This method adds a new VisuNode to the specified VisuData. If emitSignal is TRUE, then PopulationIncrease signal is triggered.

data :

the VisuData where to add the new VisuNode ;

ele :

the VisuElement kind of the new VisuNode ;

xyz :

its coordinates ;. [in][array fixed-size=3]

reduced :

coordinates are in reduced coordinates ;

emitSignal :

a boolean.

Returns :

a pointer to the newly created node. [transfer none]

visu_data_addNodeFromElementName ()

VisuNode *          visu_data_addNodeFromElementName    (VisuData *data,
                                                         const gchar *name,
                                                         float xyz[3],
                                                         gboolean reduced,
                                                         gboolean emitSignal);

This method adds a new VisuNode to the specified VisuData. If emitSignal is TRUE, then PopulationIncrease signal is triggered.

data :

the VisuData where to add the new VisuNode ;

name :

the name of the element ;

xyz :

its coordinates ;. [in][array fixed-size=3]

reduced :

coordinates are in reduced coordinates ;

emitSignal :

a boolean.

Returns :

a pointer to the newly created node. [transfer none]

Since 3.6


visu_data_addNodeFromIndex ()

VisuNode *          visu_data_addNodeFromIndex          (VisuData *data,
                                                         guint position,
                                                         float xyz[3],
                                                         gboolean reduced,
                                                         gboolean emitSignal);

This method adds a new VisuNode to the specified VisuData. Position must be chosen between 0 and (ntype - 1) and corresponds to the position of the array of VisuNodes of a VisuElement. If emitSignal is TRUE, then PopulationIncrease signal is triggered.

data :

the VisuData where to add the new VisuNode ;

position :

a integer corresponding to the position of a VisuElement in the array **nodes in the structure;

xyz :

its coordinates ;. [in][array fixed-size=3]

reduced :

coordinates are in reduced coordinates ;

emitSignal :

a boolean.

Returns :

a pointer to the newly created node. [transfer none]

visu_data_addTimeout ()

guint               visu_data_addTimeout                (VisuData *data,
                                                         guint time,
                                                         GSourceFunc func,
                                                         gpointer user_data);

This method is used to add the func method to be called regularly at the period time. This methos calls in fact g_timeout_add() with the given arguments. But the source id is stored internaly and the timeout function is removed automatically when the object data is destroyed. It is convienient to add a method working on the VisuData object that is called periodically during the life of te object.

data :

a valid VisuData object ;

time :

the period of call in milliseconds ;

func :

the callback function to be called ;. [scope call]

user_data :

a pointer to some user defined informations. [closure]

Returns :

the source id if the calling method need to work with it. To remove the callback, don't use g_source_remove() but visu_data_removeTimeout() to inform the VisuData object that this source has been removed and not to remove it when the object will be destroyed.

visu_data_class_getAllObjects ()

GList *             visu_data_class_getAllObjects       (void);

This methods is used to retrieve all VisuObject currently allocated in V_Sim. It is usefull to apply some changes on all objects (resources for example).

Returns :

a list of V_Sim own VisuData objects. [transfer none][element-type VisuData*]

visu_data_constrainedElementInTheBox ()

gboolean            visu_data_constrainedElementInTheBox
                                                        (VisuData *data,
                                                         VisuElement *element);

Check all the nodes of the specified element and change their coordinates if they are out of the bounding box. The position of each node is the result of the sum of their own position and of the box translation.

data :

a VisuData object ;

element :

a VisuElement object.

Returns :

if returns TRUE, the VisuNodeArray::PositionChanged signal should be emitted.

visu_data_constrainedFree ()

gboolean            visu_data_constrainedFree           (VisuData *data);

Return all the nodes to their original position, except for the global translation.

data :

a VisuData object.

Returns :

if returns TRUE, the VisuNodeArray::PositionChanged signal should be emitted.

visu_data_constrainedInTheBox ()

gboolean            visu_data_constrainedInTheBox       (VisuData *data);

It does the same things that visu_data_constrainedElementInTheBox() but for all the VisuElement of the given data. I.e. it checks all the nodes and changes their coordinates if they are out of the bounding box. The position of each node is the result of the sum of their own position and of the box translation.

data :

a VisuData object.

Returns :

if returns TRUE, the VisuNodeArray::PositionChanged signal should be emitted.

visu_data_forceXYZtranslation ()

gboolean            visu_data_forceXYZtranslation       (VisuData *data,
                                                         float xyz[3]);

Apply the given box translation without paying attention to the box boundary conditions. See visu_data_setXYZtranslation() for a method respecting the periodicity.

data :

a VisuData object.

xyz :

three floats in cartesian representation. [in][array fixed-size=3]

Returns :

if returns TRUE, the VisuNodeArray::PositionChanged signal should be emitted.

Since 3.7


visu_data_freePopulation ()

void                visu_data_freePopulation            (VisuData *data);

This method frees only the allocated memory that deals with the nodes (i.e. everything except the data of the files, the properties and the setColor method.

data :

a VisuData to be freed.

visu_data_getAllNodeExtens ()

gfloat              visu_data_getAllNodeExtens          (VisuData *dataObj,
                                                         VisuBox *box);

Calculate the longest distance between the surface of box (without extension) and all the nodes. If box is NULL, then the internal box of dataObj is used.

dataObj :

a VisuData object.

box :

a VisuBox object. [allow-none]

Returns :

the longest distance between the surface of box (without extension) and all the nodes.

Since 3.7


visu_data_getChangeElementFlag ()

gboolean            visu_data_getChangeElementFlag      (VisuData *data);

V_Sim can use a flag set on data object to know if data has exactly the same VisuElement list than the previously rendered one.

data :

a VisuData object.

Returns :

TRUE if the previously rendered VisuData object has had the same VisuElement list than the given one, FALSE otherwise.

visu_data_getDistanceList ()

VisuNodeInfo *      visu_data_getDistanceList           (VisuData *data,
                                                         guint nodeId,
                                                         float *minVal);

This routine creates an array of VisuNodeInfo, storing for each node its node id and its distance to nodeId. The periodicity is NOT taken into account. The array is not distance sorted, but if minVal is provided, it will contain the minimal distance between nodeId and the other nodes.

data :

a VisuData object ;

nodeId :

a node id.

minVal :

a location for a float.

Returns :

an array of VisuNodeInfo of size the number of nodes. It is terminated by nodeId value itself.

Since 3.5


visu_data_getFile ()

const gchar *       visu_data_getFile                   (VisuData *data,
                                                         int kind,
                                                         ToolFileFormat **format);

This prototype is used to retrieve stored files identify by their kind.

data :

a VisuData object.

kind :

an integer to qualify the required file ;

format :

a location for a file format (can be NULL).

Returns :

the name of a file (it should not be deleted).

visu_data_getFileCommentary ()

gchar *             visu_data_getFileCommentary         (VisuData *data,
                                                         gint iSet);

Get the commentary associated to the given data, for the given node set.

data :

a VisuData object ;

iSet :

an integer (>= 0).

Returns :

a string description (possibly empty). This string is own by V_Sim and should not be freed.

visu_data_getFilesAsLabel ()

gchar *             visu_data_getFilesAsLabel           (const VisuData *data);

Creates a label using the list of files used to defined this data separated by dashes.

data :

a VisuData object.

Returns :

a newly created string with the filenames. If no filename were used to defined data, the function returns NULL.

Since 3.6


visu_data_getISubset ()

int                 visu_data_getISubset                (VisuData *data);

Retrieve the id of the current set of data (ordered as in C, beginning at 0).

data :

a VisuData object.

Returns :

the id of the set of nodes currently loaded, -1 if none.

visu_data_getNSubset ()

int                 visu_data_getNSubset                (VisuData *data);

Retrieve the number of available sets of nodes for this VisuData, see visu_data_setNSubset().

data :

a VisuData object.

Returns :

the number of set of nodes (1 is default).

visu_data_getNodeBoxFromCoord ()

gboolean            visu_data_getNodeBoxFromCoord       (VisuData *data,
                                                         float xcart[3],
                                                         int nodeBox[3]);

This method retrieves the value of the box associated to the coordinates of the node (with respect to the unit cell).

data :

a VisuData object.

xcart :

the coordinates of a node. [in][array fixed-size=3]

nodeBox :

the array to store the box of the node. [in][array fixed-size=3]

Returns :

TRUE if everything went well, FALSE otherwise. The box is stored in the nodeBox array.

visu_data_getNodeBoxFromNumber ()

gboolean            visu_data_getNodeBoxFromNumber      (VisuData *data,
                                                         guint nodeId,
                                                         int nodeBox[3]);

This method retrieves the value of the box associated to a node (with respect to the unit cell).

data :

a VisuData object.

nodeId :

the index of the node considered.

nodeBox :

the array to store the box of the node. [in][array fixed-size=3]

Returns :

TRUE if everything went well, FALSE otherwise. The box is stored in the nodeBox array.

visu_data_getNodeCoordinates ()

void                visu_data_getNodeCoordinates        (VisuData *data,
                                                         VisuNode *node,
                                                         float *x,
                                                         float *y,
                                                         float *z);

Wrapper for the function visu_data_getNodePosition() in case of call from python.

data :

a VisuData object ;

node :

a VisuNode object ;

x :

the x coordinate. [out caller-allocates]

y :

the y coordinate. [out caller-allocates]

z :

the z coordinate. [out caller-allocates]

Since 3.6


visu_data_getNodePosition ()

void                visu_data_getNodePosition           (VisuData *data,
                                                         VisuNode *node,
                                                         float coord[3]);

Position of nodes are subject to various translations and different transformations. Their coordinates should not be access directly through node.[xyz]. This method is used to retrieve the given node position.

data :

a VisuData object ;

node :

a VisuNode object ;

coord :

an array of 3 floating point values to store the position. [array fixed-size=3][out caller-allocates]

visu_data_getNodeScalingFactor ()

float               visu_data_getNodeScalingFactor      (VisuData *data,
                                                         VisuNode *node);

One can modify the size of a given node using a routine set by visu_data_setNodeScalingFunc(). By default the scaling is 1.

data :

a VisuData object.

node :

a VisuNode object.

Returns :

the scaling factor to be applied to node node.

Since 3.5


visu_data_getNodeUserPosition ()

void                visu_data_getNodeUserPosition       (VisuData *data,
                                                         VisuNode *node,
                                                         float coord[3]);

This routine is equivalent to visu_data_getNodePosition() except that it's not applying internal box translation for non periodic directions.

data :

a VisuData object ;

node :

a VisuNode object ;

coord :

an array of 3 floating point values to store the position. [array fixed-size=3][out caller-allocates]

Since 3.7


visu_data_getTranslationStatus ()

gboolean            visu_data_getTranslationStatus      (VisuData *data);

When a translation is applied (even with a [0,0,0] vector), the nodes are shifted to be in the box. This routine returns the translation status of all nodes. If one of them is translated, then return value is TRUE.

data :

a VisuData object.

Returns :

if one of the nodes is shifted.

visu_data_getUserColor ()

gboolean            visu_data_getUserColor              (VisuData *data,
                                                         VisuElement *ele,
                                                         VisuNode *node,
                                                         float rgba[4]);

If a user defined color has been set (see visu_data_setColorFunc()), then call this method to obtain a color for the given node.

data :

a VisuData object ;

ele :

a VisuElement object ;

node :

a VisuNode object ;

rgba :

a location to store the color. [array fixed-size=4]

Returns :

TRUE if a user color has been defined.

Since 3.6


visu_data_getXYZtranslation ()

float *             visu_data_getXYZtranslation         (VisuData *data);

The nodes are rendered at thier coordinates plus a translation. This method allows to retrieve that translation.

data :

a VisuData object.

Returns :

a newly allocated array of 3 floats. It should be freed with a call to free() after use. [array fixed-size=3][transfer full]

visu_data_hasUserColorFunc ()

gboolean            visu_data_hasUserColorFunc          (VisuData *data);

Test the existence of a user defined colourisation function.

data :

a VisuData object.

Returns :

TRUE if a user color function has been defined with visu_data_setColorFunc().

Since 3.6


visu_data_new ()

VisuData *          visu_data_new                       (void);

This creates an empty VisuData object.

Returns :

a newly created VisuData object (its ref count is set to 1).

visu_data_new_withFiles ()

VisuData *          visu_data_new_withFiles             (const gchar **files);

This creates an empty VisuData object with filename set to be ready to be loaded.

files :

a list of names. [element-type filename][array zero-terminated=1]

Returns :

a newly created VisuData object (its ref count is set to 1).

Since 3.7


visu_data_removeAllFiles ()

void                visu_data_removeAllFiles            (VisuData *data);

This method is used to empty the list of known file from the given data.

data :

a VisuData object.

visu_data_removeTimeout ()

gboolean            visu_data_removeTimeout             (VisuData *data,
                                                         guint timeoutId);

This method is used to remove a timeout that has been associated to the given data (see visu_data_addTimeout()).

data :

a valid VisuData object ;

timeoutId :

a source id.

Returns :

TRUE if the source has been found and removed.

visu_data_reorder ()

gboolean            visu_data_reorder                   (VisuData *data,
                                                         VisuData *dataRef);

This routine modifies the node ordering of data using the order in dataRef. The association is done by nearest neigbours conditions.

data :

a VisuData object, to reorder.

dataRef :

a VisuData object, to take the order from.

Returns :

TRUE is the reordering is successfull (i.e. all nodes of data correspond to one of dataRef).

Since 3.6


visu_data_replicate ()

gboolean            visu_data_replicate                 (VisuData *data,
                                                         float extension[3]);

This routine will create (or remove) nodes to expand the initial box to the required size. An extension of 0 means no extension, i.e. the initial box. The extension is done symmetrically in each direction toward negative and positive direction.

To remove added nodes, see visu_data_restore().

data :

a VisuData object ;

extension :

three floating point values ;. [in][array fixed-size=3]

Returns :

TRUE if the redraw should be done.

visu_data_restore ()

gboolean            visu_data_restore                   (VisuData *data);

Remove all nodes that have been added by a visu_data_replicate() call.

data :

a VisuData object.

Returns :

TRUE if some nodes has been indeed removed.

visu_data_setChangeElementFlag ()

void                visu_data_setChangeElementFlag      (VisuData *data,
                                                         gboolean changeElement);

This method is mainly used by internal gears to set a flag. This flag control if the data object has the same VisuElement objects than the previously rendered one.

data :

a VisuData object ;

changeElement :

a boolean.

visu_data_setColorFunc ()

void                visu_data_setColorFunc              (VisuData *data,
                                                         VisuDataColorFunc func);

This is a little trick to colorized the nodes. It should not be used since it will probably be different in future release.

data :

a VisuData object ;

func :

a method that colorize the nodes. [scope call]

visu_data_setFileCommentary ()

void                visu_data_setFileCommentary         (VisuData *data,
                                                         gchar *commentary,
                                                         gint iSet);

This method is used to store a description of the given data. This string is copied and commentary can be freed. Before using this method, the number of possible node sets must have been defined using visu_data_setNSubset(), if not, only iSet == 0 is allowed.

data :

a VisuData object ;

commentary :

the message to be stored (null terminated) ;

iSet :

an integer.

visu_data_setISubset ()

void                visu_data_setISubset                (VisuData *data,
                                                         int iSet);

Change the current id of the set of data (ordered as in C, beginning at 0).

data :

a VisuData object ;

iSet :

an integer.

visu_data_setNSubset ()

void                visu_data_setNSubset                (VisuData *data,
                                                         int nSet);

Change the number of available sets of nodes for this VisuData. This has a side effect to delete all previously saved file commentaries (see visu_data_setFileCommentary()).

data :

a VisuData object ;

nSet :

an integer.

visu_data_setNewBasis ()

gboolean            visu_data_setNewBasis               (VisuData *data,
                                                         float matA[3][3],
                                                         float O[3]);

Change the basis set of data according to the new definition given by matA and O. Nodes outside the new box are killed. See also visu_data_setNewBasisFromNodes() for a convenient function using nodes as basis set definition.

data :

a VisuData object.

matA :

a basis set definition.

O :

the origin cartesian coordinates.

Returns :

TRUE if the new basis set is valid.

Since 3.6


visu_data_setNewBasisFromNodes ()

gboolean            visu_data_setNewBasisFromNodes      (VisuData *data,
                                                         guint nO,
                                                         guint nA,
                                                         guint nB,
                                                         guint nC);

Change the basis set by providing the new basis set from a list of nodes. See also visu_data_setNewBasis(). Nodes outside the new box are killed.

data :

a VisuData object.

nO :

the index of node as origin.

nA :

the index of node on X axis.

nB :

the index of node as Y axis.

nC :

the index of node as Z axis.

Returns :

TRUE if the new basis set is valid.

Since 3.6


visu_data_setNodeScalingFunc ()

void                visu_data_setNodeScalingFunc        (VisuData *data,
                                                         VisuDataScalingFunc scaling);

Change the scaling routine when nodes are drawn.

data :

a VisuData object ;

scaling :

a scaling routine. [scope call]

Since 3.5


visu_data_setTightBox ()

VisuBox *           visu_data_setTightBox               (VisuData *data);

Calculate the box geometry to have a tight box in directions that are not periodic. If some directions are still periodic, the box size in these directions should be setup first with visu_box_setGeometry().

data :

a VisuData object.

Returns :

a new VisuBox if data had not one before, or the modified box of data. [transfer none]

visu_data_setXYZtranslation ()

gboolean            visu_data_setXYZtranslation         (VisuData *data,
                                                         float xyz[3]);

This set the translations of the specified VisuData whatever previous values. The translation is done in the orthonormal referential, not the referential of the box.

data :

a VisuData object ;

xyz :

an array of floating point values. [in][array fixed-size=3]

Returns :

if returns TRUE, the VisuNodeArray::PositionChanged signal should be emitted.

Property Details

The "totalEnergy" property

  "totalEnergy"              gdouble               : Read / Write / Construct

Total energy of the system (eV).

Allowed values: [-G_MAXFLOAT,G_MAXFLOAT]

Default value: 3.40282e+38

Signal Details

The "FilesChanged" signal

void                user_function                      (VisuData *dataObj,
                                                        guint     arg1,
                                                        gpointer  user_data)      : No Hooks

Gets emitted when one file of dataObj is set.

dataObj :

the object which received the signal ;

user_data :

user data set when the signal handler was connected.

Since 3.7


The "TranslationsChanged" signal

void                user_function                      (VisuData *dataObj,
                                                        gpointer  user_data)      : No Hooks

Gets emitted when translations are changed. At that point, node coordinates are all different, but to update on node positions, it's better to listen to VisuNodeArray::PositionChanged.

dataObj :

the object which received the signal ;

user_data :

user data set when the signal handler was connected.

Since 3.7


The "objectFreed" signal

void                user_function                      (VisuData *dataObj,
                                                        gpointer  user_data)      : No Hooks

Gets emitted when the object is been destroyed. All external objects having a reference on this VisuData should clean it.

dataObj :

the object which received the signal ;

user_data :

user data set when the signal handler was connected.

Since 3.3