![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define VISU_RENDERING_ATOMIC_FORCES #define VISU_RENDERING_ATOMIC_FORCES_ELE_MAX #define VISU_RENDERING_ATOMIC_NAME VisuRenderingAtomic; VisuRenderingAtomicClass; enum VisuRenderingAtomicShapeId; const char ** visu_rendering_atomic_getAllShapes (); const char ** visu_rendering_atomic_getAllShapesI18n (); float visu_rendering_atomic_getElipsoidPhi (VisuElement *ele
); float visu_rendering_atomic_getElipsoidRatio (VisuElement *ele
); float visu_rendering_atomic_getElipsoidTheta (VisuElement *ele
); float visu_rendering_atomic_getMaxForces (VisuData *dataObj
); float visu_rendering_atomic_getRadius (VisuElement *ele
); float visu_rendering_atomic_getRadiusDefault (); VisuRenderingAtomicShapeId visu_rendering_atomic_getShape (VisuElement *ele
); VisuRenderingAtomicShapeId visu_rendering_atomic_getShapeDefault (); const char * visu_rendering_atomic_getShapeName (VisuRenderingAtomicShapeId shape
); const char * visu_rendering_atomic_getShapeNameDefault (); VisuRenderingAtomic * visu_rendering_atomic_new (); gboolean visu_rendering_atomic_setElipsoidParameters (VisuElement *ele
,float ratio
,float phi
,float theta
); gboolean visu_rendering_atomic_setElipsoidPhi (VisuElement *ele
,float phi
); gboolean visu_rendering_atomic_setElipsoidRatio (VisuElement *ele
,float ratio
); gboolean visu_rendering_atomic_setElipsoidTheta (VisuElement *ele
,float theta
); void visu_rendering_atomic_setForces (VisuData *dataObj
,float *forces
); int visu_rendering_atomic_setRadius (VisuElement *ele
,float value
); int visu_rendering_atomic_setShape (VisuElement *ele
,VisuRenderingAtomicShapeId shape
); int visu_rendering_atomic_setShapeFromName (VisuElement *ele
,const char *shape
);
This the main part of a rendering method made to represent atomic positions. It draws either spheres or cubes depending of the elements properties. The radius (for the sphere) or the length of the sides of the cubes can be tuned.
#define VISU_RENDERING_ATOMIC_FORCES "forces_id"
Public name of the VisuNodeProperty used to store forces on atoms.
#define VISU_RENDERING_ATOMIC_FORCES_ELE_MAX "max_ele_forces_id"
Public name of the VisuNodeProperty used to store the max of forces per element.
#define VISU_RENDERING_ATOMIC_NAME "Atom visualisation"
Public name of the atomic rendering mode.
typedef struct _VisuRenderingAtomicClass VisuRenderingAtomicClass;
An opaque structure.
typedef enum { VISU_RENDERING_ATOMIC_SPHERE, VISU_RENDERING_ATOMIC_CUBE, VISU_RENDERING_ATOMIC_ELLIPSOID, VISU_RENDERING_ATOMIC_POINT, VISU_RENDERING_ATOMIC_TORUS, VISU_RENDERING_ATOMIC_N_SHAPES } VisuRenderingAtomicShapeId;
This enum is used as identifier for shapes managed by the attomic rendering method.
const char ** visu_rendering_atomic_getAllShapes ();
This methods retrieve the whole list of shape names used by V_Sim for example
in the resources file. These names are not translated. If internationalized
names are required, use visu_rendering_atomic_getAllShapesI18n()
instead.
Returns : |
a pointer to a list of shape names (should not be modified or freed). [transfer none][array zero-terminated=1][element-type filename] |
const char ** visu_rendering_atomic_getAllShapesI18n
();
This methods retrieve the whole list of shape names, translated strings.
Returns : |
a pointer to a list of shape names (should not be modified or freed). [transfer none][array zero-terminated=1][element-type utf8] |
float visu_rendering_atomic_getElipsoidPhi
(VisuElement *ele
);
Retrieve the phi angle parameter of the elipsoid shape for the element ele
.
|
a VisuElement object. |
Returns : |
the phi angle of the elipsoid. |
float visu_rendering_atomic_getElipsoidRatio
(VisuElement *ele
);
Retrieve the ratio parameter of the elipsoid shape for the element ele
.
|
a VisuElement object. |
Returns : |
the ratio of the elipsoid. |
float visu_rendering_atomic_getElipsoidTheta
(VisuElement *ele
);
Retrieve the theta angle parameter of the elipsoid shape for the element ele
.
|
a VisuElement object. |
Returns : |
the theta angle of the elipsoid. |
float visu_rendering_atomic_getMaxForces (VisuData *dataObj
);
If dataObj
has forces associated to (see
visu_rendering_atomic_setForces()
), this routine provides the
modulus of the biggest force.
|
a VisuData object. |
Returns : |
0 if no forces have been associated. |
Since 3.7
float visu_rendering_atomic_getRadius (VisuElement *ele
);
In the rendering atomic method, shapes are characterized by a radius. This method gets it for the specified element. If this element has no radius defined yet, the default value is associated and returned.
|
a VisuElement object. |
Returns : |
the radius of the specified element. A negative value if something goies wrong. |
float visu_rendering_atomic_getRadiusDefault
();
This method gets the default radius of the rendering atomic method.
Returns : |
the default value for radius resource. |
VisuRenderingAtomicShapeId visu_rendering_atomic_getShape
(VisuElement *ele
);
In the rendering atomic method, shapes are multiple. This method gets it for the specified element. Shapes are characterized by their id, corresponding to an integer value. Use the enum VisuRenderingAtomicShapeId to associate an integer value to a specific shape.
|
a VisuElement object. |
Returns : |
the shape id of the element ele . |
VisuRenderingAtomicShapeId visu_rendering_atomic_getShapeDefault ();
This method gets the default shape.
Returns : |
the default shape id. |
const char * visu_rendering_atomic_getShapeName (VisuRenderingAtomicShapeId shape
);
This method does the corresponding between a shape id and its name (a string value).
|
an integer. |
Returns : |
the name associated to a shape. |
const char * visu_rendering_atomic_getShapeNameDefault
();
This method is used to retrieve the default name for shapes.
Returns : |
the name associated to the default shape. |
VisuRenderingAtomic * visu_rendering_atomic_new ();
Create the structure and initialise its values.
Returns : |
a newly allocate VisuRenderingAtomic object. |
Since 3.6
gboolean visu_rendering_atomic_setElipsoidParameters (VisuElement *ele
,float ratio
,float phi
,float theta
);
Change the parameters for the elipsoid shape for the given ele
.
These parameters include a ratio
which is the ratio of the
long axis on the short one. Thus ratio
is always equal or greater than 1.
Arguments theta
and phi
are the direction of the long axis.
|
a VisuElement object ; |
|
a float ; |
|
a float ; |
|
a float. |
Returns : |
TRUE if visu_rendering_createElement() should be called. |
gboolean visu_rendering_atomic_setElipsoidPhi (VisuElement *ele
,float phi
);
Set the phi angle parameter of the elipsoid shape for the element ele
.
|
a VisuElement object. |
|
a float ; |
Returns : |
TRUE if visu_rendering_createElement() should be called. |
gboolean visu_rendering_atomic_setElipsoidRatio (VisuElement *ele
,float ratio
);
Set the ratio parameter of the elipsoid shape for the element ele
.
|
a VisuElement object. |
|
a float ; |
Returns : |
TRUE if visu_rendering_createElement() should be called. |
gboolean visu_rendering_atomic_setElipsoidTheta (VisuElement *ele
,float theta
);
Set the theta angle parameter of the elipsoid shape for the element ele
.
|
a VisuElement object. |
|
a float. |
Returns : |
TRUE if visu_rendering_createElement() should be called. |
void visu_rendering_atomic_setForces (VisuData *dataObj
,float *forces
);
Forces can be associated to nodes of dataObj
. The array forces
must
have the size of the number of nodes of dataObj
times three. Forces
are given in cartesian coordinates.
|
a VisuData object. |
|
an array of forces. [array] |
Since 3.7
int visu_rendering_atomic_setRadius (VisuElement *ele
,float value
);
This change the radius value of element ele
to value
.
|
a VisuElement object ; |
|
a positive floating point value. |
Returns : |
1 if a call to visu_rendering_createElement() is required, 0 if not. |
int visu_rendering_atomic_setShape (VisuElement *ele
,VisuRenderingAtomicShapeId shape
);
This changes the shape of the element ele
to the shape defined by its id.
|
a VisuElement object ; |
|
an integer. |
Returns : |
1 if a call to visu_rendering_createElement() is required, 0 if not. |
int visu_rendering_atomic_setShapeFromName (VisuElement *ele
,const char *shape
);
This method is equivalent to visu_rendering_atomic_setShape()
but the shape is
defined by its name.
|
a VisuElement object ; |
|
a string. |
Returns : |
1 if a call to visu_rendering_createElement() is required, 0 if not. |
"ForcesChanged"
signalvoid user_function (VisuRenderingAtomic *obj,
GObject *dataObj,
gpointer user_data) : No Recursion
Emitted each time forces are updated.
|
the object emitting the signal. |
|
the VisuData forces are applied on. |
|
user data set when the signal handler was connected. |
Since 3.7