Changeset 2764 for GTP/trunk/App/Demos/Vis/CHC_revisited/Camera.cpp
- Timestamp:
- 06/17/08 03:47:02 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/CHC_revisited/Camera.cpp
r2762 r2764 29 29 mDirection.Normalize(); 30 30 31 Vector3 side = CrossProd(Vector3(0, 1, 0), mDirection); 31 //Vector3 side = CrossProd(Vector3(0, 1, 0), mDirection); 32 Vector3 side = CrossProd(Vector3(0, 0, 1), mDirection); 33 32 34 mUp = -Normalize(CrossProd(side, mDirection)); 33 35 mRight = -Normalize(CrossProd(mDirection, mUp)); 36 34 37 35 38 float k = tan(mFovy/2); … … 53 56 54 57 58 void Camera::SetNear(float nearDist) 59 { 60 mNear = nearDist; 61 } 62 63 55 64 void Camera::LookInBox(const AxisAlignedBox3 &box) 56 65 { 57 mDirection = Vector3(0, 0, 1); 66 //mDirection = Vector3(0, 0, 1); 67 mDirection = Vector3(0, 1, 0); 58 68 mPosition = box.Center(); 59 mPosition. y += 50;69 mPosition.z = box.Min(2) + 0.9f * box.Size(2); 60 70 61 71 Precompute(); … … 65 75 void Camera::LookAtBox(const AxisAlignedBox3 &box) 66 76 { 67 mDirection = Vector3(0, 0, box.Min().z - box.Max().z);77 mDirection = Vector3(0, box.Min().y - box.Max().y, 0); 68 78 mPosition = Vector3(0);//box.Max() - mDirection; 69 79
Note: See TracChangeset
for help on using the changeset viewer.