![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#define VISU_RENDERING_SPIN_MAX_MODULUS_ID #define VISU_RENDERING_SPIN_NAME #define VISU_RENDERING_SPIN_VALUES_ID VisuRenderingSpin; VisuRenderingSpinClass; enum VisuRenderingSpinDrawingPolicy; enum VisuRenderingSpinFileType; enum VisuRenderingSpinModulusPolicy; enum VisuRenderingSpinResources; enum VisuRenderingSpinShapeId; VisuRenderingSpinDrawingPolicy visu_rendering_spin_getHidingPolicyFromName (const char *name
); const char * visu_rendering_spin_getHidingPolicyName (VisuRenderingSpinDrawingPolicy n
); const char * visu_rendering_spin_getHidingPolicyNameI18n (VisuRenderingSpinDrawingPolicy n
); void visu_rendering_spin_getResource (VisuElement *ele
,VisuRenderingSpinResources property
,GValue *val
); gboolean visu_rendering_spin_getResourceBoolean (VisuElement *ele
,VisuRenderingSpinResources property
); gfloat visu_rendering_spin_getResourceFloat (VisuElement *ele
,VisuRenderingSpinResources property
); guint visu_rendering_spin_getResourceUint (VisuElement *ele
,VisuRenderingSpinResources property
); const char * visu_rendering_spin_getShapeNameI18n (VisuRenderingSpinShapeId n
); VisuRenderingSpin * visu_rendering_spin_new (); gboolean visu_rendering_spin_setResource (VisuElement *ele
,VisuRenderingSpinResources property
,GValue *val
); gboolean visu_rendering_spin_setResourceBoolean (VisuElement *ele
,VisuRenderingSpinResources property
,gboolean value
); gboolean visu_rendering_spin_setResourceFloat (VisuElement *ele
,VisuRenderingSpinResources property
,gfloat value
); gboolean visu_rendering_spin_setResourceUint (VisuElement *ele
,VisuRenderingSpinResources property
,guint value
);
"cone-omega" gfloat : Read / Write "cone-phi" gfloat : Read / Write "cone-theta" gfloat : Read / Write "hiding-mode" guint : Read / Write "modulus-scaling" guint : Read / Write "use-atomic" gboolean : Read / Write
This method draws arrows to represent atoms. Each arrow has a given orientation which is set acording to parameters. This is one way to represent the spin of an atom. These arrows direction are determined by the spin of each atom. It is designed to read two separate files : one containing the position of the atoms, the other containing the spin of each atom. Of course these two files need to have the exact same number of atoms and also need to sort atoms in the same order.
#define VISU_RENDERING_SPIN_MAX_MODULUS_ID "spinRendering_maxModulus"
This flag should be used when creating a new spin rendering method
as the flag for the max modulus values as a VisuNode property (see
visu_node_array_property_newPointer()
).
#define VISU_RENDERING_SPIN_NAME "Spin visualisation"
Public name of the spin rendering mode.
#define VISU_RENDERING_SPIN_VALUES_ID "spinRendering_values"
This flag should be used when creating a new spin rendering method
as the flag for the spin values as node properties (see
visu_node_array_property_newPointer()
).
typedef struct _VisuRenderingSpinClass VisuRenderingSpinClass;
An opaque structure.
typedef enum { VISU_RENDERING_SPIN_ALWAYS, VISU_RENDERING_SPIN_HIDE_NULL, VISU_RENDERING_SPIN_ATOMIC_NULL, VISU_RENDERING_SPIN_N_MODES } VisuRenderingSpinDrawingPolicy;
Different policy to render the spin when the modulus is null. This policy is applied for all VisuElement.
typedef enum { FILE_KIND_POSITION, FILE_KIND_SPIN } VisuRenderingSpinFileType;
These are keys for the storing of spin files in a VisuData object.
typedef enum { VISU_RENDERING_SPIN_CONSTANT, VISU_RENDERING_SPIN_PER_TYPE, VISU_RENDERING_SPIN_GLOBAL, VISU_RENDERING_SPIN_N_MODULUS_MODES } VisuRenderingSpinModulusPolicy;
Different policy to render the spin depending on the modulus.
typedef enum { VISU_RENDERING_SPIN_HAT_LENGTH, spin_VISU_RENDERING_SPIN_TAIL_LENGTH, VISU_RENDERING_SPIN_HAT_RADIUS, VISU_RENDERING_SPIN_TAIL_RADIUS, VISU_RENDERING_SPIN_HAT_COLOR, VISU_RENDERING_SPIN_TAIL_COLOR, VISU_RENDERING_SPIN_A_AXIS, VISU_RENDERING_SPIN_B_AXIS, VISU_RENDERING_SPIN_ELIPSOID_COLOR, VISU_RENDERING_SPIN_SHAPE, VISU_RENDERING_SPIN_N_RESOURCES } VisuRenderingSpinResources;
These are resources defined for each element. They can be accessed with
visu_rendering_spin_getResource()
or visu_rendering_spin_getResourceBoolean()
and other
methods of the same kind.
the length of the pointing element ; | |
the length of the tail ; | |
the raidus of the pointing element ; | |
the radius of the tail ; | |
if TRUE, the pointing part use the color of the element ; | |
if TRUE, the tail uses the color of the element ; | |
the size of the A axis (elipsoid shape) ; | |
the size of the B axis (elipsoid shape) ; | |
if TRUE, the elipsoid uses the color of the element ; | |
an id to defined the shape (rounded arrow, elipsoid...) ; | |
number of resources per element. |
typedef enum { VISU_RENDERING_SPIN_ARROW_SMOOTH, VISU_RENDERING_SPIN_ARROW_SHARP, VISU_RENDERING_SPIN_ELLIPSOID, VISU_RENDERING_SPIN_TORUS, } VisuRenderingSpinShapeId;
An identifier for the different shapes to draw elements.
the shape is smooth and rounded ; | |
the shape is built on squares ; | |
the shape is an ellipsoid ; | |
the shape is a torus (direction of the arrow is normal to the torus plane). | |
private. |
VisuRenderingSpinDrawingPolicy visu_rendering_spin_getHidingPolicyFromName
(const char *name
);
In the config file, the hiding policy resource is stored with its name (untranslated). This method is used to retrieve the id from the name.
|
a string. [type filename] |
Returns : |
the maximum value if the name is invalid. |
const char * visu_rendering_spin_getHidingPolicyName
(VisuRenderingSpinDrawingPolicy n
);
Transform ids to untranslated names.
|
an id for hiding policy. |
Returns : |
the name associated to the id. [type filename] |
const char * visu_rendering_spin_getHidingPolicyNameI18n
(VisuRenderingSpinDrawingPolicy n
);
Transform ids to translated names.
|
an id for hiding policy. |
Returns : |
the name associated to the id in UTF-8. [type utf8] |
void visu_rendering_spin_getResource (VisuElement *ele
,VisuRenderingSpinResources property
,GValue *val
);
This is a generic method to access resources per element. Use
visu_rendering_spin_setResourceBoolean()
is favored if the type of
the value is known (boolean in this exemple).
|
a pointer to a VisuElement object ; |
|
the id of the resource (see VisuRenderingSpinResources); |
|
a location to store the value. [out caller-allocates] |
Since 3.7
gboolean visu_rendering_spin_getResourceBoolean (VisuElement *ele
,VisuRenderingSpinResources property
);
This is the specific method to retrieve value of boolean element resources.
|
a pointer to a VisuElement object ; |
|
the id of the property to get. |
Returns : |
the boolean value. |
gfloat visu_rendering_spin_getResourceFloat (VisuElement *ele
,VisuRenderingSpinResources property
);
This is the specific method to retrieve value of floating point element resources.
|
a pointer to a VisuElement object ; |
|
the id of the property to get. |
Returns : |
the floating point value. |
guint visu_rendering_spin_getResourceUint (VisuElement *ele
,VisuRenderingSpinResources property
);
This is the specific method to retrieve value of guint element resources.
|
a pointer to a VisuElement object ; |
|
the id of the property to get. |
Returns : |
the guint value. |
const char * visu_rendering_spin_getShapeNameI18n
(VisuRenderingSpinShapeId n
);
This routine returnes the translated name in UTF-8 corresponding to the given shape id.
|
an id for spin shape. |
Returns : |
a string owned by V_Sim. [type utf8] |
VisuRenderingSpin * visu_rendering_spin_new ();
Create the structure and initialise its values.
Returns : |
a newly allocate VisuRenderingSpin object. |
Since 3.6
gboolean visu_rendering_spin_setResource (VisuElement *ele
,VisuRenderingSpinResources property
,GValue *val
);
The spin rendering method has properties stored for each
element. Use this method to change the value of property
for ele
.
|
a VisuElement object. |
|
an id for element property. |
|
the value. |
Returns : |
TRUE if value is indeed changed. |
Since 3.7
gboolean visu_rendering_spin_setResourceBoolean (VisuElement *ele
,VisuRenderingSpinResources property
,gboolean value
);
This method is used to change element resources that are boolean.
|
a pointer to a VisuElement object ; |
|
the id of the property to set ; |
|
its value. |
Returns : |
TRUE if the value was changed. |
gboolean visu_rendering_spin_setResourceFloat (VisuElement *ele
,VisuRenderingSpinResources property
,gfloat value
);
This method is used to change element resources that are floating point.
|
a pointer to a VisuElement object ; |
|
the id of the property to set ; |
|
its value. |
Returns : |
TRUE if the value was changed. |
gboolean visu_rendering_spin_setResourceUint (VisuElement *ele
,VisuRenderingSpinResources property
,guint value
);
This method is used to change element resources that are guint.
|
a pointer to a VisuElement object ; |
|
the id of the property to set ; |
|
its value. |
Returns : |
TRUE if the value was changed. |
"cone-omega"
property"cone-omega" gfloat : Read / Write
The omega angle to orientate the colourisation cone.
Allowed values: [0,360]
Default value: 0
"cone-phi"
property"cone-phi" gfloat : Read / Write
The phi angle to orientate the colourisation cone.
Allowed values: [0,360]
Default value: 0
"cone-theta"
property"cone-theta" gfloat : Read / Write
The theta angle to orientate the colourisation cone.
Allowed values: [0,180]
Default value: 0
"hiding-mode"
property"hiding-mode" guint : Read / Write
The hiding policy for spin with a null modulus.
Allowed values: <= 3
Default value: 0
"modulus-scaling"
property"modulus-scaling" guint : Read / Write
The scaling policy based on modulus value.
Allowed values: <= 3
Default value: 0
"use-atomic"
property"use-atomic" gboolean : Read / Write
If atomic rendering is used in addition to spin rendering.
Default value: FALSE
"colorisationChange"
signalvoid user_function (VisuRenderingSpin *render,
gpointer user_data) : No Hooks
This signal is emitted whenever a change occur in the colourisation scheme of the spins.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
Since 3.6