![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
enum VisuAtomicShapeId; #define VISU_RENDERING_ATOMIC_TYPE #define VISU_RENDERING_ATOMIC (obj) #define VISU_RENDERING_ATOMIC_CLASS (klass) #define IS_VISU_RENDERING_ATOMIC_TYPE (obj) #define IS_VISU_RENDERING_ATOMIC_CLASS (klass) #define VISU_RENDERING_ATOMIC_GET_CLASS (obj) GType visu_rendering_atomic_get_type (void
); #define VISU_RENDERING_ATOMIC_NAME VisuRenderingAtomicClass; VisuRenderingAtomic; VisuRenderingAtomic* visu_rendering_atomic_new (); float visu_renderingAtomic_getRadius (VisuElement *ele
); float visu_renderingAtomic_getRadiusDefault (); int visu_renderingAtomic_setRadius (VisuElement *ele
,float value
); VisuAtomicShapeId visu_renderingAtomic_getShape (VisuElement *ele
); VisuAtomicShapeId visu_renderingAtomic_getShapeDefault (); const char* visu_renderingAtomic_getShapeName (VisuAtomicShapeId shape
); const char* visu_renderingAtomic_getShapeNameDefault (); int visu_renderingAtomic_setShape (VisuElement *ele
,VisuAtomicShapeId shape
); int visu_renderingAtomic_setShapeFromName (VisuElement *ele
,const char *shape
); const char** visu_renderingAtomic_getAllShapes (); const char** visu_renderingAtomic_getAllShapesI18n (); gboolean visu_renderingAtomic_setElipsoidParameters (VisuElement *ele
,float ratio
,float phi
,float theta
); float visu_renderingAtomic_getElipsoidRatio (VisuElement *ele
); float visu_renderingAtomic_getElipsoidPhi (VisuElement *ele
); float visu_renderingAtomic_getElipsoidTheta (VisuElement *ele
); gboolean visu_renderingAtomic_setElipsoidRatio (VisuElement *ele
,float ratio
); gboolean visu_renderingAtomic_setElipsoidPhi (VisuElement *ele
,float phi
); gboolean visu_renderingAtomic_setElipsoidTheta (VisuElement *ele
,float theta
);
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.
typedef enum { VISU_RENDERING_ATOMIC_SPHERE, VISU_RENDERING_ATOMIC_CUBE, VISU_RENDERING_ATOMIC_ELLIPSOID, VISU_RENDERING_ATOMIC_POINT, VISU_RENDERING_ATOMIC_TORUS, nbAtomicShapes } VisuAtomicShapeId;
This enum is used as identifier for shapes managed by the attomic rendering method.
#define VISU_RENDERING_ATOMIC_TYPE (visu_rendering_atomic_get_type ())
return the type of VisuRenderingAtomic.
#define VISU_RENDERING_ATOMIC(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, VISU_RENDERING_ATOMIC_TYPE, VisuRenderingAtomic))
Cast the given obj
into VisuRenderingAtomic type.
|
a GObject to cast. |
#define VISU_RENDERING_ATOMIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, VISU_RENDERING_ATOMIC_TYPE, VisuRenderingAtomicClass))
Cast the given klass
into VisuRenderingAtomicClass.
|
a GObjectClass to cast. |
#define IS_VISU_RENDERING_ATOMIC_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, VISU_RENDERING_ATOMIC_TYPE))
Test if the given ogj
is of the type of VisuRenderingAtomic object.
|
a GObject to test. |
#define IS_VISU_RENDERING_ATOMIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, VISU_RENDERING_ATOMIC_TYPE))
Test if the given klass
is of the type of VisuRenderingAtomicClass class.
|
a GObjectClass to test. |
#define VISU_RENDERING_ATOMIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, VISU_RENDERING_ATOMIC_TYPE, VisuRenderingAtomicClass))
It returns the class of the given obj
.
|
a GObject to get the class of. |
GType visu_rendering_atomic_get_type (void
);
This method returns the type of VisuRenderingAtomic, use VISU_RENDERING_ATOMIC_TYPE instead.
Returns : |
the type of VisuRenderingAtomic. |
#define VISU_RENDERING_ATOMIC_NAME "Atom visualisation"
Public name of the atomic rendering mode.
typedef struct _VisuRenderingAtomicClass VisuRenderingAtomicClass;
An opaque structure.
VisuRenderingAtomic* visu_rendering_atomic_new ();
Create the structure and initialise its values.
Returns : |
a newly allocate VisuRenderingAtomic object. |
Since 3.6
float visu_renderingAtomic_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_renderingAtomic_getRadiusDefault
();
This method gets the default radius of the rendering atomic method.
Returns : |
the default value for radius resource. |
int visu_renderingAtomic_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.
|
VisuAtomicShapeId visu_renderingAtomic_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 VisuAtomicShapeId to associate an integer value to a specific shape.
|
a VisuElement object. |
Returns : |
the shape id of the element ele .
|
VisuAtomicShapeId visu_renderingAtomic_getShapeDefault ();
This method gets the default shape.
Returns : |
the default shape id. |
const char* visu_renderingAtomic_getShapeName (VisuAtomicShapeId 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_renderingAtomic_getShapeNameDefault
();
This method is used to retrieve the default name for shapes.
Returns : |
the name associated to the default shape. |
int visu_renderingAtomic_setShape (VisuElement *ele
,VisuAtomicShapeId 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_renderingAtomic_setShapeFromName (VisuElement *ele
,const char *shape
);
This method is equivalent to visu_renderingAtomic_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.
|
const char** visu_renderingAtomic_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_renderingAtomic_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_renderingAtomic_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. |
gboolean visu_renderingAtomic_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.
|
float visu_renderingAtomic_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_renderingAtomic_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_renderingAtomic_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. |
gboolean visu_renderingAtomic_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_renderingAtomic_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_renderingAtomic_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.
|