Changeset 2796 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h
- Timestamp:
- 06/22/08 09:23:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h
r2782 r2796 20 20 { 21 21 /// the 6 clip planes 22 //float mClipPlane[6][4];23 22 Plane3 mClipPlanes[6]; 24 23 … … 30 29 Camera(int width, int height, float fieldOfView = 90.f); 31 30 32 void Precompute();33 34 void LookInBox(const AxisAlignedBox3 &box);35 36 void LookAtBox(const AxisAlignedBox3 &box);37 31 38 32 void SetPosition(const Vector3 &pos); 39 33 40 void SetDirection(const Vector3 &dir);41 42 34 inline Vector3 GetPosition() const { return mPosition; } 43 inline Vector3 GetDirection() const { return mDirection; }44 inline Vector3 GetUpVector() const { return mUp; }45 inline Vector3 GetRightVector() const { return mRight; }35 Vector3 GetDirection() const; 36 Vector3 GetUpVector() const; 37 Vector3 GetRightVector() const; 46 38 47 39 inline float GetFov() const { return mFovy; } … … 49 41 inline float GetAspect() const { return (float) mWidth / mHeight; } 50 42 43 /** Sets up viewing in gl 44 */ 51 45 void SetupCameraView(); 52 46 void GetProjectionMatrix(Matrix4x4 &mat); … … 60 54 inline float GetNear() const { return mNear; } 61 55 void SetNear(float nearDist); 56 57 inline float GetFar() const { return mFar; } 58 59 void SetFar(float farDist) { mFar = farDist; } 60 61 void SetOrtho(bool ortho); 62 63 void Yaw(float angle); 64 void Pitch(float angle); 65 62 66 63 67 64 68 protected: 65 69 70 void Precompute(const Vector3 &direction); 71 72 void CalculateFromPitchAndYaw(); 73 74 66 75 //////////////// 67 68 Vector3 mPosition; 69 Vector3 mDirection; 70 71 /// up vector takes into account the FOV at a unit distance from the origin 72 Vector3 mUp; 73 /// right vector takes into account the FOV at a unit distance from the origin 74 Vector3 mRight; 76 //-- members 75 77 76 78 float mFovy; … … 79 81 80 82 float mNear; 83 84 float mFar; 85 86 bool mIsOrtho; 87 88 Matrix4x4 mBaseOrientation; 89 Matrix4x4 mViewOrientation; 90 91 float mPitch; 92 float mYaw; 93 94 Vector3 mPosition; 81 95 }; 82 96
Note: See TracChangeset
for help on using the changeset viewer.