utility
2026.2.0
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
14
#include <
utility/graphic/color.hpp
>
15
#include <utility/graphic/pose.hpp>
16
#include <utility/graphic/mesh.hpp>
17
18
namespace
utility::graphic
19
{
31
class
Renderable
32
{
33
public
:
34
35
enum class
RenderableType
{
36
Unknown
= 0,
37
Model
= 1,
38
Text
= 3,
39
Mesh
= 4,
40
};
41
49
Renderable
(
const
PoseF
&pose,
const
Color32Bit
&color);
50
54
virtual
~Renderable
() =
default
;
55
63
Renderable
&
setPose
(
const
PoseF
&pose);
64
70
void
setPose
(
PoseF
&&pose);
71
77
const
PoseF
&
getPose
(
void
)
const
;
78
89
[[nodiscard]] glm::mat4
getModelMatrix
(
void
)
const
;
90
98
Renderable
&
setColor
(
const
graphic::Color32Bit
&color);
99
105
void
setColor
(
graphic::Color32Bit
&&color);
106
112
const
graphic::Color32Bit
&
getColor
(
void
)
const
;
113
128
[[nodiscard]] std::vector<std::shared_ptr<Mesh>>
getMeshes
()
const
;
129
142
virtual
RenderableType
getRenderableType
()
const
= 0;
143
148
virtual
std::string
getMaterialName
()
const
= 0;
149
150
protected
:
151
std::vector<std::shared_ptr<Mesh>>
152
_meshes
;
153
Color32Bit
_color
;
154
PoseF
_pose
;
155
};
156
}
// namespace utility::graphic
utility::graphic::Color< std::uint8_t >
utility::graphic::Mesh
The Mesh class represents a 3D mesh used for rendering in a graphics application.
Definition
mesh.hpp:25
utility::graphic::Model
The Model class represents a 3D model in the graphics application.
Definition
model.hpp:41
utility::graphic::Pose< float >
utility::graphic::Renderable
The Renderable class represents an object that can be rendered in the graphics application.
Definition
renderable.hpp:32
utility::graphic::Renderable::getModelMatrix
glm::mat4 getModelMatrix(void) const
Get the object-to-world model matrix of this renderable.
Definition
renderable.cpp:33
utility::graphic::Renderable::_meshes
std::vector< std::shared_ptr< Mesh > > _meshes
Meshes associated with this renderable object.
Definition
renderable.hpp:152
utility::graphic::Renderable::_pose
PoseF _pose
World pose (position and orientation) of the text.
Definition
renderable.hpp:154
utility::graphic::Renderable::RenderableType
RenderableType
Definition
renderable.hpp:35
utility::graphic::Renderable::RenderableType::Unknown
@ Unknown
utility::graphic::Renderable::setPose
Renderable & setPose(const PoseF &pose)
Set the text pose.
Definition
renderable.cpp:47
utility::graphic::Renderable::getPose
const PoseF & getPose(void) const
Get the text pose.
Definition
renderable.cpp:23
utility::graphic::Renderable::getColor
const graphic::Color32Bit & getColor(void) const
Get the text color.].
Definition
renderable.cpp:28
utility::graphic::Renderable::getMeshes
std::vector< std::shared_ptr< Mesh > > getMeshes() const
Get the meshes associated with this renderable object.
Definition
renderable.cpp:38
utility::graphic::Renderable::getRenderableType
virtual RenderableType getRenderableType() const =0
Get the type of this renderable object.
utility::graphic::Renderable::~Renderable
virtual ~Renderable()=default
Virtual destructor for Renderable.
utility::graphic::Renderable::_color
Color32Bit _color
Text RGBA color.
Definition
renderable.hpp:153
utility::graphic::Renderable::getMaterialName
virtual std::string getMaterialName() const =0
Get the material name.
utility::graphic::Renderable::setColor
Renderable & setColor(const graphic::Color32Bit &color)
Set the text color.
Definition
renderable.cpp:58
utility::graphic::Text
Storage for text content and rendering properties.
Definition
text.hpp:75
color.hpp
RGBA color representation with blending and manipulation operations.
headers
utility
graphic
renderable.hpp
Generated by
1.9.8