Changeset 2893 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp
- Timestamp:
- 09/02/08 00:56:48 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp
r2891 r2893 86 86 void Camera::GetModelViewMatrix(Matrix4x4 &mat) 87 87 { 88 glGetFloatv(GL_MODELVIEW_MATRIX, (float *)mat.x); 88 mat = mViewOrientation; 89 90 Vector3 pos = mViewOrientation * -mPosition; 91 92 mat.x[3][0] = pos.x; 93 mat.x[3][1] = pos.y; 94 mat.x[3][2] = pos.z; 95 96 //glGetFloatv(GL_MODELVIEW_MATRIX, (float *)mat.x); 89 97 } 90 98 … … 154 162 void Camera::SetupCameraView() 155 163 { 156 Matrix4x4 tview = mViewOrientation;157 158 Vector3 pos = -mPosition;159 pos = tview * pos;160 161 164 Matrix4x4 viewOrientation = mViewOrientation; 165 166 Vector3 pos = mViewOrientation * -mPosition; 162 167 163 168 viewOrientation.x[3][0] = pos.x;
Note: See TracChangeset
for help on using the changeset viewer.