6#include <aegis2d/render/export.hpp>
48 void follow(
Vec2 target) noexcept;
52 [[nodiscard]]
Vec2 center() const noexcept;
57 void set_zoom(
float zoom);
61 [[nodiscard]]
float zoom() const noexcept;
67 void set_bounds(const
std::optional<
Rect>& bounds);
71 [[nodiscard]] const
std::optional<
Rect>& bounds() const noexcept;
76 void set_shake(
Vec2 offset) noexcept;
80 [[nodiscard]]
Vec2 shake() const noexcept;
84 [[nodiscard]]
Rect visible() const noexcept;
89 [[nodiscard]]
Vec2 to_screen(
Vec2 world) const noexcept;
94 [[nodiscard]]
Vec2 to_world(
Vec2 screen) const noexcept;
99 [[nodiscard]]
Sprite to_screen(const
Sprite& sprite) const noexcept;
102 void clamp() noexcept;
The part of the world shown on screen: where it looks, how close, within which bounds.
Definition camera.hpp:31
Vec2 view() const noexcept
Size of the view on screen.
Camera(Vec2 view)
Creates a camera looking at the middle of a view-sized world, at zoom 1.
Vector and matrix types of the engine (GLM behind engine names).
OpenGL renderer: sprites, text and camera (client only).
Definition bitmap_font.hpp:16
aegis2d::Vec2 Vec2
2D vector of floats, in logical pixels: the engine-wide aegis2d::Vec2.
Definition renderer.hpp:17
Definition endpoint.hpp:85
Backend-independent renderer interface and the sprite it draws.
Axis-aligned rectangle.
Definition renderer.hpp:20
One textured quad to draw.
Definition renderer.hpp:46