20 #ifndef ANTKEEPER_SCENE_BILLBOARD_HPP
21 #define ANTKEEPER_SCENE_BILLBOARD_HPP
50 void set_material(std::shared_ptr<render::material> material);
66 m_alignment_axis = axis;
74 [[nodiscard]]
inline std::shared_ptr<render::material>
get_material() const noexcept
81 return m_billboard_type;
86 return m_alignment_axis;
90 void transformed()
override;
92 std::unique_ptr<gl::vertex_array> m_vertex_array;
93 std::unique_ptr<gl::vertex_buffer> m_vertex_buffer;
95 aabb_type m_bounds{{-1.0f, -1.0f, -1.0f}, {1.0f, 1.0f, 1.0f}};
2D unit quad with a single material.
const math::fvec3 & get_alignment_axis() const noexcept
void render(render::context &ctx) const override
Adds render operations to a render context.
void set_billboard_type(billboard_type type)
Sets the billboard type.
billboard()
Constructs a billboard.
std::shared_ptr< render::material > get_material() const noexcept
void set_alignment_axis(const math::fvec3 &axis) noexcept
Sets alignment axis for cylindrical billboards.
billboard_type get_billboard_type() const noexcept
const aabb_type & get_bounds() const noexcept override
Returns the bounds of the object.
void set_material(std::shared_ptr< render::material > material)
Sets the billboard material.
geom::box< float > aabb_type
Abstract base class for lights, cameras, model instances, and other scene objects.
billboard_type
Billboard types.
@ flat
Billboard is unaligned.
n-dimensional axis-aligned rectangle.
std::shared_ptr< render::material > material