Added getters for camera properties
Added world translation for camera Renamed previous translation to local_translate
This commit is contained in:
parent
9a52587149
commit
9568b54b87
3 changed files with 34 additions and 8 deletions
|
@ -15,9 +15,12 @@ class Camera {
|
|||
public:
|
||||
Camera(const Vec3d& eye_pos,const Vec3d& look_direction,const Vec3d& up_vector);
|
||||
|
||||
/// Translates the camera according to the world axises.
|
||||
/// \param translation Translation in the world coordinates system.
|
||||
void translate(const Vec3d& translation);
|
||||
/// Translates the camera relative to its current position and look direction.
|
||||
/// \param translation Translation where x is pointing in the direction of vision.
|
||||
void translate(const Vec3d& translation);
|
||||
void local_translate(const Vec3d& translation);
|
||||
/// Rotates the gaze around its local x and z but around global y, relatively to the current orientation.
|
||||
/// This is to provide a coherent movement in regards to mouse movement.
|
||||
/// \param rotation Angles are radians to rotate about each axis.
|
||||
|
@ -27,6 +30,10 @@ public:
|
|||
void look();
|
||||
|
||||
void set_position(const Vec3d& eye_pos);
|
||||
|
||||
const Vec3d& get_eyepos() const;
|
||||
const Vec3d& get_gaze() const;
|
||||
const Vec3d& get_gazeup() const;
|
||||
private:
|
||||
Vec3d eye;
|
||||
Vec3d gaze;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue