8 #include <mos/gfx/assets.hpp> 9 #include <mos/gfx/material.hpp> 10 #include <mos/gfx/mesh.hpp> 11 #include <mos/gfx/models.hpp> 12 #include <mos/gfx/texture_2d.hpp> 26 static auto load(
const nlohmann::json &json,
27 Assets &assets = *std::make_unique<Assets>(),
28 const glm::mat4 &parent_transform = glm::mat4(1.0f))
31 Model(std::string name, Shared_mesh mesh,
32 glm::mat4 transform = glm::mat4(1.0f),
37 auto name()
const -> std::string;
39 auto position()
const -> glm::vec3;
42 auto position(
const glm::vec3 &position) -> void;
45 auto centroid()
const -> glm::vec3;
48 auto radius()
const -> float;
51 auto emission(
const glm::vec3 &emission) -> void;
54 auto alpha(
float alpha) -> void;
57 auto ambient_occlusion(
float ambient_occlusion) -> void;
60 auto index_of_refraction(
float index_of_refraction) -> void;
63 auto transmission(
float transmission) -> void;
66 auto roughness(
float roughness) -> void;
69 auto metallic(
float metallic) -> void;
78 glm::mat4 transform{0.0f};
Shared_mesh mesh
Mesh shape.
Definition: model.hpp:72
Physically based material.
Definition: material.hpp:12
Cache for faster loading of textures and meshes.
Definition: assets.hpp:20
Definition: assets.hpp:17
Material material
Material.
Definition: model.hpp:75
Models models
Children models.
Definition: model.hpp:81
Collection of properties for a renderable object.
Definition: model.hpp:24