33#include <utility/graphic/view.hpp>
34#include <utility/graphic/mesh.hpp>
35#include <utility/graphic/model.hpp>
36#include <utility/graphic/size.hpp>
39#include <utility/math/vector.hpp>
41#include <utility/event/event.hpp>
59 utility::logging::DefaultLogger>
73 std::function<void(std::shared_ptr<utility::event::Event> &)>;
77 bool _shouldCaptureViewportInput {
134 const std::string &materialName) = 0;
167 addModel(std::shared_ptr<utility::graphic::Model> model) = 0;
215 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 size_t addText(utility::graphic::Text text)=0
Add a text element to the engine at a specified pose.
virtual size_t addMesh(const utility::graphic::Mesh &mesh, const std::string &materialName)=0
Add a mesh to the engine.
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 size_t addModel(std::shared_ptr< utility::graphic::Model > model)=0
Add a model to the engine for rendering.
virtual void addScene(size_t sceneIndex)=0
Add a scene to the engine.
virtual void present(void)=0
Present the composed back buffer to the screen.
virtual bool removeObject(size_t objectID)=0
Remove a previously added render object.
virtual utility::graphic::ViewF getView(void) const =0
Get the full view model.
virtual void pollEvents(void)=0
Poll for events and dispatch them.
The Mesh class represents a 3D mesh used for rendering in a graphics application.
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.
Text rendering properties and storage.