Beaming Scene Service  2.0
RakNet wrapper for managing data communications between multiple Beaming clients
netClient/sampleClient.cpp File Reference
#include <iostream>
#include <stdio.h>
#include "Kbhit.h"
#include "Getche.h"
#include "client.h"
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <cstdlib>

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

sampleClient.cpp This client acts as a thin client, in that it simply connects to the server and sends and recieves data from server Use this file as a guide on how to connect to the Beaming Scene Service

Contact Wole Oyekoya <w.oyekoya@cs.ucl.ac.uk> for any queries

Include client.h

connect using startclient

  • startclient("127.0.0.1", 12050,"WOLE1","AVATAR","CMan0023.cfg",false);

add Rocketbox avatar

  • addRocketBoxAvatar("avatar");

add FACIAL root node

  • addNode("Head","FACIAL");

add AUDIO root node

  • addNode("Head","AUDIO");

check incoming packets

update AVATAR root node

  • updateRocketBoxAvatar("avatar","0",j,0.8841f,-0.026f,0.f,0.707f,0.f,0.707f);

Reading AVATAR data get information on all connected clients. use to populate a drop-down combo box for example.

for each connected guid in the database, get the nodes information.

pass iddata and avid to fetch data of all AVATAR nodes of the client as a pointer

  • int count = getAvatarData(iddata,nodes,client_info);

OR get specific AVATAR node data in local coordinates using

  • getAvatarSpecificData(iddata,avid,"0",data);

OR get specific AVATAR node data in world coordinates using

  • getAvatarSpecificGlobalData(iddata,avid,"85",data);

to get Avatar Name use getAvatarName(...)

Reading other types of data (e.g. GENERIC) get information on all connected clients.

for each connected guid in the database, get the nodes information.

pass iddata and genericid to fetch data of all GENERIC nodes of the client

  • int count = getGenericData(iddata,void pointer,pointer size);

Reading other types of data (e.g. FACIAL) get information on all connected clients.

for each connected guid in the database, get the nodes information.

pass iddata and faceid to fetch data of all AVATAR nodes of the client as a pointer

  • int count = getFacialData(iddata,nodes,blink,smile,frown,o,e,p);

OR get specific FACIAL node data using

  • getFacialSpecificData(iddata,faceid,data,blink,smile,frown,o,e,p);

Reading other types of data (e.g. AUDIO) get information on all connected clients.

for each connected guid in the database, get the nodes information.

pass iddata and audioid to fetch data of all AUDIO nodes of the client as a pointer

  • int count = getAudioData(iddata,nodes,audioserver,audioport,url,config);

Reading other types of data (e.g. VIDEO) get information on all connected clients.

for each connected guid in the database, get the nodes information.

pass iddata and videoid to fetch data of all VIDEO nodes of the client as a pointer

  • int count = getVideoData(iddata,nodes,videoserver,videoport,url,frame_width,frame_height,bandwidth,calibration1,calibration2);

remove all nodes and clean up on exit

Definition at line 26 of file sampleClient.cpp.

 All Classes Files Functions Variables Enumerations Enumerator Defines