Ignore:
Timestamp:
Oct 16, 2013, 8:02:40 PM (11 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
projectionDesigner/trunk/projdesigner/src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • projectionDesigner/trunk/projdesigner/src/gui/QDesignViewWidget.cpp

    r4 r433  
    7171    {
    7272        glPushMatrix();
    73         glMultMatrixf(invert(m_pModel->getScene()->getCameraMatrix()).getData());
     73
     74        //
     75        // Sigh: Too clever. Split this line in two. [ben 27Sep13]
     76        // glMultMatrixf(invert(m_pModel->getScene()->getCameraMatrix()).getData());
     77        //
     78        gmtl::Matrix<float, 4u, 4u> a = m_pModel->getScene()->getCameraMatrix();
     79        glMultMatrixf(invert(a).getData());
     80
     81
    7482        m_pModel->getScene()->draw();
    7583        glPopMatrix();
     
    181189            setView(Vec3f(), Quatf(), 0.0f);
    182190            break;
     191        //
     192        // Handle Missing Cases. Not sure. Maybe do nothing, or do FRONT mode?
     193        // [ben 27Sep13]
     194        //
     195        case DESIGN_VIEWMODE_PERSPECTIVE:
     196        case DESIGN_VIEWMODE_CENTER:
     197        default:
     198            // setView(Vec3f(), Quatf(), 0.0f);
     199            break;;
    183200        }
    184201        setPerspective(false);
  • projectionDesigner/trunk/projdesigner/src/gui/QGLViewerWidget.cpp

    r4 r433  
    11#include <float.h>
    22#include <QMouseEvent>
     3
     4#include <GL/glu.h>     // Added! for gluPerspective() call. [ben 27Sep13]
    35
    46#include "gui/QGLViewerWidget.h"
     
    213215    glEnable(GL_LIGHT0);
    214216    Vec3f pos = Vec3f(1.0f, 1.0f, 1.0f);
    215     if (!_isnan(m_rot[0]))
     217    if (!isnan(m_rot[0]))
    216218        pos = m_rot * pos;
    217219    GLfloat lposition[] = { pos[0], pos[1], pos[2], 0.0f };
     
    379381            make<Quatf>(AxisAnglef(-m_animY*delta, Vec3f(1.0f, 0.0f, 0.0f)));
    380382        Quatf rot = m_rot * deltaRot;
    381         if (!_isnan(rot[0]))
     383        if (!isnan(rot[0]))
    382384            setView(m_center, rot, m_distance);
    383385        m_lastTime = QTime::currentTime();
Note: See TracChangeset for help on using the changeset viewer.