- Timestamp:
- 06/19/08 18:26:29 (17 years ago)
- 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 53 53 mBaseOrientation = Matrix4x4(right, up, direction); 54 54 mViewOrientation = mBaseOrientation; 55 cout<<"view: " << direction << " right: " << right << " up " << up << endl; 55 56 } 56 57 … … 146 147 void Camera::SetupCameraView() 147 148 { 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; 154 150 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; 160 152 161 153 viewOrientation.x[3][0] = pos.x; … … 165 157 glLoadIdentity(); 166 158 glMultMatrixf((float *)viewOrientation.x); 167 //glMultMatrixf((float *)tm.x);168 Debug << "matrix:\n" << viewOrientation << endl;169 #else170 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 #endif176 //std::cout << "dir: " << mDirection << " pos: " << mPosition << " up: " << mUp << std::endl;177 159 } 178 160 -
GTP/trunk/App/Demos/Vis/CHC_revisited/chcdemo.cpp
r2778 r2779 295 295 break; 296 296 case RenderTraverser::CHC: 297 cout << "using chc" << endl; 297 298 traverser = new CHCTraverser(); 298 299 break;
Note: See TracChangeset
for help on using the changeset viewer.