Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2115 in orxonox.OLD for orxonox/branches/chris/src/camera.cc


Ignore:
Timestamp:
Jul 13, 2004, 10:49:20 AM (21 years ago)
Author:
chris
Message:

orxonox/branches/chris: Managed to apply all that rotating and translating so that you now actually see the debug player following the track. You can even steer the spaceship via the keys now… unfortunately the coordinate transformations are still a mess. Even though mapping from Locations to Placements seems to work in general, applying the finetuned position and rotation still messes up the whole damn thing…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/chris/src/camera.cc

    r2112 r2115  
    8787                // TO DO: implement options for frustum generation
    8888        glFrustum( -1.0,1.0,-1.0,1.0,1.5,250.0);
    89         glRotatef(h,1,0,0);
    90         glRotatef(h/2,0,1,0);
    91         glRotatef(h/4,0,0,1);
    92         h += 3;
    93 //      glRotatef(90,0,0,1);
     89//Vector up(0,0,1);
     90//Vector dir(1,0,0);
     91//Quaternion q(dir,up);
     92//float matrix[4][4];
     93//q.conjugate().matrix (matrix);
     94//glMultMatrixf ((float*)matrix);
     95//glTranslatef (10,0,-5);
     96//
     97//dir = Vector(-1,-1,0);
     98//q = Quaternion( dir, up);
     99//glMatrixMode (GL_MODELVIEW);
     100//glLoadIdentity ();
     101//q.matrix (matrix);
     102//glMultMatrixf ((float*)matrix);
     103//glTranslatef (2,2,0);
     104//
     105//glBegin(GL_TRIANGLES);
     106//glColor3f(1,0,0);
     107//glVertex3f(0,0,0.5);
     108//glColor3f(0,1,0);
     109//glVertex3f(-0.5,0,-1);
     110//glColor3f(0,0,1);
     111//glVertex3f(0.5,0,-1);
     112//glEnd();     
     113
    94114        // rotation
    95115  float matrix[4][4];
Note: See TracChangeset for help on using the changeset viewer.