#ifndef ICAMERA_VIEW_HPP_
#define ICAMERA_VIEW_HPP_

#include <Entity/PhysicsEntity/PhysicsEntity.hpp>
#include <Utilities/FixedPoint.hpp>
#include <World/IWorldActor.hpp>

/**
 * @brief Represents entities which can be used to view the world.
 */
class CameraEntity : public PhysicsEntity, public IWorldActor
{
public:
    float phi, theta;

    CameraEntity(
        World &world,
        std::string typeId,
        uint64_t id,
        glm::dvec3 pos = glm::dvec3(0.0f, 0.0f, 60.0f),
        glm::vec3 vel = glm::vec3(0.0f)
    );

    /**
     * @brief Gets the transform of the skybox.
     * @return the skybox transform
     */
    glm::mat4 getSkyboxTransform();

    /**
     * @brief Returns which side of blocks the camera is mostly facing in 2D.
     * 
     * This will be a side on the XY plane.
     */
    virtual Side getSideFacing2D() override;

    /**
     * @brief Get the position of the camera's center.
     */
    virtual wfvec3 getEyePos() = 0;

    /**
     * @brief Gets the view matrix of the camera.
     */
    virtual glm::mat4 getCameraTransform();

    virtual bool isUsingItemDirectly() override;
};

#endif