Changeset 2787 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp
- Timestamp:
- 06/20/08 04:34:24 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp
r2782 r2787 29 29 mDirection.Normalize(); 30 30 31 //Vector3 side = CrossProd(Vector3(0, 1, 0), mDirection); 32 Vector3 side = CrossProd(Vector3(0, 0, 1), mDirection); 33 31 /*Vector3 side = CrossProd(Vector3(0, 0, 1), mDirection); 34 32 mUp = -Normalize(CrossProd(side, mDirection)); 35 mRight = -Normalize(CrossProd(mDirection, mUp)); 36 37 /*float k = tan(mFovy/2);38 m Up *= k;39 m Right *= k*mWidth/mHeight;*/33 mRight = -Normalize(CrossProd(mDirection, mUp));*/ 34 35 mUp = Vector3(0, 0, 1); 36 mRight = -CrossProd(mDirection, mUp); 37 mUp = -Normalize(CrossProd(mRight, mDirection)); 40 38 } 41 39 … … 179 177 const float w_far = h_far * GetAspect(); 180 178 179 //const Vector3 view = mDirection; 181 180 const Vector3 view = mDirection; 182 181 const Vector3 fc = mPosition + view * z_far; 183 182 184 183 const Vector3 up = mUp; 185 186 184 const Vector3 right = mRight; 187 185
Note: See TracChangeset
for help on using the changeset viewer.