34#include <utility/graphic/view.hpp>
35#include <utility/graphic/mesh.hpp>
36#include <utility/graphic/model.hpp>
37#include <utility/graphic/scissor.hpp>
38#include <utility/graphic/size.hpp>
41#include <utility/math/vector.hpp>
43#include <utility/event/event.hpp>
61 utility::logging::DefaultLogger>
75 std::function<void(std::shared_ptr<utility::event::Event> &)>;
79 bool _shouldCaptureViewportInput {
82 std::optional<utility::graphic::ScissorRect> _scissor {
147 std::shared_ptr<utility::graphic::Renderable>
object) = 0;
158 size_t objectID) = 0;
169 size_t objectID) = 0;
210 std::optional<utility::graphic::ScissorRect>
getScissor(
void)
const;
246 template<
typename Type>
Engine interface combining rendering and event handling.
Engine(void)
Default constructor.
virtual void clear(void)=0
Clear the current rendering target with the drawing color.
virtual ~Engine(void)=default
Default destructor.
bool shouldCaptureViewportInput(void) const
Check if viewport input capture is enabled.
virtual utility::graphic::SizeF measureText(const utility::graphic::Text &text) const =0
Measures the pixel dimensions of a given text string when rendered with a specific font.
virtual void update(void)=0
Update the engine state.
void setEventCallback(const Handler &callback)
Set the event callback function.
Handler & getEventCallback(void)
Get the current event callback function.
void setShouldCaptureViewportInput(bool capture)
Set the viewport input capture state.
std::function< void(std::shared_ptr< utility::event::Event > &)> Handler
Type alias for an event handler callback function.
virtual float getDeltaTime(void) const
Get the time elapsed since the previous frame.
std::optional< utility::graphic::ScissorRect > getScissor(void) const
Get the active scissor (clip) rectangle.
virtual void setScissor(const utility::graphic::ScissorRect &rect)
Set the active scissor (clip) rectangle.
virtual void present(void)=0
Present the composed back buffer to the screen.
virtual size_t createObject(std::shared_ptr< utility::graphic::Renderable > object)=0
Create a new render object.
virtual utility::graphic::ViewF getView(void) const =0
Get the full view model.
virtual void clearScissor(void)
Clear the active scissor (clip) rectangle.
virtual bool removeObject(std::shared_ptr< utility::graphic::Renderable > object, size_t objectID)=0
Remove a previously added render object.
virtual bool updateObject(std::shared_ptr< utility::graphic::Renderable > object, size_t objectID)=0
Update a previously added render object.
virtual void pollEvents(void)=0
Poll for events and dispatch them.
Storage for text content and rendering properties.
3D perspective view with floating-point components.
Mixin base class providing logging capabilities to derived classes.
3D vector class inheriting from glm::vec3.
Concept to ensure a type inherits from Engine.
Platform-specific default logger alias.
Mixin class to provide logging capabilities to derived classes.
The utility namespace contains classes and functions for the utility project.
Axis-aligned scissor (clip) rectangle.
Text rendering properties and storage.