Changeset 2888 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 08/31/08 15:27:31 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2887 r2888 330 330 camera = new Camera(winWidth, winHeight, fov); 331 331 camera->SetNear(nearDist); 332 332 camera->SetFar(1000); 333 333 334 cout << "here2 " << Normalize(camDir) << endl; 334 335 335 336 camera->SetDirection(camDir); 337 336 338 cout << "here3 " << camera->GetDirection() << endl; 339 cout << "here3 " << camera->GetRightVector() << endl; 340 cout << "here3 " << camera->GetUpVector() << endl; 341 337 342 camera->SetPosition(camPos); 338 343 … … 829 834 void KeyHorizontalMotion(float shift) 830 835 { 831 Vector3 hvec = camera->GetDirection();836 Vector3 hvec = -camera->GetDirection(); 832 837 hvec.z = 0; 833 838 … … 1375 1380 camera->Pitch(eyeXAngle); 1376 1381 1377 pos -= horView * (yMotionBegin - y) * 0.2f;1382 pos += horView * (yMotionBegin - y) * 0.2f; 1378 1383 1379 1384 camera->SetPosition(pos); … … 1417 1422 rVec = rot * rVec; 1418 1423 1419 pos += rVec * (x - horizontalMotionBegin) * 0.1f;1424 pos -= rVec * (x - horizontalMotionBegin) * 0.1f; 1420 1425 pos[2] += (verticalMotionBegin - y) * 0.1f; 1421 1426 … … 1539 1544 glClear(GL_DEPTH_BUFFER_BIT); 1540 1545 1546 1541 1547 //////////// 1542 1548 //-- visualization of the occlusion culling … … 1544 1550 visualization->Render(); 1545 1551 1552 // coordinates 1546 1553 glColor3f(0.0f, 1.0f, 0.0f); 1547 1554 glBegin(GL_LINES);
Note: See TracChangeset
for help on using the changeset viewer.