20 #ifndef ANTKEEPER_SCENE_STATIC_MESH_HPP
21 #define ANTKEEPER_SCENE_STATIC_MESH_HPP
41 explicit static_mesh(std::shared_ptr<render::model> model);
53 void set_model(std::shared_ptr<render::model> model);
61 void set_material(std::size_t index, std::shared_ptr<render::material> material);
76 [[nodiscard]]
inline const std::shared_ptr<render::model>&
get_model() const noexcept
85 void transformed()
override;
87 std::shared_ptr<render::model> m_model;
88 mutable std::vector<render::operation> m_operations;
geom::box< float > aabb_type
Abstract base class for lights, cameras, model instances, and other scene objects.
static_mesh()=default
Constructs a model instance.
void render(render::context &ctx) const override
Adds render operations to a render context.
const std::shared_ptr< render::model > & get_model() const noexcept
Returns the model of the model instance.
void set_material(std::size_t index, std::shared_ptr< render::material > material)
Overwrites the material of a model group for this model instance.
void set_model(std::shared_ptr< render::model > model)
Sets the model with which this model instance is associated.
const aabb_type & get_bounds() const noexcept override
Returns the bounds of the object.
void reset_materials()
Resets all overwritten materials.
n-dimensional axis-aligned rectangle.