Changeset 2779 for GTP


Ignore:
Timestamp:
06/19/08 18:26:29 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/CHC_revisited
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/CHC_revisited/Camera.cpp

    r2778 r2779  
    5353        mBaseOrientation = Matrix4x4(right, up, direction); 
    5454        mViewOrientation = mBaseOrientation; 
     55        cout<<"view: " << direction << " right: " << right << " up " << up << endl; 
    5556} 
    5657 
     
    146147void Camera::SetupCameraView() 
    147148{ 
    148 #if 1 
    149         //Matrix4x4 viewOrientation(mRight, mDirection, mUp); 
    150         //Matrix4x4 viewOrientation(mRight, mUp, mDirection); 
    151         Matrix4x4 tview = mViewOrientation; 
    152  
    153         //Vector3 pos = tview * mPosition; 
     149        Matrix4x4 viewOrientation = mViewOrientation; 
    154150        Vector3 pos = -mPosition; 
    155         pos = tview * pos; 
    156  
    157         Debug << "vieworient:\n" << mViewOrientation << " pos " << pos << " position " << mPosition << endl; 
    158  
    159         Matrix4x4 viewOrientation = mViewOrientation; 
     151        pos = mViewOrientation * pos; 
    160152 
    161153        viewOrientation.x[3][0] = pos.x; 
     
    165157        glLoadIdentity(); 
    166158        glMultMatrixf((float *)viewOrientation.x); 
    167         //glMultMatrixf((float *)tm.x); 
    168         Debug << "matrix:\n" << viewOrientation << endl; 
    169 #else 
    170         glLoadIdentity(); 
    171  
    172         gluLookAt(mPosition.x, mPosition.y, mPosition.z, 
    173                   mPosition.x + mDirection.x, mPosition.y + mDirection.y, mPosition.z + mDirection.z,  
    174                           mUp.x, mUp.y, mUp.z); 
    175 #endif 
    176         //std::cout << "dir: " << mDirection << " pos: " << mPosition << " up: " << mUp << std::endl; 
    177159} 
    178160 
  • GTP/trunk/App/Demos/Vis/CHC_revisited/chcdemo.cpp

    r2778 r2779  
    295295                break; 
    296296        case RenderTraverser::CHC: 
     297                cout << "using chc" << endl; 
    297298                traverser = new CHCTraverser(); 
    298299                break; 
Note: See TracChangeset for help on using the changeset viewer.