vrpn  07.33
Virtual Reality Peripheral Network
vrpn_Sound.h
Go to the documentation of this file.
1 // vrpn_Sound.h
2 //
3 // April 12 2000 - ZK
4 
5 #ifndef VRPN_SOUND_H
6 
7 #include "vrpn_BaseClass.h" // for vrpn_BaseClass
8 #include "vrpn_Configure.h" // for VRPN_CALLBACK, VRPN_API
9 #include "vrpn_Shared.h" // for timeval
10 #include "vrpn_Text.h" // for vrpn_TEXTCB, etc
11 #include "vrpn_Types.h" // for vrpn_int32, vrpn_float64, etc
12 
14 struct vrpn_HANDLERPARAM;
15 
16 #define MAX_MATERIAL_NAME_LENGTH 128
17 #define MAX_NUMBER_SOUNDS 1024
18 #define MAX_NUMBER_MATERIALS 64
19 #define MAX_NUMBER_POLYGONS 2048
20 #define MAX_FILENAME_LENGTH 2048
21 
22 // everything is on order found in these structs!
23 
24 typedef vrpn_int32 vrpn_SoundID;
25 
26 typedef struct _vrpn_PoseDef {
27  vrpn_float64 position[3];
28  vrpn_float64 orientation[4];
30  {
31  position[0] = position[1] = position[2] = 0.0;
32  orientation[0] = orientation[1] = orientation[2] = 0.0;
33  orientation[3] = 1.0;
34  };
35 } vrpn_PoseDef;
36 
37 typedef struct _vrpn_SoundDef {
38  vrpn_PoseDef pose;
39  vrpn_float64 velocity[4];
40  vrpn_float64 max_front_dist;
41  vrpn_float64 min_front_dist;
42  vrpn_float64 max_back_dist;
43  vrpn_float64 min_back_dist;
44  vrpn_float64 cone_inner_angle;
45  vrpn_float64 cone_outer_angle;
46  vrpn_float64 cone_gain;
47  vrpn_float64 dopler_scale;
48  vrpn_float64 equalization_val;
49  vrpn_float64 pitch;
50  vrpn_float32 volume; // Jason Clark calls this volume, but really its gain!
52  : max_front_dist(0)
53  , min_front_dist(0)
54  , max_back_dist(0)
55  , min_back_dist(0)
56  , cone_inner_angle(0)
57  , cone_outer_angle(0)
58  , cone_gain(0)
59  , dopler_scale(0)
60  , equalization_val(0)
61  , pitch(0)
62  , volume(0){};
63 
64 } vrpn_SoundDef;
65 
66 typedef struct _vrpn_ListenerDef {
67  vrpn_PoseDef pose;
68  vrpn_float64 velocity[4];
69 } vrpn_ListenerDef;
70 
71 typedef struct _vrpn_MaterialDef {
73  vrpn_float64 transmittance_gain;
74  vrpn_float64 transmittance_highfreq;
75  vrpn_float64 reflectance_gain;
76  vrpn_float64 reflectance_highfreq;
77 } vrpn_MaterialDef;
78 
79 typedef struct _vrpn_QuadDef {
80  vrpn_int32 subQuad; // really a bool
81  vrpn_float64 openingFactor;
82  vrpn_int32 tag;
83  vrpn_float64 vertices[4][3];
85 } vrpn_QuadDef;
86 
87 typedef struct _vrpn_TriDef {
88  vrpn_int32 subTri;
89  vrpn_float64 openingFactor;
90  vrpn_int32 tag;
91  vrpn_float64 vertices[3][3];
93 } vrpn_TriDef;
94 
96 
97 public:
98  vrpn_Sound(const char *name, vrpn_Connection *c);
99  ~vrpn_Sound();
100 
101 protected:
102  vrpn_int32
103  load_sound_local; // ID of message to load a sound from server side
104  vrpn_int32
105  load_sound_remote; // ID of message to load a sound from client side
106  vrpn_int32 unload_sound; // ID of message to unload a sound
107  vrpn_int32 play_sound; // ID of message to play a sound
108  vrpn_int32 stop_sound; // ID of message to stop a sound
109  vrpn_int32
110  change_sound_status; // ID of message to change the sound's status
111  vrpn_int32
112  set_listener_pose; // ID of message to set the listener's pos/orient
113  vrpn_int32
114  set_listener_velocity; // ID of message to set the listener's velocity
115  vrpn_int32 set_sound_pose; //
116  vrpn_int32 set_sound_velocity; //
117  vrpn_int32 set_sound_distanceinfo; //
118  vrpn_int32 set_sound_coneinfo; //
119  vrpn_int32 set_sound_doplerfactor; //
120  vrpn_int32 set_sound_eqvalue; //
121  vrpn_int32 set_sound_pitch;
122  vrpn_int32 set_sound_volume; //
123 
124  vrpn_int32 load_model_local; // load model file from server side
125  vrpn_int32 load_model_remote; // load model file from client side
126  vrpn_int32 load_polyquad; // ID of message to load a quad polygon
127  vrpn_int32 load_polytri; // ID of message to load a tri polygon
128  vrpn_int32 load_material; // ID of message to load a material definition
132  vrpn_int32 set_poly_material;
133 
135 
136  struct timeval timestamp; // Current timestamp
137 
138  int register_types(void);
139 
140  /*All encodes and decodes functions are for the purpose of setting up
141  messages to be sent over the network properly (ie to put them in one
142  char buffer and to put them in proper network order and for getting
143  the messages back into a usable format once they have been received*/
144 
145  /*Note encodeSound allocates space dynamically for buf, it is your
146  responsibility to free it up*/
147  vrpn_int32 encodeSound_local(const char *filename, const vrpn_SoundID id,
148  const vrpn_SoundDef soundDef, char **buf);
149  /*Note decodeSound allocates space dynamically for filename, it is your
150  responsibility to free it up*/
151  vrpn_int32 decodeSound_local(const char *buf, char **filename,
152  vrpn_SoundID *id, vrpn_SoundDef *soundDef,
153  const int payload);
154 
155  // These two are not supported yet!
156  vrpn_int32 encodeSound_remote(const char *filename, const vrpn_SoundID id,
157  char **buf);
158  vrpn_int32 decodeSound_remote(const char *buf, char **filename,
159  vrpn_SoundID *id, const int payload);
160 
161  vrpn_int32 encodeSoundID(const vrpn_SoundID id, char *buf);
162  vrpn_int32 decodeSoundID(const char *buf, vrpn_SoundID *id);
163  vrpn_int32 encodeSoundDef(const vrpn_SoundDef sound, const vrpn_SoundID id,
164  const vrpn_int32 repeat, char *buf);
165  vrpn_int32 decodeSoundDef(const char *buf, vrpn_SoundDef *sound,
166  vrpn_SoundID *id, vrpn_int32 *repeat);
167  vrpn_int32 encodeSoundPlay(const vrpn_SoundID id, const vrpn_int32 repeat,
168  char *buf);
169  vrpn_int32 decodeSoundPlay(const char *buf, vrpn_SoundID *id,
170  vrpn_int32 *repeat);
171  vrpn_int32 encodeListenerVelocity(const vrpn_float64 *velocity, char *buf);
172  vrpn_int32 decodeListenerVelocity(const char *buf, vrpn_float64 *velocity);
173  vrpn_int32 encodeListenerPose(const vrpn_PoseDef pose, char *buf);
174  vrpn_int32 decodeListenerPose(const char *buf, vrpn_PoseDef *pose);
175 
176  vrpn_int32 encodeSoundPose(const vrpn_PoseDef pose, const vrpn_SoundID id,
177  char *buf);
178  vrpn_int32 decodeSoundPose(const char *buf, vrpn_PoseDef *pose,
179  vrpn_SoundID *id);
180  vrpn_int32 encodeSoundVelocity(const vrpn_float64 *velocity,
181  const vrpn_SoundID id, char *buf);
182  vrpn_int32 decodeSoundVelocity(const char *buf, vrpn_float64 *velocity,
183  vrpn_SoundID *id);
184  vrpn_int32 encodeSoundDistInfo(const vrpn_float64 min_back,
185  const vrpn_float64 max_back,
186  const vrpn_float64 min_front,
187  const vrpn_float64 max_front,
188  const vrpn_SoundID id, char *buf);
189  vrpn_int32 decodeSoundDistInfo(const char *buf, vrpn_float64 *min_back,
190  vrpn_float64 *max_back,
191  vrpn_float64 *min_front,
192  vrpn_float64 *max_front, vrpn_SoundID *id);
193  vrpn_int32 encodeSoundConeInfo(const vrpn_float64 cone_inner_angle,
194  const vrpn_float64 cone_outer_angle,
195  const vrpn_float64 cone_gain,
196  const vrpn_SoundID id, char *buf);
197  vrpn_int32 decodeSoundConeInfo(const char *buf,
198  vrpn_float64 *cone_inner_angle,
199  vrpn_float64 *cone_outer_angle,
200  vrpn_float64 *cone_gain, vrpn_SoundID *id);
201  vrpn_int32 encodeSoundDoplerScale(const vrpn_float64 doplerfactor,
202  const vrpn_SoundID id, char *buf);
203  vrpn_int32 decodeSoundDoplerScale(const char *buf,
204  vrpn_float64 *doplerfactor,
205  vrpn_SoundID *id);
206  vrpn_int32 encodeSoundEqFactor(const vrpn_float64 eqfactor,
207  const vrpn_SoundID id, char *buf);
208  vrpn_int32 decodeSoundEqFactor(const char *buf, vrpn_float64 *eqfactor,
209  vrpn_SoundID *id);
210  vrpn_int32 encodeSoundPitch(const vrpn_float64 pitch, const vrpn_SoundID id,
211  char *buf);
212  vrpn_int32 decodeSoundPitch(const char *buf, vrpn_float64 *pitch,
213  vrpn_SoundID *id);
214  vrpn_int32 encodeSoundVolume(const vrpn_float64 volume,
215  const vrpn_SoundID id, char *buf);
216  vrpn_int32 decodeSoundVolume(const char *buf, vrpn_float64 *volume,
217  vrpn_SoundID *id);
218 
219  vrpn_int32 encodeLoadModel_local(const char *filename, char **buf);
220  vrpn_int32 decodeLoadModel_local(const char *buf, char **filename,
221  const int payload);
222 
223  // Remote stuff not supported yet!
224  vrpn_int32 encodeLoadModel_remote(const char *filename, char **buf);
225  vrpn_int32 decodeLoadModel_remote(const char *buf, char **filename,
226  const int payload);
227 
228  vrpn_int32 encodeLoadPolyQuad(const vrpn_QuadDef quad, char *buf);
229  vrpn_int32 decodeLoadPolyQuad(const char *buf, vrpn_QuadDef *quad);
230  vrpn_int32 encodeLoadPolyTri(const vrpn_TriDef tri, char *buf);
231  vrpn_int32 decodeLoadPolyTri(const char *buf, vrpn_TriDef *tri);
232  vrpn_int32 encodeLoadMaterial(const vrpn_int32 id,
233  const vrpn_MaterialDef material, char *buf);
234  vrpn_int32 decodeLoadMaterial(const char *buf, vrpn_MaterialDef *material,
235  vrpn_int32 *id);
236  vrpn_int32 encodeSetQuadVert(const vrpn_float64 vertices[4][3],
237  const vrpn_int32 tag, char *buf);
238  vrpn_int32 decodeSetQuadVert(const char *buf,
239  vrpn_float64 (*vertices)[4][3],
240  vrpn_int32 *tag);
241  vrpn_int32 encodeSetTriVert(const vrpn_float64 vertices[3][3],
242  const vrpn_int32 tag, char *buf);
243  vrpn_int32 decodeSetTriVert(const char *buf, vrpn_float64 (*vertices)[3][3],
244  vrpn_int32 *tag);
245  vrpn_int32 encodeSetPolyOF(const vrpn_float64 openingfactor,
246  const vrpn_int32 tag, char *buf);
247  vrpn_int32 decodeSetPolyOF(const char *buf, vrpn_float64 *openingfactor,
248  vrpn_int32 *tag);
249  vrpn_int32 encodeSetPolyMaterial(const char *material, const vrpn_int32 tag,
250  char *buf);
251  vrpn_int32 decodeSetPolyMaterial(const char *buf, char **material,
252  vrpn_int32 *tag, const int payload);
253 };
254 
256  public vrpn_Text_Receiver {
257 public:
258  vrpn_Sound_Client(const char *name, vrpn_Connection *c);
260 
261  // This command starts a sound playing, the repeat value indicates how
262  // many times to play it. Continuously if repeat is set to 0
263  vrpn_int32 playSound(const vrpn_SoundID id, vrpn_int32 repeat);
264  vrpn_int32 stopSound(const vrpn_SoundID id);
265  // Loads a sound into memory on the server side, returns the ID value to be
266  // used to refer to the sound from now on. Pass in the path and filename
267  vrpn_SoundID loadSound(const char *sound, const vrpn_SoundID id,
268  const vrpn_SoundDef soundDef);
269  vrpn_int32 unloadSound(const vrpn_SoundID id);
270 
271  // All the functions with change and sound in them, can change either an
272  // already playing sound or one yet to be played
273  vrpn_int32 setSoundVolume(const vrpn_SoundID id, const vrpn_float64 volume);
274  vrpn_int32 setSoundPose(const vrpn_SoundID id, vrpn_float64 position[3],
275  vrpn_float64 orientation[4]);
276  vrpn_int32 setSoundVelocity(const vrpn_SoundID id,
277  const vrpn_float64 velocity[4]);
278  vrpn_int32 setSoundDistances(const vrpn_SoundID id,
279  const vrpn_float64 max_front_dist,
280  const vrpn_float64 min_front_dist,
281  const vrpn_float64 max_back_dist,
282  const vrpn_float64 min_back_dist);
283  vrpn_int32 setSoundConeInfo(const vrpn_SoundID id,
284  const vrpn_float64 inner_angle,
285  const vrpn_float64 outer_angle,
286  const vrpn_float64 gain);
287 
288  vrpn_int32 setSoundDopScale(const vrpn_SoundID id, vrpn_float64 dopfactor);
289  vrpn_int32 setSoundEqValue(const vrpn_SoundID id, vrpn_float64 eq_value);
290  vrpn_int32 setSoundPitch(const vrpn_SoundID id, vrpn_float64 pitch);
291 
292  vrpn_int32 setListenerPose(const vrpn_float64 position[3],
293  const vrpn_float64 orientation[4]);
294  vrpn_int32 setListenerVelocity(const vrpn_float64 velocity[4]);
295 
296  vrpn_int32 LoadModel_local(const char *filename);
297 
298  // Remote stuff not supported yet!
299  vrpn_int32 LoadModel_remote(const char *data);
300 
301  vrpn_int32 LoadPolyQuad(const vrpn_QuadDef quad);
302  vrpn_int32 LoadPolyTri(const vrpn_TriDef tri);
303  vrpn_int32 LoadMaterial(const vrpn_int32 id,
304  const vrpn_MaterialDef material);
305 
306  vrpn_int32 setMaterialName(const int id, const char *materialname);
307  vrpn_int32 setMaterialTransGain(const int id,
308  const vrpn_float64 transmittance_gain);
309  vrpn_int32 setMaterialTransHF(const int id,
310  const vrpn_float64 transmittance_hf);
311  vrpn_int32 setMaterialReflGain(const int id,
312  const vrpn_float64 reflectance_gain);
313  vrpn_int32 setMaterialReflHF(const int id,
314  const vrpn_float64 reflectance_hf);
315 
316  vrpn_int32 setPolyOF(const int id, const vrpn_float64 OF);
317  vrpn_int32 setQuadVertices(const int id, const vrpn_float64 vertices[4][3]);
318  vrpn_int32 setPolyMaterialName(const int id, const char *materialname);
319 
320  vrpn_int32 setTriVertices(const int id, const vrpn_float64 vertices[3][3]);
321 
322  virtual void mainloop();
323 
324  virtual void receiveTextMessage(const char *message, vrpn_uint32 type,
325  vrpn_uint32 level, struct timeval msg_time);
326 
327 protected:
328 private:
329  static void VRPN_CALLBACK
330  handle_receiveTextMessage(void *userdata, const vrpn_TEXTCB t);
331 };
332 
333 /*Note on the server design
334  The server is designed in such a way that it expects a sub-class that is
335  implemented
336  that actually implements sound functionality to have certain functions that it
337  can
338  call to tell the child to play, load, whatever. This parent server class,
339  handles
340  all of the callback functionality and decoding, allowing child classes to only
341  have
342  to worry about sound functionality*/
343 #ifndef VRPN_CLIENT_ONLY
345 public:
346  vrpn_Sound_Server(const char *name, vrpn_Connection *c);
348 
349  virtual void playSound(vrpn_SoundID id, vrpn_int32 repeat,
350  vrpn_SoundDef soundDef) = 0;
351  virtual void loadSoundLocal(char *filename, vrpn_SoundID id,
352  vrpn_SoundDef soundDef) = 0;
353  virtual void loadSoundRemote(char *file, vrpn_SoundID id,
354  vrpn_SoundDef soundDef) = 0;
355  virtual void stopSound(vrpn_SoundID id) = 0;
356  virtual void unloadSound(vrpn_SoundID id) = 0;
357  virtual void changeSoundStatus(vrpn_SoundID id, vrpn_SoundDef soundDef) = 0;
358  virtual void setListenerPose(vrpn_PoseDef pose) = 0;
359  virtual void setListenerVelocity(vrpn_float64 *velocity) = 0;
360 
361  virtual void setSoundPose(vrpn_SoundID id, vrpn_PoseDef pose) = 0;
362  virtual void setSoundVelocity(vrpn_SoundID id, vrpn_float64 *velocity) = 0;
363  virtual void setSoundDistInfo(vrpn_SoundID id, vrpn_float64 *distinfo) = 0;
364  virtual void setSoundConeInfo(vrpn_SoundID id, vrpn_float64 *coneinfo) = 0;
365 
366  virtual void setSoundDoplerFactor(vrpn_SoundID id,
367  vrpn_float64 doplerfactor) = 0;
368  virtual void setSoundEqValue(vrpn_SoundID id, vrpn_float64 eqvalue) = 0;
369  virtual void setSoundPitch(vrpn_SoundID id, vrpn_float64 pitch) = 0;
370  virtual void setSoundVolume(vrpn_SoundID id, vrpn_float64 volume) = 0;
371  virtual void loadModelLocal(const char *filename) = 0;
372  virtual void loadModelRemote() = 0; // not supported
373  virtual void loadPolyQuad(vrpn_QuadDef *quad) = 0;
374  virtual void loadPolyTri(vrpn_TriDef *tri) = 0;
375  virtual void loadMaterial(vrpn_MaterialDef *material, vrpn_int32 id) = 0;
376  virtual void setPolyQuadVertices(vrpn_float64 vertices[4][3],
377  const vrpn_int32 id) = 0;
378  virtual void setPolyTriVertices(vrpn_float64 vertices[3][3],
379  const vrpn_int32 id) = 0;
380  virtual void setPolyOF(vrpn_float64 OF, vrpn_int32 tag) = 0;
381  virtual void setPolyMaterial(const char *material, vrpn_int32 tag) = 0;
382 
383 protected:
384 private:
385  static int VRPN_CALLBACK
386  handle_loadSoundLocal(void *userdata, vrpn_HANDLERPARAM p);
387  static int VRPN_CALLBACK
388  handle_loadSoundRemote(void *userdata, vrpn_HANDLERPARAM p);
389  static int VRPN_CALLBACK
390  handle_unloadSound(void *userdata, vrpn_HANDLERPARAM p);
391  static int VRPN_CALLBACK
392  handle_playSound(void *userdata, vrpn_HANDLERPARAM p);
393  static int VRPN_CALLBACK
394  handle_stopSound(void *userdata, vrpn_HANDLERPARAM p);
395  static int VRPN_CALLBACK
396  handle_changeSoundStatus(void *userdata, vrpn_HANDLERPARAM p);
397  static int VRPN_CALLBACK
398  handle_setListenerPose(void *userdata, vrpn_HANDLERPARAM p);
399  static int VRPN_CALLBACK
400  handle_setListenerVelocity(void *userdata, vrpn_HANDLERPARAM p);
401 
402  static int VRPN_CALLBACK
403  handle_setSoundPose(void *userdata, vrpn_HANDLERPARAM p);
404  static int VRPN_CALLBACK
405  handle_setSoundVelocity(void *userdata, vrpn_HANDLERPARAM p);
406  static int VRPN_CALLBACK
407  handle_setSoundDistanceinfo(void *userdata, vrpn_HANDLERPARAM p);
408  static int VRPN_CALLBACK
409  handle_setSoundConeinfo(void *userdata, vrpn_HANDLERPARAM p);
410 
411  static int VRPN_CALLBACK
412  handle_setSoundDoplerfactor(void *userdata, vrpn_HANDLERPARAM p);
413  static int VRPN_CALLBACK
414  handle_setSoundEqvalue(void *userdata, vrpn_HANDLERPARAM p);
415  static int VRPN_CALLBACK
416  handle_setSoundPitch(void *userdata, vrpn_HANDLERPARAM p);
417  static int VRPN_CALLBACK
418  handle_setSoundVolume(void *userdata, vrpn_HANDLERPARAM p);
419 
420  static int VRPN_CALLBACK
421  handle_loadModelLocal(void *userdata, vrpn_HANDLERPARAM p);
422  static int VRPN_CALLBACK
423  handle_loadModelRemote(void *userdata, vrpn_HANDLERPARAM p);
424  static int VRPN_CALLBACK
425  handle_loadPolyquad(void *userdata, vrpn_HANDLERPARAM p);
426  static int VRPN_CALLBACK
427  handle_loadPolytri(void *userdata, vrpn_HANDLERPARAM p);
428  static int VRPN_CALLBACK
429  handle_loadMaterial(void *userdata, vrpn_HANDLERPARAM p);
430  static int VRPN_CALLBACK
431  handle_setPolyquadVertices(void *userdata, vrpn_HANDLERPARAM p);
432  static int VRPN_CALLBACK
433  handle_setPolytriVertices(void *userdata, vrpn_HANDLERPARAM p);
434  static int VRPN_CALLBACK
435  handle_setPolyOpeningfactor(void *userdata, vrpn_HANDLERPARAM p);
436  static int VRPN_CALLBACK
437  handle_setPolyMaterial(void *userdata, vrpn_HANDLERPARAM p);
438 };
439 #endif //#ifndef VRPN_CLIENT_ONLY
440 
441 #define VRPN_SOUND_H
442 #endif
_vrpn_SoundDef::max_front_dist
vrpn_float64 max_front_dist
Definition: vrpn_Sound.h:40
vrpn_Sound::load_material
vrpn_int32 load_material
Definition: vrpn_Sound.h:128
_vrpn_TriDef::openingFactor
vrpn_float64 openingFactor
Definition: vrpn_Sound.h:89
_vrpn_SoundDef::equalization_val
vrpn_float64 equalization_val
Definition: vrpn_Sound.h:48
_vrpn_PoseDef::position
vrpn_float64 position[3]
Definition: vrpn_Sound.h:27
vrpn_BaseClass.h
_vrpn_TriDef
Definition: vrpn_Sound.h:87
_vrpn_SoundDef::_vrpn_SoundDef
_vrpn_SoundDef()
Definition: vrpn_Sound.h:51
_vrpn_PoseDef
Definition: vrpn_Sound.h:26
vrpn_Sound::load_model_local
vrpn_int32 load_model_local
Definition: vrpn_Sound.h:124
vrpn_Sound::set_listener_pose
vrpn_int32 set_listener_pose
Definition: vrpn_Sound.h:112
_vrpn_SoundDef::dopler_scale
vrpn_float64 dopler_scale
Definition: vrpn_Sound.h:47
vrpn_Sound::set_sound_doplerfactor
vrpn_int32 set_sound_doplerfactor
Definition: vrpn_Sound.h:119
_vrpn_PoseDef::_vrpn_PoseDef
_vrpn_PoseDef()
Definition: vrpn_Sound.h:29
vrpn_Types.h
_vrpn_SoundDef::volume
vrpn_float32 volume
Definition: vrpn_Sound.h:50
_vrpn_SoundDef::pitch
vrpn_float64 pitch
Definition: vrpn_Sound.h:49
_vrpn_SoundDef::velocity
vrpn_float64 velocity[4]
Definition: vrpn_Sound.h:39
_vrpn_TriDef::material_name
char material_name[MAX_MATERIAL_NAME_LENGTH]
Definition: vrpn_Sound.h:92
vrpn_Text_Receiver
Allows a user to handle text messages directly, in addition too having the.
Definition: vrpn_Text.h:68
_vrpn_QuadDef
Definition: vrpn_Sound.h:79
vrpn_Text_Sender
Allows a user to send text messages from a device (usually,.
Definition: vrpn_Text.h:39
_vrpn_PoseDef::orientation
vrpn_float64 orientation[4]
Definition: vrpn_Sound.h:28
vrpn_Sound::play_sound
vrpn_int32 play_sound
Definition: vrpn_Sound.h:107
_vrpn_SoundDef::min_front_dist
vrpn_float64 min_front_dist
Definition: vrpn_Sound.h:41
_vrpn_SoundDef::pose
vrpn_PoseDef pose
Definition: vrpn_Sound.h:38
_vrpn_SoundDef::min_back_dist
vrpn_float64 min_back_dist
Definition: vrpn_Sound.h:43
vrpn_Sound::load_sound_local
vrpn_int32 load_sound_local
Definition: vrpn_Sound.h:103
_vrpn_QuadDef::subQuad
vrpn_int32 subQuad
Definition: vrpn_Sound.h:80
_vrpn_MaterialDef::material_name
char material_name[MAX_MATERIAL_NAME_LENGTH]
Definition: vrpn_Sound.h:72
_vrpn_QuadDef::material_name
char material_name[MAX_MATERIAL_NAME_LENGTH]
Definition: vrpn_Sound.h:84
_vrpn_MaterialDef::transmittance_highfreq
vrpn_float64 transmittance_highfreq
Definition: vrpn_Sound.h:74
_vrpn_SoundDef::cone_outer_angle
vrpn_float64 cone_outer_angle
Definition: vrpn_Sound.h:45
vrpn_HANDLERPARAM
This structure is what is passed to a vrpn_Connection message callback.
Definition: vrpn_Connection.h:44
vrpn_Shared.h
vrpn_Sound::unload_sound
vrpn_int32 unload_sound
Definition: vrpn_Sound.h:106
vrpn_Sound::set_polyquad_vertices
vrpn_int32 set_polyquad_vertices
Definition: vrpn_Sound.h:129
_vrpn_SoundDef::max_back_dist
vrpn_float64 max_back_dist
Definition: vrpn_Sound.h:42
vrpn_Sound::set_sound_pose
vrpn_int32 set_sound_pose
Definition: vrpn_Sound.h:115
_vrpn_ListenerDef
Definition: vrpn_Sound.h:66
vrpn_Sound::set_sound_eqvalue
vrpn_int32 set_sound_eqvalue
Definition: vrpn_Sound.h:120
vrpn_Sound::load_polyquad
vrpn_int32 load_polyquad
Definition: vrpn_Sound.h:126
vrpn_SoundID
vrpn_int32 vrpn_SoundID
Definition: vrpn_Sound.h:24
vrpn_Sound::set_sound_distanceinfo
vrpn_int32 set_sound_distanceinfo
Definition: vrpn_Sound.h:117
vrpn_BaseClass::mainloop
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
_vrpn_SoundDef::cone_gain
vrpn_float64 cone_gain
Definition: vrpn_Sound.h:46
_vrpn_SoundDef
Definition: vrpn_Sound.h:37
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition: vrpn_Connection.h:510
_vrpn_ListenerDef::pose
vrpn_PoseDef pose
Definition: vrpn_Sound.h:67
vrpn_Sound::set_sound_velocity
vrpn_int32 set_sound_velocity
Definition: vrpn_Sound.h:116
_vrpn_QuadDef::openingFactor
vrpn_float64 openingFactor
Definition: vrpn_Sound.h:81
_vrpn_TriDef::tag
vrpn_int32 tag
Definition: vrpn_Sound.h:90
vrpn_Sound::set_sound_volume
vrpn_int32 set_sound_volume
Definition: vrpn_Sound.h:122
vrpn_Sound::set_sound_coneinfo
vrpn_int32 set_sound_coneinfo
Definition: vrpn_Sound.h:118
vrpn_BaseClass::register_types
virtual int register_types(void)=0
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.
vrpn_Text.h
_vrpn_ListenerDef::velocity
vrpn_float64 velocity[4]
Definition: vrpn_Sound.h:68
VRPN_CALLBACK
#define VRPN_CALLBACK
Definition: vrpn_Configure.h:647
_vrpn_TriDef::subTri
vrpn_int32 subTri
Definition: vrpn_Sound.h:88
vrpn_Sound::load_model_remote
vrpn_int32 load_model_remote
Definition: vrpn_Sound.h:125
vrpn_Sound_Client
Definition: vrpn_Sound.h:255
_vrpn_SoundDef::cone_inner_angle
vrpn_float64 cone_inner_angle
Definition: vrpn_Sound.h:44
MAX_MATERIAL_NAME_LENGTH
#define MAX_MATERIAL_NAME_LENGTH
Definition: vrpn_Sound.h:16
vrpn_Sound::set_listener_velocity
vrpn_int32 set_listener_velocity
Definition: vrpn_Sound.h:114
_vrpn_MaterialDef
Definition: vrpn_Sound.h:71
_vrpn_TriDef::vertices
vrpn_float64 vertices[3][3]
Definition: vrpn_Sound.h:91
vrpn_Sound::load_polytri
vrpn_int32 load_polytri
Definition: vrpn_Sound.h:127
vrpn_Sound::set_poly_material
vrpn_int32 set_poly_material
Definition: vrpn_Sound.h:132
vrpn_Sound::set_sound_pitch
vrpn_int32 set_sound_pitch
Definition: vrpn_Sound.h:121
vrpn_Sound::set_polytri_vertices
vrpn_int32 set_polytri_vertices
Definition: vrpn_Sound.h:130
vrpn_Sound::set_poly_openingfactor
vrpn_int32 set_poly_openingfactor
Definition: vrpn_Sound.h:131
vrpn_Configure.h
vrpn_Sound::change_sound_status
vrpn_int32 change_sound_status
Definition: vrpn_Sound.h:110
_vrpn_MaterialDef::transmittance_gain
vrpn_float64 transmittance_gain
Definition: vrpn_Sound.h:73
vrpn_Sound::receive_text_message
vrpn_int32 receive_text_message
Definition: vrpn_Sound.h:134
_vrpn_QuadDef::tag
vrpn_int32 tag
Definition: vrpn_Sound.h:82
vrpn_Sound::load_sound_remote
vrpn_int32 load_sound_remote
Definition: vrpn_Sound.h:105
vrpn_Sound
Definition: vrpn_Sound.h:95
VRPN_API
#define VRPN_API
Definition: vrpn_Configure.h:646
_vrpn_QuadDef::vertices
vrpn_float64 vertices[4][3]
Definition: vrpn_Sound.h:83
_vrpn_MaterialDef::reflectance_highfreq
vrpn_float64 reflectance_highfreq
Definition: vrpn_Sound.h:76
_vrpn_MaterialDef::reflectance_gain
vrpn_float64 reflectance_gain
Definition: vrpn_Sound.h:75
vrpn_BaseClass
Class from which all user-level (and other) classes that communicate with vrpn_Connections should der...
Definition: vrpn_BaseClass.h:313
vrpn_Sound::stop_sound
vrpn_int32 stop_sound
Definition: vrpn_Sound.h:108
vrpn_Sound_Server
Definition: vrpn_Sound.h:344