The spaceorb, liborb and O

Development notes of little interest to most people.

The spaceorb driver used for the prototype O interface on the DEC Alphas could not easily be ported to NT (at least I didn't know how to), and so John Stone's LibOrb package was adopted for all platforms.

At present (11 Apr 2000), the old version using my driver is still available in case there are problems. The following executables are current :

/home/markh/joy/spaceorb - Alpha version with the old driver
/home/markh/joy/spacelib - Alpha version with LibOrb
/home/markh/joy/spacelibsg - SGI version with LibOrb

The libraries to build these with are in :

/home/markh/joy/liborb/liborb.a
/home/markh/joy/liborbsg/liborbsg.a

The SGI version has some interesting personality traits :
1) If you move the pointer over the wrong type of window when the orb driver is running, that window gets killed. The right type of window includes those created by a call to XopenWindow(), or the 'xterm' command. The wrong type includes those opened by the sgi 'desktop/unix-shell' menu item.
2) The character nature of the ClientMessage event data is strictly enforced, so that the sign is misinterpreted in the numbers encoded there.
The application must thus explicitly cast the data items into (signed char) before using them.


LibOrb, Glut, NT and O

The code for polling the spaceorb under NT/Glut needs the following files :
(Available from http://jedi.ks.uiuc.edu/~johns/projects/liborb/)

orb.h
liborb.lib

and should look something like :

/* Orb Polling under NT/Glut */

#include "orb.h"

OrbHandle orb;
void orbmotion(void);
int rx,ry,rz,tx,ty,tz,buttons;


main() {

orb = orb_open("1"); // "1" is the port number. Use a variable.

orb_set_nullregion(orb,65,65,65,65,65,65); // Determines how much orb can wobble before data comes out

glutIdleFunc(myAST);

glutMainLoop();

.
.
.
orb_close(orb);

}

myAST() {

  orbmotion();

  printf("Orb data : 7%d",rx,ry,rz,tx,ty,tz,buttons);

  if (i>>7 & 1 == 1) printf("Bit 0 set");
  if (i>>6 & 1 == 1) printf("Bit 1 set");
  (etc...)

}


orbmotion() {

  int retcode;

  retcode=orb_getstatus(orb,&tx,&ty,&tz,&rx,&ry,&rz,&buttons);

}