15 #if !defined(_MSC_VER)    24 #if defined(USESPACEBALL)    38 #if defined(USESPACEBALL)    40     bh->sball = sball_open(serialport);
    41     if (bh->sball == NULL) {
    61   int tx, ty, tz, rx, ry, rz, buttons, buttonchanged;
    65   float qq[4]={0.0, 0.0, 0.0, 1.0};
    66   float xx[3]={1.0, 0.0, 0.0};
    67   float yy[3]={0.0, 1.0, 0.0};
    68   float zz[3]={0.0, 0.0, 1.0};
    73   static float transdivisor = 5000.0;
    74   static float angdivisor = 20000.0;
    77   rx=ry=rz=tx=ty=tz=buttons=0;
    83 #if defined(USESPACEBALL)    84   if (bh->sball != NULL) {
    85     int rx2, ry2, rz2, tx2, ty2, tz2, buttons2;
    86     if (sball_getstatus(bh->sball, &tx2, &ty2, &tz2, &rx2, &ry2, &rz2, &buttons2) {
    99   if (!win_event && !direct_event) {
   112 #if defined(USESPACEBALL)   113   if ((buttonchanged & SBALL_BUTTON_PICK) && (buttons & SBALL_BUTTON_PICK)) ||
   114       (buttonchanged & SBALL_BUTTON_1) && (buttons & SBALL_BUTTON_1)) ||
   115       (buttonchanged & SBALL_BUTTON_LEFT) && (buttons & SBALL_BUTTON_LEFT)) ) {
   118   if ((buttonchanged & 1)  && (buttons & 1)) {
   125     transdivisor = 5000.0;
   126     angdivisor = 20000.0; 
   134 #if defined(USESPACEBALL)   135   if (buttons & SBALL_BUTTON_1) {
   139   else if (buttons & SBALL_BUTTON_2) {
   144   if (buttons & SBALL_BUTTON_3)
   146   else if (buttons & SBALL_BUTTON_4)
   149   if (buttons & SBALL_BUTTON_5) 
   151   else if (buttons & SBALL_BUTTON_6)
   154   if (buttons & SBALL_BUTTON_7) {
   159   t[0] = tx / transdivisor; 
   160   t[1] = ty / transdivisor;
   161   t[2] = tz / transdivisor;
   238 #if defined(RT_ACCUMULATE_ON) int tachyon_spaceball_update(sbHandle *bh, SceneHandle scene)
 
void rt_get_camera_position(SceneHandle voidscene, apivector *camcent, apivector *viewvec, apivector *upvec, apivector *rightvec)
Get camera position and orientation. 
 
void rt_accumulation_mode(SceneHandle voidscene, int mode)
Request Tachyon to use (or disuse) an internal floating point accumulation buffer, combining the newest frame with previously accumulated frames, normalizing the pixel values using an internal subframe counter. 
 
int glwin_get_spaceball(void *voidhandle, int *rx, int *ry, int *rz, int *tx, int *ty, int *tz, int *buttons)
 
void axis_to_quat(float a[3], float phi, float q[4])
 
apivector orig_camviewvec
 
void * tachyon_init_spaceball(SceneHandle scene, void *glwin, char *serialport)
 
flt x
X coordinate or direction component. 
 
#define RT_ACCUMULATE_CLEAR
accum. 
 
flt y
Y coordinate or direction component. 
 
void trackball(float q[4], float p1x, float p1y, float p2x, float p2y)
 
void add_quats(float q1[4], float q2[4], float dest[4])
 
void build_rotmatrix(float m[4][4], float q[4])
 
void rt_camera_position(SceneHandle voidscene, apivector camcent, apivector viewvec, apivector upvec)
Set camera position and orientation. 
 
Tachyon public API function prototypes and declarations used to drive the ray tracing engine...
 
apivector orig_camrightvec
 
flt z
Z coordinate or direction component.