1 #ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
2 #define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
4 #include "./raylib.hpp"
5 #include "./Vector2.hpp"
6 #include "./raylib-cpp-utils.hpp"
20 float rotation = 0.0f,
float zoom = 1.0f) :
::Camera2D{offset, target, rotation, zoom} {}
34 GETTERSETTER(
float, Rotation, rotation)
35 GETTERSETTER(
float, Zoom, zoom)
46 return ::GetCameraMatrix2D(*
this);
53 return ::GetWorldToScreen2D(position, *
this);
60 return ::GetScreenToWorld2D(position, *
this);
64 inline void set(const ::Camera2D& camera) {
65 offset = camera.offset;
66 target = camera.target;
67 rotation = camera.rotation;
73 #endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_