Ignore:
Timestamp:
May 15, 2015, 9:52:06 PM (4 years ago)
Author:
ldelgass
Message:

Remove old axis from nanovis

Location:
nanovis/branches/1.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.2

  • nanovis/branches/1.2/nanovis.cpp

    r5500 r5523  
    6868bool NanoVis::redrawPending = false;
    6969bool NanoVis::debugFlag = false;
    70 bool NanoVis::axisOn = true;
    7170
    7271int NanoVis::winWidth = NPIX;
     
    595594    licRenderer = new LIC();
    596595
    597 #ifdef USE_ORIENTATION_INDICATOR
    598596    orientationIndicator = new OrientationIndicator();
    599 #endif
    600597
    601598    grid = new Grid();
     
    607604
    608605    return true;
    609 }
    610 
    611 void
    612 NanoVis::draw3dAxis()
    613 {
    614     if (!axisOn)
    615         return;
    616 
    617     glPushAttrib(GL_ENABLE_BIT);
    618 
    619     glDisable(GL_TEXTURE_2D);
    620     glEnable(GL_DEPTH_TEST);
    621     glEnable(GL_COLOR_MATERIAL);
    622     glDisable(GL_BLEND);
    623 
    624     //draw axes
    625     GLUquadric *obj;
    626 
    627     obj = gluNewQuadric();
    628 
    629     int segments = 50;
    630 
    631     glColor3f(0.8, 0.8, 0.8);
    632     glPushMatrix();
    633     glTranslatef(0.4, 0., 0.);
    634     glRotatef(90, 1, 0, 0);
    635     glRotatef(180, 0, 1, 0);
    636     glScalef(0.0005, 0.0005, 0.0005);
    637     glutStrokeCharacter(GLUT_STROKE_ROMAN, 'x');
    638     glPopMatrix();
    639 
    640     glPushMatrix();
    641     glTranslatef(0., 0.4, 0.);
    642     glRotatef(90, 1, 0, 0);
    643     glRotatef(180, 0, 1, 0);
    644     glScalef(0.0005, 0.0005, 0.0005);
    645     glutStrokeCharacter(GLUT_STROKE_ROMAN, 'y');
    646     glPopMatrix();
    647 
    648     glPushMatrix();
    649     glTranslatef(0., 0., 0.4);
    650     glRotatef(90, 1, 0, 0);
    651     glRotatef(180, 0, 1, 0);
    652     glScalef(0.0005, 0.0005, 0.0005);
    653     glutStrokeCharacter(GLUT_STROKE_ROMAN, 'z');
    654     glPopMatrix();
    655 
    656     glEnable(GL_LIGHTING);
    657     glEnable(GL_LIGHT0);
    658 
    659     //glColor3f(0.2, 0.2, 0.8);
    660     glPushMatrix();
    661     glutSolidSphere(0.02, segments, segments );
    662     glPopMatrix();
    663 
    664     glPushMatrix();
    665     glRotatef(-90, 1, 0, 0);
    666     gluCylinder(obj, 0.01, 0.01, 0.3, segments, segments);
    667     glPopMatrix();
    668 
    669     glPushMatrix();
    670     glTranslatef(0., 0.3, 0.);
    671     glRotatef(-90, 1, 0, 0);
    672     gluCylinder(obj, 0.02, 0.0, 0.06, segments, segments);
    673     glPopMatrix();
    674 
    675     glPushMatrix();
    676     glRotatef(90, 0, 1, 0);
    677     gluCylinder(obj, 0.01, 0.01, 0.3, segments, segments);
    678     glPopMatrix();
    679 
    680     glPushMatrix();
    681     glTranslatef(0.3, 0., 0.);
    682     glRotatef(90, 0, 1, 0);
    683     gluCylinder(obj, 0.02, 0.0, 0.06, segments, segments);
    684     glPopMatrix();
    685 
    686     glPushMatrix();
    687     gluCylinder(obj, 0.01, 0.01, 0.3, segments, segments);
    688     glPopMatrix();
    689 
    690     glPushMatrix();
    691     glTranslatef(0., 0., 0.3);
    692     gluCylinder(obj, 0.02, 0.0, 0.06, segments, segments);
    693     glPopMatrix();
    694 
    695     gluDeleteQuadric(obj);
    696 
    697     glPopAttrib();
    698606}
    699607
     
    11521060
    11531061    // Now render things in the scene
    1154 #ifdef USE_ORIENTATION_INDICATOR
    1155     orientationIndicator->setPosition(sceneBounds.getCenter());
    1156     orientationIndicator->setScale(sceneBounds.getSize());
     1062    //orientationIndicator->setPosition(sceneBounds.getCenter());
     1063    //orientationIndicator->setScale(sceneBounds.getSize());
    11571064    orientationIndicator->render();
    1158 #else
    1159     draw3dAxis();
    1160 #endif
    11611065
    11621066    grid->render();
Note: See TracChangeset for help on using the changeset viewer.