sandbox
Loading...
Searching...
No Matches
gizmo.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_SCENES_COMPONENTS_GIZMO_HPP_
3#define LIBSBX_SCENES_COMPONENTS_GIZMO_HPP_
4
6#include <libsbx/math/uuid.hpp>
7
8namespace sbx::scenes {
9
10class gizmo final {
11
12public:
13
14 gizmo(math::uuid mesh_id, std::uint32_t submesh_index, math::uuid texture_id, math::color tint = math::color::white())
15 : _mesh_id{mesh_id},
16 _submesh_index{submesh_index},
17 _texture_id{texture_id},
18 _tint{tint} { }
19
20 auto mesh_id() const noexcept -> math::uuid {
21 return _mesh_id;
22 }
23
24 auto submesh_index() const noexcept -> std::uint32_t {
25 return _submesh_index;
26 }
27
28 auto texture_id() const noexcept -> math::uuid {
29 return _texture_id;
30 }
31
32 auto tint() const noexcept -> const math::color& {
33 return _tint;
34 }
35
36 auto set_tint(const math::color& tint) noexcept -> void {
37 _tint = tint;
38 }
39
40private:
41
42 math::uuid _mesh_id;
43 std::uint32_t _submesh_index;
44 math::uuid _texture_id;
45 math::color _tint;
46
47}; // class gizmo
48
49} // namespace sbx::scenes
50
51#endif // LIBSBX_SCENES_COMPONENTS_GIZMO_HPP_
Definition: uuid.hpp:160
RGBA color value type.
Definition: color.hpp:48
static auto white() noexcept -> color
Returns a white color.
Definition: color.cpp:49
Definition: gizmo.hpp:10
RGBA color representation and utilities.