#include <msp/geometry/angle.h>
#include <msp/linal/vector.h>
#include "component.h"
+#include "mspgame_api.h"
+#include "setups.h"
namespace Msp::Game {
-enum class CameraScaling
-{
- ORIGINAL_SIZE,
- SCALE_TO_FIT,
- SCALE_TO_COVER,
- STRETCH_TO_FIT
-};
-
-struct CameraSetup
-{
- Geometry::Angle<float> field_of_view_y = Geometry::Angle<float>::from_degrees(60);
- LinAl::Vector<float, 2> size = { 16.0f/9.0f, 1.0f };
- float near_clip = 0.1f;
- float far_clip = 100.0f;
- CameraScaling scaling = CameraScaling::SCALE_TO_FIT;
- std::string sequence_name;
-};
-
struct CameraData
{
Geometry::Angle<float> fov_y;
float get_aspect() const { return size.x/size.y; }
};
-class Camera: public BufferedComponent<CameraData>
+class MSPGAME_API Camera: public BufferedComponent<CameraData>
{
public:
using Setup = CameraSetup;