|
Avara3D 0.2.0
C++ API reference
|
Cone-shaped light located and oriented by its containing Node. More...
#include <a3d/visual/light/SpotLight.h>
Public Types | |
| enum class | FeatheringMode : uint8_t { Linear = 0 , Sharp = 1 , Soft = 2 } |
| Selects the intensity curve between the outer and inner cone angles. More... | |
Public Member Functions | |
| SpotLight () | |
| Creates an unnamed white SpotLight. More... | |
| SpotLight (const std::string &name) | |
| Creates a named white SpotLight. More... | |
| SpotLight (const Color &color) | |
Creates an unnamed SpotLight with color. More... | |
| SpotLight (const std::string &name, const Color &color) | |
Creates a SpotLight with name and color. More... | |
| float | innerAngle () const |
| Returns the inner cone half-angle in radians. More... | |
| void | innerAngle (float angle) |
| Sets the inner cone half-angle in radians. More... | |
| float | outerAngle () const |
| Returns the outer cone half-angle in radians. More... | |
| void | outerAngle (float angle) |
| Sets the outer cone half-angle in radians. More... | |
| FeatheringMode | featheringMode () const |
| Returns the angular feathering curve. More... | |
| void | featheringMode (FeatheringMode mode) |
| Sets the angular feathering curve. More... | |
| const Attenuation & | attenuation () const |
| Returns the distance-attenuation coefficients. More... | |
| void | attenuation (const Attenuation &attenuation) |
| Sets the distance-attenuation coefficients. More... | |
Public Member Functions inherited from a3d::Light | |
| const std::optional< std::string > & | name () const |
| Returns the optional light name. More... | |
| void | name (const std::string &name) |
| Sets the light name. More... | |
| const Color & | color () const |
| Returns the light color. More... | |
| void | color (const Color &color) |
| Sets the light color. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from a3d::Light | |
| static std::shared_ptr< AmbientLight > | Ambient () |
| Creates a white AmbientLight. More... | |
| static std::shared_ptr< AmbientLight > | Ambient (const Color &color) |
Creates an AmbientLight with color. More... | |
| static std::shared_ptr< DirectionalLight > | Directional () |
| Creates a white DirectionalLight. More... | |
| static std::shared_ptr< DirectionalLight > | Directional (const Color &color) |
Creates a DirectionalLight with color. More... | |
| static std::shared_ptr< PointLight > | Point () |
| Creates a white PointLight. More... | |
| static std::shared_ptr< PointLight > | Point (const Color &color) |
Creates a PointLight with color. More... | |
| static std::shared_ptr< SpotLight > | Spot () |
| Creates a white SpotLight. More... | |
| static std::shared_ptr< SpotLight > | Spot (const Color &color) |
Creates a SpotLight with color. More... | |
Cone-shaped light located and oriented by its containing Node.
The light originates at the Node's world position and points along the Node's world-forward direction. Intensity is reduced by both angular feathering and distance attenuation.
Definition at line 28 of file SpotLight.h.
|
strong |
Selects the intensity curve between the outer and inner cone angles.
| Enumerator | |
|---|---|
| Linear | Uses a linear intensity transition. |
| Sharp | Uses y = x(2-x). |
| Soft | Uses y = x^2. |
Definition at line 34 of file SpotLight.h.
| a3d::SpotLight::SpotLight | ( | ) |
Creates an unnamed white SpotLight.
|
explicit |
Creates a named white SpotLight.
| a3d::SpotLight::SpotLight | ( | const std::string & | name, |
| const Color & | color | ||
| ) |
Creates a SpotLight with name and color.
| const Attenuation & a3d::SpotLight::attenuation | ( | ) | const |
Returns the distance-attenuation coefficients.
| void a3d::SpotLight::attenuation | ( | const Attenuation & | attenuation | ) |
Sets the distance-attenuation coefficients.
| FeatheringMode a3d::SpotLight::featheringMode | ( | ) | const |
Returns the angular feathering curve.
| void a3d::SpotLight::featheringMode | ( | FeatheringMode | mode | ) |
Sets the angular feathering curve.
| float a3d::SpotLight::innerAngle | ( | ) | const |
Returns the inner cone half-angle in radians.
| void a3d::SpotLight::innerAngle | ( | float | angle | ) |
Sets the inner cone half-angle in radians.
| float a3d::SpotLight::outerAngle | ( | ) | const |
Returns the outer cone half-angle in radians.
| void a3d::SpotLight::outerAngle | ( | float | angle | ) |
Sets the outer cone half-angle in radians.