MOS
|
Collection of properties for a renderable object. More...
#include <model.hpp>
Public Member Functions | |
Model (std::string name, Shared_mesh mesh, glm::mat4 transform=glm::mat4(1.0f), Material material=Material{glm::vec3(1.0f)}) | |
auto | name () const -> std::string |
auto | position () const -> glm::vec3 |
auto | position (const glm::vec3 &position) -> void |
Set position. More... | |
auto | centroid () const -> glm::vec3 |
Get centroid position. More... | |
auto | radius () const -> float |
Get radious of bounding sphere. | |
auto | emission (const glm::vec3 &emission) -> void |
Set emission of material recursively. More... | |
auto | alpha (float alpha) -> void |
Set alpha of material recursively. More... | |
auto | ambient_occlusion (float ambient_occlusion) -> void |
Set ambient occlusion of material recursively. More... | |
auto | index_of_refraction (float index_of_refraction) -> void |
set index of refraction of material recursively. More... | |
auto | transmission (float transmission) -> void |
set transmission of material recursively. More... | |
auto | roughness (float roughness) -> void |
set roughness of material recursively. More... | |
auto | metallic (float metallic) -> void |
set metallic of material recursively. More... | |
Static Public Member Functions | |
static auto | load (const nlohmann::json &json, Assets &assets= *std::make_unique< Assets >(), const glm::mat4 &parent_transform=glm::mat4(1.0f)) -> Model |
Public Attributes | |
Shared_mesh | mesh |
Mesh shape. More... | |
Material | material |
Material. More... | |
glm::mat4 | transform {0.0f} |
Transform. More... | |
Models | models |
Children models. More... | |
Collection of properties for a renderable object.
auto mos::gfx::Model::alpha | ( | float | alpha | ) | -> void |
Set alpha of material recursively.
auto mos::gfx::Model::ambient_occlusion | ( | float | ambient_occlusion | ) | -> void |
Set ambient occlusion of material recursively.
auto mos::gfx::Model::centroid | ( | ) | const -> glm::vec3 |
Get centroid position.
auto mos::gfx::Model::emission | ( | const glm::vec3 & | emission | ) | -> void |
Set emission of material recursively.
auto mos::gfx::Model::index_of_refraction | ( | float | index_of_refraction | ) | -> void |
set index of refraction of material recursively.
auto mos::gfx::Model::metallic | ( | float | metallic | ) | -> void |
set metallic of material recursively.
auto mos::gfx::Model::position | ( | const glm::vec3 & | position | ) | -> void |
Set position.
auto mos::gfx::Model::roughness | ( | float | roughness | ) | -> void |
set roughness of material recursively.
auto mos::gfx::Model::transmission | ( | float | transmission | ) | -> void |
set transmission of material recursively.
Shared_mesh mos::gfx::Model::mesh |
Mesh shape.
Models mos::gfx::Model::models |
Children models.
glm::mat4 mos::gfx::Model::transform {0.0f} |
Transform.