1 /*   EXTRAITS DE LA LICENCE
2 	Copyright CEA, contributeurs : Luc BILLARD et Damien
3 	CALISTE, laboratoire L_Sim, (2001-2005)
4 
5 	Adresse mèl :
6 	BILLARD, non joignable par mèl ;
7 	CALISTE, damien P caliste AT cea P fr.
8 
9 	Ce logiciel est un programme informatique servant à visualiser des
10 	structures atomiques dans un rendu pseudo-3D.
11 
12 	Ce logiciel est régi par la licence CeCILL soumise au droit français et
13 	respectant les principes de diffusion des logiciels libres. Vous pouvez
14 	utiliser, modifier et/ou redistribuer ce programme sous les conditions
15 	de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
16 	sur le site "http://www.cecill.info".
17 
18 	Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
19 	pris connaissance de la licence CeCILL, et que vous en avez accepté les
20 	termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel).
21 */
22 
23 /*   LICENCE SUM UP
24 	Copyright CEA, contributors : Luc BILLARD et Damien
25 	CALISTE, laboratoire L_Sim, (2001-2005)
26 
27 	E-mail address:
28 	BILLARD, not reachable any more ;
29 	CALISTE, damien P caliste AT cea P fr.
30 
31 	This software is a computer program whose purpose is to visualize atomic
32 	configurations in 3D.
33 
34 	This software is governed by the CeCILL  license under French law and
35 	abiding by the rules of distribution of free software.  You can  use,
36 	modify and/ or redistribute the software under the terms of the CeCILL
37 	license as circulated by CEA, CNRS and INRIA at the following URL
38 	"http://www.cecill.info".
39 
40 	The fact that you are presently reading this means that you have had
41 	knowledge of the CeCILL license and that you accept its terms. You can
42 	find a copy of this licence shipped with this software at Documentation/licence.en.txt.
43 */
44 
45 #ifndef VIBRATION_H
46 #define VIBRATION_H
47 
48 #include <extraFunctions/vectorProp.h>
49 #include <visu_data.h>
50 
51 G_BEGIN_DECLS
52 
53 /**
54  * VISU_TYPE_VIBRATION:
55  *
56  * return the type of #VisuVibration.
57  */
58 #define VISU_TYPE_VIBRATION	     (visu_vibration_get_type ())
59 /**
60  * VISU_VIBRATION:
61  * @obj: a #GObject to cast.
62  *
63  * Cast the given @obj into #VisuVibration type.
64  */
65 #define VISU_VIBRATION(obj)	        (G_TYPE_CHECK_INSTANCE_CAST(obj, VISU_TYPE_VIBRATION, VisuVibration))
66 /**
67  * VISU_VIBRATION_CLASS:
68  * @klass: a #GObjectClass to cast.
69  *
70  * Cast the given @klass into #VisuVibrationClass.
71  */
72 #define VISU_VIBRATION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST(klass, VISU_TYPE_VIBRATION, VisuVibrationClass))
73 /**
74  * VISU_IS_VIBRATION:
75  * @obj: a #GObject to test.
76  *
77  * Test if the given @ogj is of the type of #VisuVibration object.
78  */
79 #define VISU_IS_VIBRATION(obj)    (G_TYPE_CHECK_INSTANCE_TYPE(obj, VISU_TYPE_VIBRATION))
80 /**
81  * VISU_IS_VIBRATION_CLASS:
82  * @klass: a #GObjectClass to test.
83  *
84  * Test if the given @klass is of the type of #VisuVibrationClass class.
85  */
86 #define VISU_IS_VIBRATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, VISU_TYPE_VIBRATION))
87 /**
88  * VISU_VIBRATION_GET_CLASS:
89  * @obj: a #GObject to get the class of.
90  *
91  * It returns the class of the given @obj.
92  */
93 #define VISU_VIBRATION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS(obj, VISU_TYPE_VIBRATION, VisuVibrationClass))
94 
95 /**
96  * VisuVibrationPrivate:
97  *
98  * Private data for #VisuVibration objects.
99  */
100 typedef struct _VisuVibrationPrivate VisuVibrationPrivate;
101 
102 /**
103  * VisuVibration:
104  *
105  * Common name to refer to a #_VisuVibration.
106  */
107 typedef struct _VisuVibration VisuVibration;
108 struct _VisuVibration
109 {
110   VisuNodeValuesVector parent;
111 
112   VisuVibrationPrivate *priv;
113 };
114 
115 /**
116  * VisuVibrationClass:
117  * @parent: private.
118  *
119  * Common name to refer to a #_VisuVibrationClass.
120  */
121 typedef struct _VisuVibrationClass VisuVibrationClass;
122 struct _VisuVibrationClass
123 {
124   VisuNodeValuesVectorClass parent;
125 };
126 
127 /**
128  * visu_vibration_get_type:
129  *
130  * This method returns the type of #VisuVibration, use
131  * VISU_TYPE_VIBRATION instead.
132  *
133  * Since: 3.7
134  *
135  * Returns: the type of #VisuVibration.
136  */
137 GType visu_vibration_get_type(void);
138 
139 VisuVibration* visu_vibration_new(VisuData *data, const gchar *label, guint n);
140 
141 gboolean visu_vibration_setDisplacements(VisuVibration *vib, guint iph,
142                                          const GArray *vibes, gboolean complex);
143 gboolean visu_vibration_setCurrentMode(VisuVibration *vib,
144                                        guint iph, GError **error);
145 
146 gboolean visu_vibration_setCharacteristic(VisuVibration *vib, guint iph,
147                                           const float q[3], float en, float omega);
148 gboolean visu_vibration_getCharacteristic(const VisuVibration *vib, guint iph,
149                                           float q[3], float *en, float *omega);
150 gboolean visu_vibration_setUserFrequency(VisuVibration *vib, float freq);
151 gboolean visu_vibration_setAmplitude(VisuVibration *vib, float ampl);
152 gboolean visu_vibration_setTime(VisuVibration *vib, gfloat at);
153 
154 void visu_vibration_resetPosition(VisuVibration *vib);
155 void visu_vibration_setZeroTime(VisuVibration *vib);
156 
157 guint visu_vibration_getNPhonons(VisuVibration *vib);
158 
159 void visu_vibration_animate(VisuVibration *vib);
160 
161 VisuVibration* visu_data_getVibration(VisuData *dataObj, guint nModes);
162 
163 G_END_DECLS
164 
165 #endif
166