#ifndef CAMERA_HPP_INCLUDED #define CAMERA_HPP_INCLUDED #include "../../Core/Types/Tile.hpp" #include namespace Camera { 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 */ std::int32_t GetX(); /** * @brief Returns the cameras Z * * @return Camera Z */ std::int32_t GetY(); /** * @brief Returns the cameras Z * * @return Camera Z */ std::int32_t GetZ(); /** * @brief Returns the cameras Yaw * * @return Camera Yaw */ std::int32_t GetYaw(); /** * @brief Returns the camera/compass angle in degrees * * @return the camera/compass angle in degrees */ double GetAngle(); /** * @brief Returns the camera pitch * * @return the camera pitch */ std::int32_t GetPitch(); /** * @brief Returns the camera zoom as a percentage * * @return the camera zoom as a percentage (0.00 - 1.00) */ double GetZoom(); /** * @brief Rotates the camera to the passed angle/degree * * @param Angle or degree * @return true if it rotates within (+/-) 10 of the passed angle */ bool RotateTo(std::int32_t Angle, std::int32_t Tolerance = 10); /** * @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 */ bool RotateTo(COMPASS_DIRECTION Direction, std::int32_t Tolerance = 10); /** * @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 */ bool RotateTo(const Tile& T, std::int32_t Angle = 0, std::int32_t Tolerance = 10); /** * @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 */ bool RotateTo(const Tile& T, COMPASS_DIRECTION Direction = NORTH, std::int32_t Tolerance = 10); /** * @brief Sets the pitch of the camera * * @param Pitch desired pitch * @return true if the camera sets the pitch (+/-) 10 of the passed pitch */ 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 */ bool SetPitch(CAMERA_PITCH Pitch); } #endif // CAMERA_HPP_INCLUDED