MOS
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mos::gfx::Model Class Referencefinal

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...
 

Detailed Description

Collection of properties for a renderable object.

Member Function Documentation

◆ alpha()

auto mos::gfx::Model::alpha ( float  alpha) -> void

Set alpha of material recursively.

◆ ambient_occlusion()

auto mos::gfx::Model::ambient_occlusion ( float  ambient_occlusion) -> void

Set ambient occlusion of material recursively.

◆ centroid()

auto mos::gfx::Model::centroid ( ) const -> glm::vec3

Get centroid position.

◆ emission()

auto mos::gfx::Model::emission ( const glm::vec3 &  emission) -> void

Set emission of material recursively.

◆ index_of_refraction()

auto mos::gfx::Model::index_of_refraction ( float  index_of_refraction) -> void

set index of refraction of material recursively.

◆ metallic()

auto mos::gfx::Model::metallic ( float  metallic) -> void

set metallic of material recursively.

◆ position()

auto mos::gfx::Model::position ( const glm::vec3 &  position) -> void

Set position.

◆ roughness()

auto mos::gfx::Model::roughness ( float  roughness) -> void

set roughness of material recursively.

◆ transmission()

auto mos::gfx::Model::transmission ( float  transmission) -> void

set transmission of material recursively.

Member Data Documentation

◆ material

Material mos::gfx::Model::material

◆ mesh

Shared_mesh mos::gfx::Model::mesh

Mesh shape.

◆ models

Models mos::gfx::Model::models

Children models.

◆ transform

glm::mat4 mos::gfx::Model::transform {0.0f}

Transform.


The documentation for this class was generated from the following file: