#ifndef CAMERA_HPP_INCLUDED
#define CAMERA_HPP_INCLUDED

#include "../../Core/Types/Tile.hpp"
#include <cstdint>

/** @addtogroup Tools
* @{ */

class Camera
{
    public:

        typedef enum COMPASS_DIRECTION
        {
            NORTH   = 0,
            EAST    = 90,
            SOUTH   = 180,
            WEST    = 270
        } COMPASS_DIRECTION;

        typedef enum CAMERA_PITCH
        {
            LOWEST  = 128,
            MIDDLE  = 191,
            HIGHEST = 383
        } CAMERA_PITCH;

        /**
         * @brief Returns the cameras X
         *
         * @return Camera X
         */
        static std::int32_t GetX();
        /**
         * @brief Returns the cameras Z
         *
         * @return Camera Z
         */
        static std::int32_t GetY();
        /**
         * @brief Returns the cameras Z
         *
         * @return Camera Z
         */
        static std::int32_t GetZ();
        /**
         * @brief Returns the cameras Yaw
         *
         * @return Camera Yaw
         */
        static std::int32_t GetYaw();

        /**
         * @brief Returns the camera/compass angle in degrees
         *
         * @return the camera/compass angle in degrees
         */
        static double GetAngle();
        /**
         * @brief Returns the camera pitch
         *
         * @return the camera pitch
         */
        static std::int32_t GetPitch();

        /**
         * @brief Rotates the camera to the passed angle/degree
         *
         * @param Angle or degree
         * @return true if it rotates within (+/-) 10 of the passed angle
         */
        static bool RotateTo(std::int32_t Angle);
        /**
         * @brief Rotates the camera to the passed direction (Camera::NORTH/EAST/SOUTH/WEST)
         *
         * @param Direction Camera::NORTH / EAST / SOUTH / WEST
         * @return true if it rotates within (+/-) 10 of the passed direction
         */
        static bool RotateTo(COMPASS_DIRECTION Direction);
        /**
         * @brief Rotates the camera to the passed tile, with an optional desired Angle
         *
         * @param T tile to rotate to
         * @param Angle optional desired angle of where the tile should be in relation to the player, defaulted to 0 or North
         * @return true if it rotates within (+/-) 10 of the passed tile and angle
         */
        static bool RotateTo(const Tile& T, std::int32_t Angle = 0);
        /**
         * @brief Rotates the camera to the passed tile, with an optional desired direction
         *
         * @param T tile to rotate to
         * @param Direction optional desired angle of where the tile should be in relation to the player (NORTH/EAST/SOUTH/WEST), defaulted to North
         * @return true if it rotates within (+/-) 10 of the passed tile and direction
         */
        static bool RotateTo(const Tile& T, COMPASS_DIRECTION Direction = NORTH);

        /**
         * @brief Sets the pitch of the camera
         *
         * @param Pitch desired pitch
         * @return true if the camera sets the pitch (+/-) 10 of the passed pitch
         */
        static bool SetPitch(std::int32_t Pitch);
        /**
         * @brief Sets the pitch of the camera
         *
         * @param Pitch desired pitch (Camera::LOWEST/MIDDLE/HIGHEST)
         * @return true if the camera sets the pitch (+/-) 10 of the passed pitch
         */
        static bool SetPitch(CAMERA_PITCH Pitch);
};

/** @} */

#endif // CAMERA_HPP_INCLUDED
