1#ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
2#define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
4#include "./Vector2.hpp"
6#include "./RadiansDegrees.hpp"
7#include "./raylib-cpp-utils.hpp"
17 : ::Camera2D(camera) {
22 Camera2D(::Vector2 offset, ::Vector2 target,
23 Degree rotation = 0.0f,
float zoom = 1.0f) : ::Camera2D{offset, target, rotation, zoom} {}
35 GETTERSETTER(::Vector2, Offset, offset)
37 GETTERSETTER(
Degree, Rotation, rotation)
38 GETTERSETTER(
float, Zoom, zoom)
60 void set(const ::Camera2D& camera) {
61 offset = camera.offset;
62 target = camera.target;
63 rotation = camera.rotation;
Camera2D type, defines a 2d camera.
Vector2 GetScreenToWorld(::Vector2 position) const
Returns the world space position for a 2d camera screen space position.
Matrix GetMatrix() const
Returns camera 2d transform matrix.
Vector2 GetWorldToScreen(::Vector2 position) const
Returns the screen space position for a 2d world space position.
Degree type (allows automatic worry free conversion between radians and degrees)
Matrix type (OpenGL style 4x4 - right handed, column major)
All raylib-cpp classes and functions appear in the raylib namespace.