|
Unravel Engine C++ Reference
|
Structure describing a LOD group (set of meshes), LOD transitions, and their materials. More...
#include <model.h>
Classes | |
| struct | submit_callbacks |
| Callbacks for submitting the model for rendering. More... | |
Public Member Functions | |
| auto | is_valid () const -> bool |
| Checks if the model is valid. | |
| auto | get_lod (uint32_t lod) const -> asset_handle< mesh > |
| Gets the LOD (Level of Detail) mesh for the specified level. | |
| void | set_lod (asset_handle< mesh > mesh, uint32_t lod) |
| Sets the LOD (Level of Detail) mesh for the specified level. | |
| void | set_material (asset_handle< material > material, uint32_t index) |
| Sets the material for the specified index. | |
| void | set_material_instance (material::sptr material, uint32_t index) |
| auto | get_lods () const -> const std::vector< asset_handle< mesh > > & |
| Gets all the LOD meshes. | |
| void | set_lods (const std::vector< asset_handle< mesh > > &lods) |
| Sets the LOD meshes. | |
| auto | get_materials () const -> const std::vector< asset_handle< material > > & |
| Gets all the materials. | |
| auto | get_material_instances () const -> const std::vector< material::sptr > & |
| void | set_materials (const std::vector< asset_handle< material > > &materials) |
| Sets the materials. | |
| void | set_material_instances (const std::vector< material::sptr > &materials) |
| auto | get_material (uint32_t index) const -> asset_handle< material > |
| Gets the material for the specified index. | |
| auto | get_material_instance (uint32_t index) const -> material::sptr |
| auto | get_or_emplace_material_instance (uint32_t index) -> material::sptr |
| auto | get_lod_limits () const -> const std::vector< urange32_t > & |
| Gets the LOD limits. | |
| void | set_lod_limits (const std::vector< urange32_t > &limits) |
| Sets the LOD limits. | |
| void | submit (const math::mat4 &world_transform, const pose_mat4 &submesh_transforms, const pose_mat4 &bone_transforms, const std::vector< pose_mat4 > &skinning_matrices, unsigned int lod, const submit_callbacks &callbacks) const |
| Submits the model for rendering. | |
Public Member Functions inherited from crtp_meta_type< model > | |
| virtual auto | get_meta_type () const -> entt::meta_type |
| auto | is () const -> bool |
| auto | is (const entt::meta_type &type) const -> bool |
| virtual auto | as_derived () -> entt::meta_any |
Static Public Member Functions | |
| static auto | default_material () -> asset_handle< material > & |
| Gets the default material. | |
| static auto | fallback_material () -> asset_handle< material > & |
| Gets the fallback material. | |
Static Public Member Functions inherited from crtp_meta_type< model > | |
| static auto | get_static_meta_type () -> entt::meta_type |
Structure describing a LOD group (set of meshes), LOD transitions, and their materials.
|
static |
|
static |
| auto unravel::model::get_lod | ( | uint32_t | lod | ) | const -> asset_handle<mesh> |
| auto unravel::model::get_lod_limits | ( | ) | const -> const std::vector<urange32_t>& |
| auto unravel::model::get_lods | ( | ) | const -> const std::vector<asset_handle<mesh>>& |
| auto unravel::model::get_material | ( | uint32_t | index | ) | const -> asset_handle<material> |
| auto unravel::model::get_material_instance | ( | uint32_t | index | ) | const -> material::sptr |
| auto unravel::model::get_material_instances | ( | ) | const -> const std::vector<material::sptr>& |
| auto unravel::model::get_materials | ( | ) | const -> const std::vector<asset_handle<material>>& |
| auto unravel::model::get_or_emplace_material_instance | ( | uint32_t | index | ) | -> material::sptr |
| bool unravel::model::is_valid | ( | ) | const -> bool |
| void unravel::model::set_lod | ( | asset_handle< mesh > | mesh, |
| uint32_t | lod ) |
| void unravel::model::set_lod_limits | ( | const std::vector< urange32_t > & | limits | ) |
| void unravel::model::set_lods | ( | const std::vector< asset_handle< mesh > > & | lods | ) |
| void unravel::model::set_material | ( | asset_handle< material > | material, |
| uint32_t | index ) |
| void unravel::model::set_material_instance | ( | material::sptr | material, |
| uint32_t | index ) |
| void unravel::model::set_material_instances | ( | const std::vector< material::sptr > & | materials | ) |
| void unravel::model::set_materials | ( | const std::vector< asset_handle< material > > & | materials | ) |
| void unravel::model::submit | ( | const math::mat4 & | world_transform, |
| const pose_mat4 & | submesh_transforms, | ||
| const pose_mat4 & | bone_transforms, | ||
| const std::vector< pose_mat4 > & | skinning_matrices, | ||
| unsigned int | lod, | ||
| const submit_callbacks & | callbacks ) const |