MOS
model.hpp
1 #pragma once
2 
3 #include <glm/gtx/matrix_decompose.hpp>
4 #include <mos/gfx/model.hpp>
5 #include <vector>
6 
7 #include <mos/gpu/material.hpp>
8 #include <mos/gpu/mesh.hpp>
9 
10 namespace mos::gl {
11 class Renderer;
12 }
13 
14 namespace mos::gpu {
15 
16 class Model;
17 
18 using Models = std::vector<mos::gpu::Model>;
19 
20 class Model final {
21  friend class mos::gl::Renderer;
22 
23 private:
24  explicit Model(mos::gfx::Model model);
25 
26 public:
27  Model() = default;
29  Mesh mesh = Mesh();
30 
33 
35  glm::mat4 transform{0.0f};
36 
38  Models models{};
39 
41  auto centroid() const -> glm::vec3;
42 
44  auto radius() const -> float;
45 
46  auto position() const -> glm::vec3;
47 };
48 } // namespace mos::gpu
Material material
Material.
Definition: model.hpp:32
Definition: model.hpp:20
Definition: array_buffers.hpp:5
Render geometry shapes with OpenGL.
Definition: renderer.hpp:40
Definition: material.hpp:7
Definition: material.hpp:10
Definition: mesh.hpp:12
Collection of properties for a renderable object.
Definition: model.hpp:24