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
136 struct timeval timestamp;
147 vrpn_int32 encodeSound_local(
const char *filename,
const vrpn_SoundID id,
148 const vrpn_SoundDef soundDef,
char **buf);
151 vrpn_int32 decodeSound_local(
const char *buf,
char **filename,
156 vrpn_int32 encodeSound_remote(
const char *filename,
const vrpn_SoundID id,
158 vrpn_int32 decodeSound_remote(
const char *buf,
char **filename,
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,
167 vrpn_int32 encodeSoundPlay(
const vrpn_SoundID id,
const vrpn_int32 repeat,
169 vrpn_int32 decodeSoundPlay(
const char *buf,
vrpn_SoundID *
id,
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);
176 vrpn_int32 encodeSoundPose(
const vrpn_PoseDef pose,
const vrpn_SoundID id,
178 vrpn_int32 decodeSoundPose(
const char *buf, vrpn_PoseDef *pose,
180 vrpn_int32 encodeSoundVelocity(
const vrpn_float64 *velocity,
182 vrpn_int32 decodeSoundVelocity(
const char *buf, vrpn_float64 *velocity,
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,
189 vrpn_int32 decodeSoundDistInfo(
const char *buf, vrpn_float64 *min_back,
190 vrpn_float64 *max_back,
191 vrpn_float64 *min_front,
193 vrpn_int32 encodeSoundConeInfo(
const vrpn_float64 cone_inner_angle,
194 const vrpn_float64 cone_outer_angle,
195 const vrpn_float64 cone_gain,
197 vrpn_int32 decodeSoundConeInfo(
const char *buf,
198 vrpn_float64 *cone_inner_angle,
199 vrpn_float64 *cone_outer_angle,
201 vrpn_int32 encodeSoundDoplerScale(
const vrpn_float64 doplerfactor,
203 vrpn_int32 decodeSoundDoplerScale(
const char *buf,
204 vrpn_float64 *doplerfactor,
206 vrpn_int32 encodeSoundEqFactor(
const vrpn_float64 eqfactor,
208 vrpn_int32 decodeSoundEqFactor(
const char *buf, vrpn_float64 *eqfactor,
210 vrpn_int32 encodeSoundPitch(
const vrpn_float64 pitch,
const vrpn_SoundID id,
212 vrpn_int32 decodeSoundPitch(
const char *buf, vrpn_float64 *pitch,
214 vrpn_int32 encodeSoundVolume(
const vrpn_float64 volume,
216 vrpn_int32 decodeSoundVolume(
const char *buf, vrpn_float64 *volume,
219 vrpn_int32 encodeLoadModel_local(
const char *filename,
char **buf);
220 vrpn_int32 decodeLoadModel_local(
const char *buf,
char **filename,
224 vrpn_int32 encodeLoadModel_remote(
const char *filename,
char **buf);
225 vrpn_int32 decodeLoadModel_remote(
const char *buf,
char **filename,
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,
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],
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],
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,
249 vrpn_int32 encodeSetPolyMaterial(
const char *material,
const vrpn_int32 tag,
251 vrpn_int32 decodeSetPolyMaterial(
const char *buf,
char **material,
252 vrpn_int32 *tag,
const int payload);
263 vrpn_int32 playSound(
const vrpn_SoundID id, vrpn_int32 repeat);
268 const vrpn_SoundDef soundDef);
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]);
277 const vrpn_float64 velocity[4]);
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);
284 const vrpn_float64 inner_angle,
285 const vrpn_float64 outer_angle,
286 const vrpn_float64 gain);
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);
292 vrpn_int32 setListenerPose(
const vrpn_float64 position[3],
293 const vrpn_float64 orientation[4]);
294 vrpn_int32 setListenerVelocity(
const vrpn_float64 velocity[4]);
296 vrpn_int32 LoadModel_local(
const char *filename);
299 vrpn_int32 LoadModel_remote(
const char *data);
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);
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);
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);
320 vrpn_int32 setTriVertices(
const int id,
const vrpn_float64 vertices[3][3]);
324 virtual void receiveTextMessage(
const char *message, vrpn_uint32 type,
325 vrpn_uint32 level,
struct timeval msg_time);
330 handle_receiveTextMessage(
void *userdata,
const vrpn_TEXTCB t);
343 #ifndef VRPN_CLIENT_ONLY
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;
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;
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;
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;
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;
439 #endif //#ifndef VRPN_CLIENT_ONLY