73 vrpn_int32 len =
static_cast<vrpn_int32
>(
80 try { *buf =
new char[len]; }
82 fprintf(stderr,
"vrpn_Sound::encodeSound_local(): Out of memory.\n");
89 for (i = 0; i < 3; i++)
92 for (i = 0; i < 4; i++)
95 for (i = 0; i < 4; i++)
113 static_cast<vrpn_int32
>(strlen(filename)) + 1);
123 const char *mptr = buf;
130 fprintf(stderr,
"vrpn_Sound::decodeSound_local(): Out of memory.\n");
136 for (i = 0; i < 3; i++)
139 for (i = 0; i < 4; i++)
142 for (i = 0; i < 4; i++)
195 const char *mptr = buf;
206 const vrpn_int32 repeat,
char *buf)
211 vrpn_int32 ret = len;
217 for (i = 0; i < 3; i++)
220 for (i = 0; i < 4; i++)
223 for (i = 0; i < 4; i++)
246 const char *mptr = buf;
252 for (i = 0; i < 3; i++)
255 for (i = 0; i < 4; i++)
258 for (i = 0; i < 4; i++)
283 vrpn_int32 ret = len;
286 for (i = 0; i < 3; i++)
289 for (i = 0; i < 4; i++)
297 const char *mptr = buf;
300 for (i = 0; i < 3; i++)
303 for (i = 0; i < 4; i++)
310 const vrpn_int32 repeat,
char *buf)
313 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_int32);
314 vrpn_int32 ret = len;
324 const char *mptr = buf;
335 vrpn_int32 len =
sizeof(vrpn_float64) * 4;
336 vrpn_int32 ret = len;
339 for (i = 0; i < 4; i++)
346 vrpn_float64 *velocity)
348 const char *mptr = buf;
350 for (
int i = 0; i < 4; i++)
361 vrpn_int32 ret = len;
366 for (i = 0; i < 4; i++)
369 for (i = 0; i < 3; i++)
378 const char *mptr = buf;
383 for (i = 0; i < 4; i++)
386 for (i = 0; i < 3; i++)
396 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64) * 4;
397 vrpn_int32 ret = len;
402 for (i = 0; i < 4; i++)
409 vrpn_float64 *velocity,
412 const char *mptr = buf;
417 for (i = 0; i < 4; i++)
424 const vrpn_float64 max_back,
425 const vrpn_float64 min_front,
426 const vrpn_float64 max_front,
430 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64) * 4;
431 vrpn_int32 ret = len;
444 vrpn_float64 *max_back, vrpn_float64 *min_front,
447 const char *mptr = buf;
459 const vrpn_float64 cone_outer_angle,
460 const vrpn_float64 cone_gain,
464 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64) * 3;
465 vrpn_int32 ret = len;
477 vrpn_float64 *cone_inner_angle,
478 vrpn_float64 *cone_outer_angle,
479 vrpn_float64 *cone_gain,
482 const char *mptr = buf;
497 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64);
498 vrpn_int32 ret = len;
508 vrpn_float64 *doplerfactor,
511 const char *mptr = buf;
523 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64);
524 vrpn_int32 ret = len;
534 vrpn_float64 *eqfactor,
537 const char *mptr = buf;
550 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64);
551 vrpn_int32 ret = len;
563 const char *mptr = buf;
576 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64);
577 vrpn_int32 ret = len;
589 const char *mptr = buf;
600 static_cast<vrpn_int32
>(
sizeof(
vrpn_SoundID) + strlen(filename) + 1);
601 vrpn_int32 ret = len;
605 try { *buf =
new char[strlen(filename) +
sizeof(
vrpn_SoundID) + 1]; }
607 fprintf(stderr,
"vrpn_Sound::encodeLoadModel_local(): Out of memory.\n");
613 static_cast<vrpn_int32
>(strlen(filename)) + 1);
621 const char *mptr = buf;
624 try { *filename =
new char[payload -
sizeof(
vrpn_SoundID)]; }
626 fprintf(stderr,
"vrpn_Sound::decodeLoadModel_local(): Out of memory.\n");
653 vrpn_int32 ret = len;
659 for (i = 0; i < 4; i++)
660 for (
int j(0); j < 3; j++)
670 const char *mptr = buf;
676 for (i = 0; i < 4; i++)
677 for (
int j(0); j < 3; j++)
687 vrpn_int32 len =
sizeof(vrpn_int32) +
sizeof(
vrpn_TriDef);
688 vrpn_int32 ret = len;
694 for (i = 0; i < 3; i++)
695 for (
int j(0); j < 3; j++)
704 const char *mptr = buf;
710 for (i = 0; i < 3; i++)
711 for (
int j(0); j < 3; j++)
724 vrpn_int32 ret = len;
741 const char *mptr = buf;
755 const vrpn_int32 tag,
char *buf)
758 vrpn_int32 len =
sizeof(vrpn_int32) +
sizeof(vrpn_float64) * 12;
759 vrpn_int32 ret = len;
763 for (
int i = 0; i < 4; i++)
764 for (
int j(0); j < 3; j++)
771 vrpn_float64 (*vertices)[4][3],
774 const char *mptr = buf;
778 for (
int i = 0; i < 4; i++)
779 for (
int j(0); j < 3; j++)
786 const vrpn_int32 tag,
char *buf)
789 vrpn_int32 len =
sizeof(vrpn_int32) +
sizeof(vrpn_float64) * 9;
790 vrpn_int32 ret = len;
794 for (
int i = 0; i < 3; i++)
795 for (
int j(0); j < 3; j++)
802 vrpn_float64 (*vertices)[3][3],
805 const char *mptr = buf;
809 for (
int i = 0; i < 3; i++)
810 for (
int j(0); j < 3; j++)
817 const vrpn_int32 tag,
char *buf)
820 vrpn_int32 len =
sizeof(
vrpn_SoundID) +
sizeof(vrpn_float64);
821 vrpn_int32 ret = len;
831 vrpn_float64 *openingfactor,
834 const char *mptr = buf;
844 const vrpn_int32 tag,
char *buf)
847 vrpn_int32 ret = len;
857 vrpn_int32 *tag,
const int)
859 const char *mptr = buf;
875 handle_receiveTextMessage);
897 "vrpn_Sound_Client: cannot write message play: tossing\n");
916 "vrpn_Sound_Client: cannot write message play: tossing\n");
939 "vrpn_Sound_Client: cannot write message load: tossing\n");
945 fprintf(stderr,
"vrpn_Sound_Client::loadSound(): delete failed\n");
965 "vrpn_Sound_Client: cannot write message unload: tossing\n");
971 const vrpn_float64 volume)
985 "vrpn_Sound_Client: cannot write message change status: tossing\n");
991 vrpn_float64 position[3],
992 vrpn_float64 orientation[4])
998 for (i = 0; i < 4; i++) {
1001 for (i = 0; i < 3; i++) {
1014 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1021 const vrpn_float64 velocity[4])
1023 char buf[
sizeof(vrpn_float64) * 4 +
sizeof(
vrpn_SoundID)];
1035 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1041 const vrpn_SoundID id,
const vrpn_float64 max_front_dist,
1042 const vrpn_float64 min_front_dist,
const vrpn_float64 max_back_dist,
1043 const vrpn_float64 min_back_dist)
1045 char buf[
sizeof(vrpn_float64) * 4 +
sizeof(
vrpn_SoundID)];
1049 min_back_dist,
id, buf);
1058 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1064 const vrpn_float64 inner_angle,
1065 const vrpn_float64 outer_angle,
1066 const vrpn_float64 gain)
1069 char buf[
sizeof(vrpn_float64) * 3 +
sizeof(
vrpn_SoundID)];
1081 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1087 vrpn_float64 dopfactor)
1102 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1108 vrpn_float64 eq_value)
1122 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1142 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1148 const vrpn_float64 orientation[4])
1155 for (i = 0; i < 4; i++) {
1158 for (i = 0; i < 3; i++) {
1171 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1179 char buf[
sizeof(vrpn_float64) * 4];
1191 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1210 "vrpn_Sound_Client: cannot write message load: tossing\n");
1234 "vrpn_Sound_Client: cannot write message load: tossing\n");
1252 "vrpn_Sound_Client: cannot write message load: tossing\n");
1271 "vrpn_Sound_Client: cannot write message load: tossing\n");
1278 char buf[
sizeof(vrpn_int32) +
sizeof(vrpn_float64)];
1290 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1296 const vrpn_float64 vertices[4][3])
1298 char buf[
sizeof(vrpn_int32) +
sizeof(vrpn_float64) * 12];
1310 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1316 const char *material_name)
1318 char buf[
sizeof(vrpn_int32) +
sizeof(material_name)];
1330 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1335 const vrpn_float64 vertices[3][3])
1337 char buf[
sizeof(vrpn_int32) +
sizeof(vrpn_float64) * 9];
1349 "vrpn_Sound_Client: cannot write message change status: tossing\n");
1360void vrpn_Sound_Client::handle_receiveTextMessage(
void *userdata,
1368 vrpn_uint32,
struct timeval)
1370 printf(
"Virtual: %s\n", message);
1377#ifndef VRPN_CLIENT_ONLY
1445int vrpn_Sound_Server::handle_loadSoundLocal(
void *userdata,
1460 fprintf(stderr,
"vrpn_Sound_Server::handle_loadSoundLocal(): delete failed\n");
1467int vrpn_Sound_Server::handle_loadSoundRemote(
void *,
1505int vrpn_Sound_Server::handle_changeSoundStatus(
void *userdata,
1518int vrpn_Sound_Server::handle_setListenerPose(
void *userdata,
1529int vrpn_Sound_Server::handle_setListenerVelocity(
void *userdata,
1533 vrpn_float64 velocity[4];
1551int vrpn_Sound_Server::handle_setSoundVelocity(
void *userdata,
1555 vrpn_float64 velocity[4];
1563int vrpn_Sound_Server::handle_setSoundDistanceinfo(
void *userdata,
1567 vrpn_float64 dist[4];
1576int vrpn_Sound_Server::handle_setSoundConeinfo(
void *userdata,
1580 vrpn_float64 cinfo[3];
1589int vrpn_Sound_Server::handle_setSoundDoplerfactor(
void *userdata,
1601int vrpn_Sound_Server::handle_setSoundEqvalue(
void *userdata,
1624int vrpn_Sound_Server::handle_setSoundVolume(
void *userdata,
1636int vrpn_Sound_Server::handle_loadModelLocal(
void *userdata,
1647 fprintf(stderr,
"vrpn_Sound_Server::handle_loadModelLocal(): delete failed\n");
1654int vrpn_Sound_Server::handle_loadModelRemote(
void *,
1692int vrpn_Sound_Server::handle_setPolyquadVertices(
void *userdata,
1696 vrpn_float64(*vertices)[4][3] = NULL;
1704int vrpn_Sound_Server::handle_setPolytriVertices(
void *userdata,
1708 vrpn_float64(*vertices)[3][3] = NULL;
1716int vrpn_Sound_Server::handle_setPolyOpeningfactor(
void *userdata,
1728int vrpn_Sound_Server::handle_setPolyMaterial(
void *userdata,
1732 char **material = NULL;
int register_autodeleted_handler(vrpn_int32 type, vrpn_MESSAGEHANDLER handler, void *userdata, vrpn_int32 sender=vrpn_ANY_SENDER)
Registers a handler with the connection, and remembers to delete at destruction.
vrpn_Connection * d_connection
Connection that this object talks to.
void client_mainloop(void)
Handles functions that all clients should provide in their mainloop() (warning of no server,...
vrpn_int32 d_sender_id
Sender ID registered with the connection.
Class from which all user-level (and other) classes that communicate with vrpn_Connections should der...
virtual int init(void)
Initialize things that the constructor can't. Returns 0 on success, -1 on failure.
Generic connection class not specific to the transport mechanism.
virtual vrpn_int32 register_message_type(const char *name)
virtual int mainloop(const struct timeval *timeout=NULL)=0
Call each time through program main loop to handle receiving any incoming messages and sending any pa...
vrpn_int32 setSoundDopScale(const vrpn_SoundID id, vrpn_float64 dopfactor)
vrpn_int32 LoadModel_local(const char *filename)
vrpn_int32 setSoundPitch(const vrpn_SoundID id, vrpn_float64 pitch)
virtual void mainloop()
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_int32 LoadPolyTri(const vrpn_TriDef tri)
vrpn_int32 playSound(const vrpn_SoundID id, vrpn_int32 repeat)
vrpn_int32 setSoundVelocity(const vrpn_SoundID id, const vrpn_float64 velocity[4])
vrpn_int32 setPolyOF(const int id, const vrpn_float64 OF)
vrpn_int32 setSoundPose(const vrpn_SoundID id, vrpn_float64 position[3], vrpn_float64 orientation[4])
vrpn_int32 setSoundEqValue(const vrpn_SoundID id, vrpn_float64 eq_value)
vrpn_int32 setTriVertices(const int id, const vrpn_float64 vertices[3][3])
vrpn_int32 setSoundConeInfo(const vrpn_SoundID id, const vrpn_float64 inner_angle, const vrpn_float64 outer_angle, const vrpn_float64 gain)
vrpn_int32 setSoundVolume(const vrpn_SoundID id, const vrpn_float64 volume)
vrpn_int32 setQuadVertices(const int id, const vrpn_float64 vertices[4][3])
vrpn_int32 LoadPolyQuad(const vrpn_QuadDef quad)
vrpn_int32 setPolyMaterialName(const int id, const char *materialname)
vrpn_int32 setListenerVelocity(const vrpn_float64 velocity[4])
vrpn_int32 setListenerPose(const vrpn_float64 position[3], const vrpn_float64 orientation[4])
vrpn_int32 stopSound(const vrpn_SoundID id)
virtual void receiveTextMessage(const char *message, vrpn_uint32 type, vrpn_uint32 level, struct timeval msg_time)
vrpn_Sound_Client(const char *name, vrpn_Connection *c)
vrpn_int32 setSoundDistances(const vrpn_SoundID id, const vrpn_float64 max_front_dist, const vrpn_float64 min_front_dist, const vrpn_float64 max_back_dist, const vrpn_float64 min_back_dist)
vrpn_int32 LoadModel_remote(const char *data)
vrpn_int32 unloadSound(const vrpn_SoundID id)
vrpn_SoundID loadSound(const char *sound, const vrpn_SoundID id, const vrpn_SoundDef soundDef)
vrpn_int32 LoadMaterial(const vrpn_int32 id, const vrpn_MaterialDef material)
vrpn_Sound_Server(const char *name, vrpn_Connection *c)
virtual void setSoundPitch(vrpn_SoundID id, vrpn_float64 pitch)=0
virtual void loadPolyTri(vrpn_TriDef *tri)=0
virtual void loadModelLocal(const char *filename)=0
virtual void setSoundDoplerFactor(vrpn_SoundID id, vrpn_float64 doplerfactor)=0
virtual void setPolyQuadVertices(vrpn_float64 vertices[4][3], const vrpn_int32 id)=0
virtual void setSoundEqValue(vrpn_SoundID id, vrpn_float64 eqvalue)=0
virtual void setSoundVolume(vrpn_SoundID id, vrpn_float64 volume)=0
virtual void setPolyOF(vrpn_float64 OF, vrpn_int32 tag)=0
virtual void playSound(vrpn_SoundID id, vrpn_int32 repeat, vrpn_SoundDef soundDef)=0
virtual void setListenerVelocity(vrpn_float64 *velocity)=0
virtual void setSoundVelocity(vrpn_SoundID id, vrpn_float64 *velocity)=0
virtual void setListenerPose(vrpn_PoseDef pose)=0
virtual void setSoundConeInfo(vrpn_SoundID id, vrpn_float64 *coneinfo)=0
virtual void loadMaterial(vrpn_MaterialDef *material, vrpn_int32 id)=0
virtual void setSoundPose(vrpn_SoundID id, vrpn_PoseDef pose)=0
virtual void setSoundDistInfo(vrpn_SoundID id, vrpn_float64 *distinfo)=0
virtual void unloadSound(vrpn_SoundID id)=0
virtual void changeSoundStatus(vrpn_SoundID id, vrpn_SoundDef soundDef)=0
virtual void loadPolyQuad(vrpn_QuadDef *quad)=0
virtual void setPolyTriVertices(vrpn_float64 vertices[3][3], const vrpn_int32 id)=0
virtual void setPolyMaterial(const char *material, vrpn_int32 tag)=0
virtual void stopSound(vrpn_SoundID id)=0
virtual void loadSoundLocal(char *filename, vrpn_SoundID id, vrpn_SoundDef soundDef)=0
vrpn_int32 encodeSoundID(const vrpn_SoundID id, char *buf)
vrpn_int32 load_model_local
vrpn_int32 decodeSetQuadVert(const char *buf, vrpn_float64(*vertices)[4][3], vrpn_int32 *tag)
vrpn_int32 set_polyquad_vertices
vrpn_int32 encodeSound_local(const char *filename, const vrpn_SoundID id, const vrpn_SoundDef soundDef, char **buf)
vrpn_int32 decodeSoundEqFactor(const char *buf, vrpn_float64 *eqfactor, vrpn_SoundID *id)
vrpn_int32 set_sound_coneinfo
vrpn_int32 decodeListenerPose(const char *buf, vrpn_PoseDef *pose)
vrpn_int32 set_listener_pose
vrpn_int32 decodeSoundPose(const char *buf, vrpn_PoseDef *pose, vrpn_SoundID *id)
vrpn_int32 encodeSound_remote(const char *filename, const vrpn_SoundID id, char **buf)
vrpn_int32 encodeLoadModel_local(const char *filename, char **buf)
vrpn_Sound(const char *name, vrpn_Connection *c)
vrpn_int32 encodeLoadPolyQuad(const vrpn_QuadDef quad, char *buf)
vrpn_int32 set_sound_pitch
vrpn_int32 decodeSoundPlay(const char *buf, vrpn_SoundID *id, vrpn_int32 *repeat)
vrpn_int32 decodeSetPolyOF(const char *buf, vrpn_float64 *openingfactor, vrpn_int32 *tag)
vrpn_int32 encodeSoundDef(const vrpn_SoundDef sound, const vrpn_SoundID id, const vrpn_int32 repeat, char *buf)
vrpn_int32 decodeSoundDef(const char *buf, vrpn_SoundDef *sound, vrpn_SoundID *id, vrpn_int32 *repeat)
vrpn_int32 decodeSoundPitch(const char *buf, vrpn_float64 *pitch, vrpn_SoundID *id)
vrpn_int32 set_sound_distanceinfo
vrpn_int32 load_sound_remote
vrpn_int32 encodeLoadModel_remote(const char *filename, char **buf)
vrpn_int32 encodeSoundConeInfo(const vrpn_float64 cone_inner_angle, const vrpn_float64 cone_outer_angle, const vrpn_float64 cone_gain, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSoundVelocity(const char *buf, vrpn_float64 *velocity, vrpn_SoundID *id)
vrpn_int32 decodeSoundDistInfo(const char *buf, vrpn_float64 *min_back, vrpn_float64 *max_back, vrpn_float64 *min_front, vrpn_float64 *max_front, vrpn_SoundID *id)
vrpn_int32 set_sound_velocity
vrpn_int32 decodeLoadPolyTri(const char *buf, vrpn_TriDef *tri)
vrpn_int32 encodeSoundPlay(const vrpn_SoundID id, const vrpn_int32 repeat, char *buf)
vrpn_int32 encodeSoundDistInfo(const vrpn_float64 min_back, const vrpn_float64 max_back, const vrpn_float64 min_front, const vrpn_float64 max_front, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSetPolyMaterial(const char *buf, char **material, vrpn_int32 *tag, const int payload)
vrpn_int32 decodeSetTriVert(const char *buf, vrpn_float64(*vertices)[3][3], vrpn_int32 *tag)
vrpn_int32 set_listener_velocity
vrpn_int32 decodeLoadModel_remote(const char *buf, char **filename, const int payload)
vrpn_int32 decodeLoadMaterial(const char *buf, vrpn_MaterialDef *material, vrpn_int32 *id)
vrpn_int32 encodeListenerVelocity(const vrpn_float64 *velocity, char *buf)
vrpn_int32 load_model_remote
vrpn_int32 set_sound_doplerfactor
vrpn_int32 encodeLoadMaterial(const vrpn_int32 id, const vrpn_MaterialDef material, char *buf)
vrpn_int32 encodeListenerPose(const vrpn_PoseDef pose, char *buf)
vrpn_int32 decodeSoundVolume(const char *buf, vrpn_float64 *volume, vrpn_SoundID *id)
vrpn_int32 decodeSound_remote(const char *buf, char **filename, vrpn_SoundID *id, const int payload)
vrpn_int32 decodeSoundConeInfo(const char *buf, vrpn_float64 *cone_inner_angle, vrpn_float64 *cone_outer_angle, vrpn_float64 *cone_gain, vrpn_SoundID *id)
vrpn_int32 encodeSoundEqFactor(const vrpn_float64 eqfactor, const vrpn_SoundID id, char *buf)
vrpn_int32 encodeSoundVolume(const vrpn_float64 volume, const vrpn_SoundID id, char *buf)
vrpn_int32 set_sound_volume
int register_types(void)
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.
vrpn_int32 set_sound_pose
vrpn_int32 encodeSetQuadVert(const vrpn_float64 vertices[4][3], const vrpn_int32 tag, char *buf)
vrpn_int32 load_sound_local
vrpn_int32 change_sound_status
vrpn_int32 encodeSetTriVert(const vrpn_float64 vertices[3][3], const vrpn_int32 tag, char *buf)
vrpn_int32 encodeLoadPolyTri(const vrpn_TriDef tri, char *buf)
vrpn_int32 set_sound_eqvalue
vrpn_int32 set_poly_material
vrpn_int32 encodeSoundDoplerScale(const vrpn_float64 doplerfactor, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeLoadPolyQuad(const char *buf, vrpn_QuadDef *quad)
vrpn_int32 encodeSoundPose(const vrpn_PoseDef pose, const vrpn_SoundID id, char *buf)
vrpn_int32 decodeSound_local(const char *buf, char **filename, vrpn_SoundID *id, vrpn_SoundDef *soundDef, const int payload)
vrpn_int32 decodeSoundID(const char *buf, vrpn_SoundID *id)
vrpn_int32 encodeSetPolyOF(const vrpn_float64 openingfactor, const vrpn_int32 tag, char *buf)
vrpn_int32 set_poly_openingfactor
vrpn_int32 encodeSoundPitch(const vrpn_float64 pitch, const vrpn_SoundID id, char *buf)
vrpn_int32 encodeSoundVelocity(const vrpn_float64 *velocity, const vrpn_SoundID id, char *buf)
vrpn_int32 set_polytri_vertices
vrpn_int32 decodeLoadModel_local(const char *buf, char **filename, const int payload)
vrpn_int32 decodeSoundDoplerScale(const char *buf, vrpn_float64 *doplerfactor, vrpn_SoundID *id)
vrpn_int32 encodeSetPolyMaterial(const char *material, const vrpn_int32 tag, char *buf)
vrpn_int32 decodeListenerVelocity(const char *buf, vrpn_float64 *velocity)
Allows a user to handle text messages directly, in addition to having the.
virtual int register_message_handler(void *userdata, vrpn_TEXTHANDLER handler)
Allows a user to send text messages from a device (usually,.
This structure is what is passed to a vrpn_Connection message callback.
vrpn_float64 reflectance_highfreq
vrpn_float64 reflectance_gain
char material_name[MAX_MATERIAL_NAME_LENGTH]
vrpn_float64 transmittance_gain
vrpn_float64 transmittance_highfreq
vrpn_float64 orientation[4]
vrpn_float64 vertices[4][3]
char material_name[MAX_MATERIAL_NAME_LENGTH]
vrpn_float64 openingFactor
vrpn_float64 min_front_dist
vrpn_float64 equalization_val
vrpn_float64 cone_outer_angle
vrpn_float64 max_front_dist
vrpn_float64 cone_inner_angle
vrpn_float64 max_back_dist
vrpn_float64 dopler_scale
vrpn_float64 min_back_dist
Structure passed back to user-level code from a vrpn_Text_Receiver.
char message[vrpn_MAX_TEXT_LEN]
char material_name[MAX_MATERIAL_NAME_LENGTH]
vrpn_float64 vertices[3][3]
vrpn_float64 openingFactor
const vrpn_uint32 vrpn_CONNECTION_RELIABLE
Classes of service for messages, specify multiple by ORing them together Priority of satisfying these...
VRPN_API int vrpn_unbuffer(const char **buffer, timeval *t)
Utility routine for taking a struct timeval from a buffer that was sent as a message.
VRPN_API int vrpn_buffer(char **insertPt, vrpn_int32 *buflen, const timeval t)
Utility routine for placing a timeval struct into a buffer that is to be sent as a message.
#define vrpn_gettimeofday
#define MAX_MATERIAL_NAME_LENGTH