utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
renderable.hpp
1/*
2** ETIB PROJECT, 2026
3** xider
4** File description:
5** renderable
6*/
7
8#pragma once
9
10#include <memory>
11
12#include <glm/mat4x4.hpp>
13
15#include <utility/graphic/pose.hpp>
16#include <utility/graphic/mesh.hpp>
17
18namespace utility::graphic
19{
32 {
33 public:
41 Renderable(const PoseF &pose, const Color32Bit &color);
42
46 virtual ~Renderable() = default;
47
55 Renderable &setPose(const PoseF &pose);
56
62 void setPose(PoseF &&pose);
63
69 const PoseF &getPose(void) const;
70
81 [[nodiscard]] glm::mat4 getModelMatrix(void) const;
82
91
97 void setColor(graphic::Color32Bit &&color);
98
104 const graphic::Color32Bit &getColor(void) const;
105
120 [[nodiscard]] std::vector<std::shared_ptr<Mesh>> getMeshes() const;
121
122 protected:
123 std::vector<std::shared_ptr<Mesh>>
127 };
128} // namespace utility::graphic
The Renderable class represents an object that can be rendered in the graphics application.
glm::mat4 getModelMatrix(void) const
Get the object-to-world model matrix of this renderable.
std::vector< std::shared_ptr< Mesh > > _meshes
Meshes associated with this renderable object.
PoseF _pose
World pose (position and orientation) of the text.
Renderable & setPose(const PoseF &pose)
Set the text pose.
const PoseF & getPose(void) const
Get the text pose.
const graphic::Color32Bit & getColor(void) const
Get the text color.].
std::vector< std::shared_ptr< Mesh > > getMeshes() const
Get the meshes associated with this renderable object.
virtual ~Renderable()=default
Virtual destructor for Renderable.
Color32Bit _color
Text RGBA color.
Renderable & setColor(const graphic::Color32Bit &color)
Set the text color.
RGBA color representation with blending and manipulation operations.