Antkeeper  0.0.1
Public Member Functions | List of all members
scene::billboard Class Reference

2D unit quad with a single material. More...

#include <billboard.hpp>

Inheritance diagram for scene::billboard:
scene::object< billboard > scene::object_base

Public Member Functions

 billboard ()
 Constructs a billboard. More...
 
void render (render::context &ctx) const override
 Adds render operations to a render context. More...
 
void set_material (std::shared_ptr< render::material > material)
 Sets the billboard material. More...
 
void set_billboard_type (billboard_type type)
 Sets the billboard type. More...
 
void set_alignment_axis (const math::fvec3 &axis) noexcept
 Sets alignment axis for cylindrical billboards. More...
 
const aabb_typeget_bounds () const noexcept override
 Returns the bounds of the object. More...
 
std::shared_ptr< render::materialget_material () const noexcept
 
billboard_type get_billboard_type () const noexcept
 
const math::fvec3get_alignment_axis () const noexcept
 
- Public Member Functions inherited from scene::object< billboard >
const std::size_t get_object_type_id () const noexcept final
 Returns the type ID for this scene object type. More...
 
- Public Member Functions inherited from scene::object_base
void look_at (const vector_type &position, const vector_type &target, const vector_type &up)
 
constexpr void set_layer_mask (std::uint32_t mask) noexcept
 Sets the layer mask of the object. More...
 
void set_transform (const transform_type &transform)
 Sets the transform of the object. More...
 
void set_translation (const vector_type &translation)
 Sets the translation of the object. More...
 
void set_rotation (const quaternion_type &rotation)
 Sets the rotation of the object. More...
 
constexpr std::uint32_t get_layer_mask () const noexcept
 Returns the layer mask of the object. More...
 
constexpr const transform_typeget_transform () const noexcept
 Returns the transform of the object. More...
 
constexpr const vector_typeget_translation () const noexcept
 Returns the translation of the object. More...
 
constexpr const quaternion_typeget_rotation () const noexcept
 Returns the rotation of the object. More...
 
constexpr const vector_typeget_scale () const noexcept
 Returns the scale of the object. More...
 
void set_scale (const vector_type &scale)
 Sets the scale of the object. More...
 
void set_scale (float scale)
 Sets the scale of the object. More...
 

Additional Inherited Members

- Public Types inherited from scene::object_base
using vector_type = math::fvec3
 
using quaternion_type = math::fquat
 
using transform_type = math::transform< float >
 
using aabb_type = geom::box< float >
 
- Static Public Attributes inherited from scene::object< billboard >
static const std::atomic< std::size_t > object_type_id
 Unique type ID for this scene object type. More...
 
- Static Protected Member Functions inherited from scene::object_base
static std::size_t next_object_type_id ()
 
- Protected Attributes inherited from scene::object_base
std::uint32_t m_layer_mask {1}
 
transform_type m_transform {transform_type::identity()}
 

Detailed Description

2D unit quad with a single material.

Definition at line 37 of file billboard.hpp.

Constructor & Destructor Documentation

◆ billboard()

scene::billboard::billboard ( )

Constructs a billboard.

Definition at line 57 of file billboard.cpp.

Member Function Documentation

◆ get_alignment_axis()

const math::fvec3& scene::billboard::get_alignment_axis ( ) const
inlinenoexcept

Definition at line 84 of file billboard.hpp.

◆ get_billboard_type()

billboard_type scene::billboard::get_billboard_type ( ) const
inlinenoexcept

Definition at line 79 of file billboard.hpp.

◆ get_bounds()

const aabb_type& scene::billboard::get_bounds ( ) const
inlineoverridevirtualnoexcept

Returns the bounds of the object.

Implements scene::object_base.

Definition at line 69 of file billboard.hpp.

◆ get_material()

std::shared_ptr<render::material> scene::billboard::get_material ( ) const
inlinenoexcept

Definition at line 74 of file billboard.hpp.

◆ render()

void scene::billboard::render ( render::context ctx) const
overridevirtual

Adds render operations to a render context.

Parameters
ctxRender context.

Reimplemented from scene::object_base.

Definition at line 81 of file billboard.cpp.

◆ set_alignment_axis()

void scene::billboard::set_alignment_axis ( const math::fvec3 axis)
inlinenoexcept

Sets alignment axis for cylindrical billboards.

Parameters
axisCylindral billboard aligmment axis.

Definition at line 64 of file billboard.hpp.

◆ set_billboard_type()

void scene::billboard::set_billboard_type ( billboard_type  type)

Sets the billboard type.

Parameters
typeBillboard type.

Definition at line 130 of file billboard.cpp.

◆ set_material()

void scene::billboard::set_material ( std::shared_ptr< render::material material)

Sets the billboard material.

Parameters
materialBillboard material.

Definition at line 125 of file billboard.cpp.


The documentation for this class was generated from the following files: