142 auto create_armature(
bool force) -> bool;
147 bool enabled_ =
true;
157 bool casts_shadow_ =
true;
162 bool casts_reflection_ =
true;
172 std::vector<entt::handle> armature_entities_;
191 std::vector<pose_mat4> skinning_pose_;
206 uint64_t last_render_frame_{};
Class that contains core data for meshes.
static void on_create_component(entt::registry &r, entt::entity e)
Called when the component is created.
auto was_used_last_frame() const noexcept -> bool
auto get_armature_by_index(size_t index) const -> entt::handle
auto get_last_render_frame() const noexcept -> uint64_t
auto get_bone_transforms() const -> const pose_mat4 &
Gets the bone transforms.
void set_enabled(bool enabled)
Sets whether the model is enabled.
void update_world_bounds(const math::transform &bounds)
auto get_armature_index_by_id(const std::string &node_id) const -> int
auto is_static() const -> bool
Checks if the model is static.
auto get_armature_by_id(const std::string &node_id) const -> entt::handle
auto get_bind_pose() const -> const animation_pose &
auto casts_shadow() const -> bool
Checks if the model casts shadows.
auto init_armature(bool force) -> bool
Updates the armature of the model.
auto get_local_bounds() const -> const math::bbox &
static void on_destroy_component(entt::registry &r, entt::entity e)
Called when the component is destroyed.
auto get_model() const -> const model &
Gets the model.
auto get_submesh_transforms() const -> const pose_mat4 &
Gets the submesh transforms.
auto is_enabled() const -> bool
Checks if the model is enabled.
auto is_skinned() const -> bool
auto get_skinning_transforms() const -> const std::vector< pose_mat4 > &
void set_model(const model &model)
Sets the model.
auto get_world_bounds_transform() const -> const math::transform &
auto casts_reflection() const -> bool
Checks if the model casts reflections.
void set_casts_reflection(bool casts_reflection)
Sets whether the model casts reflections.
auto get_armature_entities() const -> const std::vector< entt::handle > &
Gets the armature entities.
void set_static(bool is_static)
Sets whether the model is static.
auto get_world_bounds() const -> const math::bbox &
Gets the local bounding box for this mesh.
void set_armature_entities(const std::vector< entt::handle > &submesh_entities)
Sets the armature entities.
auto update_armature() -> bool
void set_last_render_frame(uint64_t frame)
void set_casts_shadow(bool cast_shadow)
Sets whether the model casts shadows.
Structure describing a LOD group (set of meshes), LOD transitions, and their materials.
Storage for box vector values and wraps up common functionality.
CRTP (Curiously Recurring Template Pattern) base structure for components.
std::vector< uint32_t > submeshes