Changeset 433 for projectionDesigner


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

Legend:

Unmodified
Added
Removed
  • projectionDesigner/trunk/projdesigner/include/interfaces.h

    r4 r433  
    55#include <QWidget>
    66#include <QtXml>
     7#include <QtOpenGL/QGLWidget>   // added! [ben 27Sep13]
     8
    79//#include <QGLViewer/frame.h>
    810
  • projectionDesigner/trunk/projdesigner/main.cpp

    r4 r433  
    2929    for (int i=1; i<argc; ++i)
    3030    {
    31         if (_stricmp(argv[i], "-c") == 0 || _stricmp(argv[i], "-client") == 0)
     31        if (stricmp(argv[i], "-c") == 0 || stricmp(argv[i], "-client") == 0)
    3232            bServer = false;
    33         else if (_stricmp(argv[i], "-address") == 0 && i+1 < argc)
     33        else if (stricmp(argv[i], "-address") == 0 && i+1 < argc)
    3434            address = argv[i+1];
    35         else if ((_stricmp(argv[i], "-port") == 0 || _stricmp(argv[i], "-portno") == 0) && i+1 < argc)
     35        else if ((stricmp(argv[i], "-port") == 0 || stricmp(argv[i], "-portno") == 0) && i+1 < argc)
    3636                {
    3737            portNo = atoi(argv[i+1]);
  • projectionDesigner/trunk/projdesigner/src/Channel.cpp

    r4 r433  
    144144    glLoadIdentity();
    145145
    146     glMultMatrixf(invert(m_view.getTransformMatrix().getMatrix()).getData());
    147 
    148     glMultMatrixf(invert(m_pModel->getScene()->getCameraMatrix()).getData());
     146
     147    // HACK. These 2 lines have problems. gcc can't figure out a matching type for invert()
     148    // Split up lines and assign explicit Matrix type. Replace with 4 below. [ben 27Sep13]
     149    //
     150    // glMultMatrixf(invert(m_view.getTransformMatrix().getMatrix()).getData());
     151    //
     152    // glMultMatrixf(invert(m_pModel->getScene()->getCameraMatrix()).getData());
     153
     154    gmtl::Matrix<float, 4u, 4u> a = m_view.getTransformMatrix().getMatrix();
     155    glMultMatrixf(invert(a).getData());
     156
     157    gmtl::Matrix<float, 4u, 4u> b = m_pModel->getScene()->getCameraMatrix();
     158    glMultMatrixf(invert(b).getData());
     159
     160
    149161
    150162    m_pModel->getScene()->draw();
  • projectionDesigner/trunk/projdesigner/src/Warp.cpp

    r4 r433  
    11#include <math.h>
     2
     3#include <GL/glu.h>     // Added! for gluUnProject() calls. [ben 27Sep13]
    24
    35#include "Warp.h"
  • 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.