39 vrpn_float64 p_pos[3], p_quat[4];
40 vrpn_float64 p_vel[3],
43 struct timeval p_timestamp;
47 vrpn_float64 p_pos_min[3], p_pos_max[3], p_pos_rot_min[3], p_pos_rot_max[3],
48 p_vel_min[3], p_vel_max[3], p_vel_rot_min[3], p_vel_rot_max[3];
52 virtual int encode_to(
char* buf);
53 virtual int encode_vel_to(
char* buf);
55 virtual void set_pose(
const struct timeval t,
56 const vrpn_float64 position[3],
57 const vrpn_float64 quaternion[4]);
58 virtual void set_pose_relative(
59 const struct timeval t,
62 const vrpn_float64 quaternion[4]);
64 set_pose_velocity(
const struct timeval t,
65 const vrpn_float64 position[3],
66 const vrpn_float64 quaternion[4],
67 const vrpn_float64 interval);
68 virtual void set_pose_velocity_relative(
69 const struct timeval t,
72 const vrpn_float64 quaternion[4],
81 typedef struct _vrpn_POSERCB {
82 struct timeval msg_time;
111 return d_callback_list.register_handler(userdata, handler);
115 return d_callback_list.unregister_handler(userdata, handler);
121 return d_relative_callback_list.register_handler(userdata, handler);
126 return d_relative_callback_list.unregister_handler(userdata, handler);
164 int request_pose(
const struct timeval t,
const vrpn_float64 position[3],
165 const vrpn_float64 quaternion[4]);
166 int request_pose_relative(
const struct timeval t,
167 const vrpn_float64 position_delta[3],
168 const vrpn_float64 quaternion[4]);
169 int request_pose_velocity(
const struct timeval t,
170 const vrpn_float64 velocity[3],
171 const vrpn_float64 quaternion[4],
172 const vrpn_float64 interval);
173 int request_pose_velocity_relative(
const struct timeval t,
174 const vrpn_float64 velocity_delta[3],
175 const vrpn_float64 quaternion[4],
176 const vrpn_float64 interval_delta);
181 virtual int client_send_pose_relative();
183 virtual int client_send_pose_velocity();
186 client_send_pose_velocity_relative();
A structure for Call-Backs related to Vrpn Poser Server.
vrpn_Callback_List< vrpn_POSERCB > d_callback_list
vrpn_int32 req_velocity_m_id
Generic connection class not specific to the transport mechanism.
vrpn_Callback_List< vrpn_POSERCB > d_relative_callback_list
virtual int register_types(void)=0
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail...
void(VRPN_CALLBACK * vrpn_POSERHANDLER)(void *userdata, const vrpn_POSERCB info)
int register_relative_change_handler(void *userdata, vrpn_POSERHANDLER handler)
vrpn_int32 req_velocity_relative_m_id
All types of client/server/peer objects in VRPN should be derived from the vrpn_BaseClass type descri...
int unregister_relative_change_handler(void *userdata, vrpn_POSERHANDLER handler)
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
This structure is what is passed to a vrpn_Connection message callback.
vrpn_float64 p_vel_quat_dt
int register_change_handler(void *userdata, vrpn_POSERHANDLER handler)
Class from which all user-level (and other) classes that communicate with vrpn_Connections should der...
vrpn_int32 req_position_relative_m_id
vrpn_int32 req_position_m_id
int unregister_change_handler(void *userdata, vrpn_POSERHANDLER handler)