Ignore:
Timestamp:
08/31/08 15:27:31 (16 years ago)
Author:
mattausch
Message:

corrected views

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2887 r2888  
    330330        camera = new Camera(winWidth, winHeight, fov); 
    331331        camera->SetNear(nearDist); 
    332          
     332        camera->SetFar(1000); 
     333 
    333334        cout << "here2 " << Normalize(camDir) << endl; 
    334335 
    335336        camera->SetDirection(camDir); 
     337 
    336338        cout << "here3 " << camera->GetDirection() << endl; 
     339        cout << "here3 " << camera->GetRightVector() << endl; 
     340        cout << "here3 " << camera->GetUpVector() << endl; 
     341 
    337342        camera->SetPosition(camPos); 
    338343 
     
    829834void KeyHorizontalMotion(float shift) 
    830835{ 
    831         Vector3 hvec = camera->GetDirection(); 
     836        Vector3 hvec = -camera->GetDirection(); 
    832837        hvec.z = 0; 
    833838 
     
    13751380        camera->Pitch(eyeXAngle); 
    13761381 
    1377         pos -= horView * (yMotionBegin - y) * 0.2f; 
     1382        pos += horView * (yMotionBegin - y) * 0.2f; 
    13781383         
    13791384        camera->SetPosition(pos); 
     
    14171422        rVec = rot * rVec; 
    14181423         
    1419         pos += rVec * (x - horizontalMotionBegin) * 0.1f; 
     1424        pos -= rVec * (x - horizontalMotionBegin) * 0.1f; 
    14201425        pos[2] += (verticalMotionBegin - y) * 0.1f; 
    14211426 
     
    15391544        glClear(GL_DEPTH_BUFFER_BIT); 
    15401545 
     1546 
    15411547        //////////// 
    15421548        //-- visualization of the occlusion culling 
     
    15441550        visualization->Render(); 
    15451551 
     1552        // coordinates 
    15461553        glColor3f(0.0f, 1.0f, 0.0f); 
    15471554        glBegin(GL_LINES); 
Note: See TracChangeset for help on using the changeset viewer.