Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10767 in orxonox.OLD for branches/presentation/src/util


Ignore:
Timestamp:
Jun 21, 2007, 12:57:41 PM (18 years ago)
Author:
snellen
Message:

removed trackdraw, actionbox, draw ,position output in spaceship

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/util/track/action_box.cc

    r10728 r10767  
    3434void ActionBox::draw( ) const
    3535{
    36   glMatrixMode(GL_MODELVIEW);
    37   glPushMatrix();
    38 
    39   glPushAttrib(GL_ENABLE_BIT);
    40 
    41   glDisable(GL_LIGHTING);
    42   glDisable(GL_TEXTURE_2D);
    43   glDisable(GL_BLEND);
    44   glLineWidth(2.0);
    45   glTranslatef ( track->getTrackNode()->getAbsCoor ().x,
    46                 track->getTrackNode()->getAbsCoor ().y,
    47                 track->getTrackNode()->getAbsCoor ().z);
    48   Vector tmpRot = track->getTrackNode()->getAbsDir().getSpacialAxis();
    49   glRotatef (track->getTrackNode()->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    50 
    51 
    52   glColor3f(1.0, 1.0, 0.0);
    53   glBegin(GL_LINE_STRIP);
    54     glVertex3f(0, height_2, width_2);
    55     glVertex3f(0, -height_2, width_2);
    56     glVertex3f(0, -height_2, -width_2);
    57     glVertex3f(0, height_2, -width_2);
    58     glVertex3f(0, height_2, width_2);
    59   glEnd();
    60 
    61   glColor3f(1.0, 0.0, 0.0 );
    62   glBegin(GL_LINE_STRIP);
    63     glVertex3f(depth, height_2 * stretch, width_2 * stretch);
    64     glVertex3f(depth, -height_2 * stretch, width_2 * stretch);
    65     glVertex3f(depth, -height_2 * stretch, -width_2 * stretch);
    66     glVertex3f(depth, height_2 * stretch, -width_2 * stretch);
    67     glVertex3f(depth, height_2 * stretch, width_2 * stretch);
    68   glEnd();
    69 
    70   glBegin(GL_LINE_STRIP);
    71     glVertex3f(depth, height_2 * stretch, width_2 * stretch);
    72     glVertex3f(0, height_2, width_2);
    73     glVertex3f(0, -height_2, width_2);
    74     glVertex3f(depth, -height_2 * stretch, width_2 * stretch);
    75   glEnd();
    76 
    77   glBegin(GL_LINE_STRIP);
    78     glVertex3f(depth, height_2 * stretch, -width_2 * stretch);
    79     glVertex3f(0, height_2, -width_2);
    80     glVertex3f(0, -height_2, -width_2);
    81     glVertex3f(depth, -height_2 * stretch, -width_2 * stretch);
    82   glEnd();
    83 
    84   glPopAttrib();
    85   glPopMatrix();
     36//   glMatrixMode(GL_MODELVIEW);
     37//   glPushMatrix();
     38//
     39//   glPushAttrib(GL_ENABLE_BIT);
     40//
     41//   glDisable(GL_LIGHTING);
     42//   glDisable(GL_TEXTURE_2D);
     43//   glDisable(GL_BLEND);
     44//   glLineWidth(2.0);
     45//   glTranslatef ( track->getTrackNode()->getAbsCoor ().x,
     46//                 track->getTrackNode()->getAbsCoor ().y,
     47//                 track->getTrackNode()->getAbsCoor ().z);
     48//   Vector tmpRot = track->getTrackNode()->getAbsDir().getSpacialAxis();
     49//   glRotatef (track->getTrackNode()->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     50//
     51//
     52//   glColor3f(1.0, 1.0, 0.0);
     53//   glBegin(GL_LINE_STRIP);
     54//     glVertex3f(0, height_2, width_2);
     55//     glVertex3f(0, -height_2, width_2);
     56//     glVertex3f(0, -height_2, -width_2);
     57//     glVertex3f(0, height_2, -width_2);
     58//     glVertex3f(0, height_2, width_2);
     59//   glEnd();
     60//
     61//   glColor3f(1.0, 0.0, 0.0 );
     62//   glBegin(GL_LINE_STRIP);
     63//     glVertex3f(depth, height_2 * stretch, width_2 * stretch);
     64//     glVertex3f(depth, -height_2 * stretch, width_2 * stretch);
     65//     glVertex3f(depth, -height_2 * stretch, -width_2 * stretch);
     66//     glVertex3f(depth, height_2 * stretch, -width_2 * stretch);
     67//     glVertex3f(depth, height_2 * stretch, width_2 * stretch);
     68//   glEnd();
     69//
     70//   glBegin(GL_LINE_STRIP);
     71//     glVertex3f(depth, height_2 * stretch, width_2 * stretch);
     72//     glVertex3f(0, height_2, width_2);
     73//     glVertex3f(0, -height_2, width_2);
     74//     glVertex3f(depth, -height_2 * stretch, width_2 * stretch);
     75//   glEnd();
     76//
     77//   glBegin(GL_LINE_STRIP);
     78//     glVertex3f(depth, height_2 * stretch, -width_2 * stretch);
     79//     glVertex3f(0, height_2, -width_2);
     80//     glVertex3f(0, -height_2, -width_2);
     81//     glVertex3f(depth, -height_2 * stretch, -width_2 * stretch);
     82//   glEnd();
     83//
     84//   glPopAttrib();
     85//   glPopMatrix();
    8686}
    8787
Note: See TracChangeset for help on using the changeset viewer.