![]() |
Beaming Scene Service
2.0
RakNet wrapper for managing data communications between multiple Beaming clients
|
00001 00022 #include <string> 00023 #include <sstream> 00024 00025 #ifdef WIN32 00026 #define CLIENT_LIB_EXPORT __declspec(dllexport) 00027 #else 00028 #define CLIENT_LIB_EXPORT 00029 #endif 00030 00031 enum BeamingDataType 00032 { 00033 AVATAR, 00034 FACIAL, 00035 EMOTION, 00036 VIDEO, 00037 TACTILE, 00038 ROBOT, 00039 OBJECT, 00040 AUDIO, 00041 POINTCLOUD, 00042 GENERIC 00043 }; 00044 00045 #ifdef __cplusplus 00046 extern "C" { 00047 #endif /* __cplusplus */ 00048 00087 CLIENT_LIB_EXPORT int startclient(char *server_address, int server_port, char *client, char *clienttype, char *config, int viewer, int reliability=2, int priority=1, int interval_ms=30); 00088 00091 CLIENT_LIB_EXPORT void check(); 00092 00096 CLIENT_LIB_EXPORT void createNode(char *id); 00097 00100 CLIENT_LIB_EXPORT int addRocketBoxAvatar(char *avatar_id, char *avatar_cfg); 00101 00103 CLIENT_LIB_EXPORT int deleteRocketBoxAvatar(char *avatar_id); 00104 00108 CLIENT_LIB_EXPORT void addNode(char *id, char node_type[]); 00109 00112 CLIENT_LIB_EXPORT void addChildNode(char *id, char *parent_id, char node_type[]); 00113 00118 CLIENT_LIB_EXPORT int updateNodes(char *id, float x, float y, float z, float rx, float ry, float rz, float w); 00119 00123 CLIENT_LIB_EXPORT int updateRocketBoxAvatar(char *avatar_id, char *node_id, float x, float y, float z, float rx, float ry, float rz, float w); 00124 00127 CLIENT_LIB_EXPORT int updateAvatarNodes(char *id, float x, float y, float z, float rx, float ry, float rz, float w); 00128 00130 CLIENT_LIB_EXPORT int updateFacialNodes(char *id, bool blink, float smile, float frown, float o, float e, float p); 00131 00133 CLIENT_LIB_EXPORT int updateEmotionNodes(char *id, double valence, double arousal, double misc); 00134 00136 CLIENT_LIB_EXPORT int updateTactileNodes(char *id, double duration, float intensity, float temperature); 00137 00139 CLIENT_LIB_EXPORT int updateRobotNodes(char *id, int type, int details, float freespace, float x, float y, float z, float rx, float ry, float rz, float w, float time_remain, int contact_type); 00140 00142 CLIENT_LIB_EXPORT int updateAudioNodes(char *id, char *host, int port, char *file_url, char *config); 00143 00145 CLIENT_LIB_EXPORT int updateVideoNodes(char *id, char *host, int port, char *file_url, int frame_width, int frame_height, double bandwidth, float *camera_calibration1, float *camera_calibration2); 00146 00148 CLIENT_LIB_EXPORT int updateObjectNodes(char *id, char *host, int port, char *file_url, float x, float y, float z, float rx, float ry, float rz, float w); 00149 00151 CLIENT_LIB_EXPORT int updatePointCloudNodes(char *id, char *host, int port, char *file_url, int size, double bandwidth, bool RGB_flag, int quality); 00152 00154 CLIENT_LIB_EXPORT int updateGenericNodes(char *id, void *pdata, int psize); 00155 00157 CLIENT_LIB_EXPORT void removeAllNodes(); 00158 00160 CLIENT_LIB_EXPORT void removeNode(char *id, char node_type[]); 00161 00164 CLIENT_LIB_EXPORT int getPeersInfo(char *peers_info); 00165 00168 CLIENT_LIB_EXPORT int getPeersID(char *peers_info); 00169 00171 CLIENT_LIB_EXPORT void getIPinfo(char strid[], char *ipinfo); 00172 00174 CLIENT_LIB_EXPORT int getMyGUID(char *mGUID); 00175 00180 CLIENT_LIB_EXPORT int getNodesInfo(char peer_guid[], char *nodes_info); 00181 00183 CLIENT_LIB_EXPORT int setAvatarName(char *avatar_id, char *firstname, char *lastname); 00184 00186 CLIENT_LIB_EXPORT void getAvatarName(char strid[], char avatar_id[], char *firstname, char *lastname); 00187 00193 CLIENT_LIB_EXPORT int getAvatarData(char strid[], char avatar_id[], char *node_ids, float *fa); 00194 00196 CLIENT_LIB_EXPORT int getFacialData(char strid[], char *node_ids, bool *blink, float *smile, float *frown, float *o, float *e, float *p); 00197 00199 CLIENT_LIB_EXPORT int getEmotionData(char strid[], char *node_ids, double *valence, double *arousal, double *misc); 00200 00202 CLIENT_LIB_EXPORT int getTactileData(char strid[], char *node_ids, double *duration, float *intensity, float *temperature); 00203 00205 CLIENT_LIB_EXPORT int getRobotData(char strid[], char *node_ids, int *type, int *details, float *freespace, float *x, float *y, float *z, float *rx, float *ry, float *rz, float *w, float *time_remain, int *contact_type); 00206 00208 CLIENT_LIB_EXPORT int getAudioData(char strid[], char *node_ids, char *host, int *port, char *file_url, char *config); 00209 00211 CLIENT_LIB_EXPORT int getVideoData(char strid[], char *node_ids, char *host, int *port, char *file_url, int *frame_width, int *frame_height, double *bandwidth, float *camera_calibration1, float *camera_calibration2); 00212 00214 CLIENT_LIB_EXPORT int getObjectData(char strid[], char *node_ids, char *host, int *port, char *file_url, float *fa); 00215 00217 CLIENT_LIB_EXPORT int getPointCloudData(char strid[], char *node_ids, char *host, int *port, char *file_url, int *size, double *bandwidth, bool *RGB_flag, int *quality); 00218 00220 CLIENT_LIB_EXPORT bool getGenericData(char strid[], char generic_id[], void *pdata, int *psize); 00221 00224 CLIENT_LIB_EXPORT bool getAvatarSpecificData(char strid[], char avatar_id[], char node_id[], float *fa); 00225 00228 CLIENT_LIB_EXPORT bool getAvatarSpecificGlobalData(char strid[], char avatar_id[], char node_id[], float *fa); 00229 00231 CLIENT_LIB_EXPORT bool getFacialSpecificData(char strid[], char node_id[], bool *blink, float *smile, float *frown, float *o, float *e, float *p); 00232 00234 CLIENT_LIB_EXPORT bool getEmotionSpecificData(char strid[], char node_id[], double *valence, double *arousal, double *misc); 00235 00237 CLIENT_LIB_EXPORT bool getTactileSpecificData(char strid[], char node_id[], double *duration, float *intensity, float *temperature); 00238 00240 CLIENT_LIB_EXPORT bool getRobotSpecificData(char strid[], char node_id[], int *type, int *details, float *freespace, float *fa, float *time_remain, int *contact_type); 00241 00243 CLIENT_LIB_EXPORT bool getAudioSpecificData(char strid[], char node_id[], char *host, int *port, char *file_url, char *config); 00244 00246 CLIENT_LIB_EXPORT bool getVideoSpecificData(char strid[], char node_id[], char *host, int *port, char *file_url, int *frame_width, int *frame_height, double *bandwidth, float *camera_calibration1, float *camera_calibration2); 00247 00249 CLIENT_LIB_EXPORT bool getObjectSpecificData(char strid[], char node_id[], char *host, int *port, char *file_url, float *fa); 00250 00252 CLIENT_LIB_EXPORT bool getPointCloudSpecificData(char strid[], char node_id[], char *host, int *port, char *file_url, int *size, double *bandwidth, bool *RGB_flag, int *quality); 00253 00259 CLIENT_LIB_EXPORT int checkStatus(char *idstr, char *mytype, char *name, char *myconfig); 00260 00265 CLIENT_LIB_EXPORT int fetch(char strid[], float *fa); 00266 00271 CLIENT_LIB_EXPORT int fetch2(char strid[], char *fa); 00272 00274 CLIENT_LIB_EXPORT void stop(); 00275 00277 CLIENT_LIB_EXPORT void exitlibrary(); 00278 00279 #ifdef __cplusplus 00280 } 00281 #endif /* __cplusplus */