/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
#ifndef CAMERA_H
#define CAMERA_H

#include <glew/glew.h>
#include <glm/glm.hpp>

class CPhysicalCamera
{
public:
    glm::vec3 vEye, vView, vUp;
    double fSpeed;
    double fPreTime;
    glm::vec3 vSpeed;
    double fSetTime;
    double fTotalMoveTime;
    bool bRoate_camera_flag;
    bool bMove_camera_flag;
    double fSensitivity;
    glm::mat4 m_rotate;
    double fRotationAngleCube , fRotationAnglePyramid;
    double fCubeRotationSpeed , fPyramidRotationSpeed;
    double PIover180;
    double flength;

    glm::mat4 Look();
    void rotateCamera(double horizontal, double vertical,
        double planar, double time);
    void moveCamera(double x, double y, double z,
        double time);
    void SetRotationAngle(double fRotateCube = 0.0f, double fRotatePyramid = 0.0f,
        double fCubeRotateSpeed = 0.0f,double fPyramidRotateSpeed = 0.0f);
    float GetAngleY();
    glm::mat4 getModelViewMatrix(glm::mat4* pMatrix);
    CPhysicalCamera();
    CPhysicalCamera(glm::vec3 a_vEye, glm::vec3 a_vView, glm::vec3 a_vUp,
        double a_fSpeed = 25.0f, double a_fSensitivity =0.1f);
private:
    int iForw, iBack, iLeft, iRight;
};

#endif