20 #ifndef ANTKEEPER_SCENE_SKELETAL_MESH_HPP
21 #define ANTKEEPER_SCENE_SKELETAL_MESH_HPP
54 void set_model(std::shared_ptr<render::model> model);
62 void set_material(std::size_t index, std::shared_ptr<render::material> material);
77 [[nodiscard]]
inline const std::shared_ptr<render::model>&
get_model() const noexcept
104 void update_bounds();
105 void transformed()
override;
107 std::shared_ptr<render::model> m_model;
108 mutable std::vector<render::operation> m_operations;
109 aabb_type m_bounds{{0, 0, 0}, {0, 0, 0}};
Animatable skeleton pose.
const skeleton * get_skeleton() const noexcept
Returns the skeleton with which the pose is associated.
geom::box< float > aabb_type
Abstract base class for lights, cameras, model instances, and other scene objects.
const aabb_type & get_bounds() const noexcept override
Returns the bounds of the object.
const skeleton * get_skeleton() const noexcept
Returns the skeleton of the skeletal mesh.
void set_material(std::size_t index, std::shared_ptr< render::material > material)
Overwrites the material of a model group for this model instance.
const std::shared_ptr< render::model > & get_model() const noexcept
Returns the model of the model instance.
skeletal_mesh()=default
Constructs a model instance.
void reset_materials()
Resets all overwritten materials.
void set_model(std::shared_ptr< render::model > model)
Sets the model with which this model instance is associated.
void render(render::context &ctx) const override
Adds render operations to a render context.
animation_pose & get_pose() noexcept
Returns the animation pose of the skeletal mesh.
const animation_pose & get_pose() const noexcept
Returns the animation pose of the skeletal mesh.
Skeletal animation skeleton.
n-dimensional axis-aligned rectangle.