/*toggle to active camera*/
else
{
- gluLookAt(view->cameras[view->active_camera]->targetx, view->cameras[view->active_camera]->targety, 20, view->cameras[view->active_camera]->targetx,
- view->cameras[view->active_camera]->targety, 0.0, 0.0, 1.0, 0.0);
glMultMatrixf(view->arcball->Transform.M); /*arcball transformations , experimental*/
+/* gluLookAt(view->cameras[view->active_camera]->targetx, view->cameras[view->active_camera]->targety, 20, view->cameras[view->active_camera]->targetx,
+ view->cameras[view->active_camera]->targety, 0.0, 0.0, 1.0, 0.0);*/
+ glTranslatef(-view->cameras[view->active_camera]->targetx,-view->cameras[view->active_camera]->targety,0);
+// printf(" %f %f %f \n",view->panx,view->pany,view->
}
GetOGLPosRef(1, view->h - 5, &(view->clipX1), &(view->clipY1),
glEnd();
glColor4f(0,1,0,0.3);
- gluSphere(quadratic,45,20,20);
+ gluSphere(quadratic,AL,20,20);
glLineWidth(1);
glPopMatrix();
#define ZOOM_STEP 0.5
#define DEG2RAD G_PI/180
+#define RAD2DEG 1/0.017453292519943
#define UNHIGHLIGHTED_ALPHA 0.3
#define Z_FORWARD_PLANE -0.00201
}
}
+static viewMatrice(int n,int m,float* mtx)
+{
+ int i,i2;
+ printf ("Transformation Matrix\n");
+ i=i2=0;
+ for (i=0; i < n * m; i ++)
+ {
+/* if (i==5)
+ printf ("tetX:%f ",asin(mtx[i]) * RAD2DEG); //around x , right hand notion
+ if (i==0)
+ printf ("tetZ:%f ",asin(mtx[i]) * RAD2DEG); //around x , right hand notion
+ if (i==5)
+ printf ("tetX:%f ",asin(mtx[i]) * RAD2DEG); //around x , right hand notion*/
+ printf ("%f ",asin(mtx[i]) * RAD2DEG); //around x , right hand notion*/
+ i2++;
+ if (i2 == m)
+ {
+ i2=0;
+ printf ("\n");
+ }
+ }
+}
-
-
-
+static void test_btn_callback(void* p)
+{
+// viewMatrice (4,4,view->arcball->Transform.M);
+ viewMatrice (3,3,view->arcball->ThisRot.M);
+}
static char *smyrna_icon_pan;
static char *smyrna_icon_zoom;
glCompSetAddButton(s, b);
b->callbackfunc = menu_switch_to_fisheye;
+ b = glCompButtonNew(140, 5, 75, 25, "Test Btn", '\0', 0, 0,scientific_y);
+ b->panel = p;
+ b->groupid = 0;
+ b->customptr = view;
+ glCompSetAddButton(s, b);
+ b->callbackfunc = test_btn_callback;
+
+