Antkeeper
0.0.1
|
Directional cone light source. More...
#include <spot-light.hpp>
Public Member Functions | |
light_type | get_light_type () const noexcept override |
Returns light_type::spot. More... | |
void | set_luminous_flux (const math::fvec3 &luminous_flux) noexcept |
Sets the luminous flux of the spot light. More... | |
const math::fvec3 & | get_luminous_flux () const noexcept |
Returns the luminous flux of the spot light, in lm. More... | |
void | set_cutoff (const math::fvec2 &cutoff) |
Sets the spot light cutoff angles. More... | |
const math::fvec3 & | get_direction () const noexcept |
Returns the direction vector. More... | |
const math::fvec2 & | get_cutoff () const noexcept |
Returns the spot light cutoff angles. More... | |
const math::fvec2 & | get_cosine_cutoff () const noexcept |
Returns the cosine of the spot light cutoff angles. More... | |
![]() | |
const aabb_type & | get_bounds () const noexcept override |
Returns the bounds of the object. More... | |
void | set_color (const math::fvec3 &color) |
Sets the color of the light. More... | |
void | set_color_temperature (float temperature) |
Sets the color of the light from a color temperature. More... | |
constexpr const math::fvec3 & | get_color () const noexcept |
Returns the scene-linear RGB color of the light. More... | |
![]() | |
const std::size_t | get_object_type_id () const noexcept final |
Returns the type ID for this scene object type. More... | |
![]() | |
virtual void | render (render::context &ctx) const |
Adds render operations to a render context. More... | |
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_type & | get_transform () const noexcept |
Returns the transform of the object. More... | |
constexpr const vector_type & | get_translation () const noexcept |
Returns the translation of the object. More... | |
constexpr const quaternion_type & | get_rotation () const noexcept |
Returns the rotation of the object. More... | |
constexpr const vector_type & | get_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 | |
![]() | |
using | vector_type = math::fvec3 |
using | quaternion_type = math::fquat |
using | transform_type = math::transform< float > |
using | aabb_type = geom::box< float > |
![]() | |
static const std::atomic< std::size_t > | object_type_id |
Unique type ID for this scene object type. More... | |
![]() | |
virtual void | color_updated () |
Called each time the light color is modified. More... | |
![]() | |
static std::size_t | next_object_type_id () |
![]() | |
std::uint32_t | m_layer_mask {1} |
transform_type | m_transform {transform_type::identity()} |
Directional cone light source.
Definition at line 32 of file spot-light.hpp.
|
inlinenoexcept |
Returns the cosine of the spot light cutoff angles.
Definition at line 77 of file spot-light.hpp.
|
inlinenoexcept |
Returns the spot light cutoff angles.
Definition at line 71 of file spot-light.hpp.
|
inlinenoexcept |
Returns the direction vector.
Definition at line 65 of file spot-light.hpp.
|
inlineoverridevirtualnoexcept |
|
inlinenoexcept |
Returns the luminous flux of the spot light, in lm.
Definition at line 52 of file spot-light.hpp.
void scene::spot_light::set_cutoff | ( | const math::fvec2 & | cutoff | ) |
Sets the spot light cutoff angles.
cutoff | Vector containing the inner and outer cutoff angles, as x and y, respectively. |
Definition at line 25 of file spot-light.cpp.
|
inlinenoexcept |
Sets the luminous flux of the spot light.
luminous_flux | Luminous flux, in lm. |
Definition at line 46 of file spot-light.hpp.