28 virtual void set(
const glm::vec3& eyepos,
29 const glm::vec3& look = glm::vec3(0, 0, 0),
30 const glm::vec3& up = glm::vec3(0, 1, 0));
34 virtual const glm::mat4& viewMatrix()
const;
36 virtual const glm::vec3& position()
const;
37 virtual const glm::vec3& look()
const;
38 virtual const glm::vec3& up()
const;
39 virtual const glm::vec3& backward()
const;
40 virtual const glm::vec3& right()
const;
41 virtual float heading()
const;
42 virtual float pitch()
const;
47 void onMouseMotion(
int x,
int y);
49 void onMouseButton(
int button,
int state,
int x,
int y);
50 void onKeyboard(
int key,
int scancode,
int action,
int mods);
51 void onScroll(
float dx,
float dy);
56 void moveLeft(
float scale = 1.0);
58 void moveRight(
float scale = 1.0);
59 void moveUp(
float scale = 1.0);
60 void moveDown(
float scale = 1.0);
61 void moveForward(
float scale = 1.0);
62 void moveBack(
float scale = 1.0);
64 void turnLeft(
float scale = 1.0);
65 void turnRight(
float scale = 1.0);
66 void turnUp(
float scale = 1.0);
67 void turnDown(
float scale = 1.0);
69 void orbitLeft(
float scale = 1.0);
70 void orbitRight(
float scale = 1.0);
71 void orbitUp(
float scale = 1.0);
72 void orbitDown(
float scale = 1.0);
74 void setTurnRate(
float rate);
75 float turnRate()
const;
77 void setMoveSpeed(
float rate);
78 float moveSpeed()
const;
82 virtual void turn(glm::vec3* v, glm::vec3* n,
float amount);
83 virtual void move(
float dU,
float dV,
float dN);
84 virtual void orbit(
float h,
float p);
86 virtual void _set(
const glm::vec3& eyepos,
87 const glm::vec3& look,
91 float mSpeed, mTurnRate;
93 glm::vec3 mEye, mLook, mUp;
94 float mHeading, mPitch, mRadius;
95 glm::vec3 mResetEye, mResetLook, mResetUp;
103 glm::mat4 mCameraMatrix;
106 mutable int mLastX, mLastY;
112 #endif // AGL_CAMERA_H_