|
Avara3D 0.2.0
C++ API reference
|
Base class for light sources attached to Scene Nodes. More...
#include <a3d/visual/light/Light.h>
Public Member Functions | |
| 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... | |
Static Public Member Functions | |
| 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... | |
Base class for light sources attached to Scene Nodes.
Concrete lights use the containing Node transform where spatial information is required. Directional and spot lights use the Node's world-forward direction; point and spot lights use its world position.
|
static |
Creates a white AmbientLight.
|
static |
Creates an AmbientLight with color.
| const Color & a3d::Light::color | ( | ) | const |
Returns the light color.
| void a3d::Light::color | ( | const Color & | color | ) |
Sets the light color.
|
static |
Creates a white DirectionalLight.
|
static |
Creates a DirectionalLight with color.
| const std::optional< std::string > & a3d::Light::name | ( | ) | const |
Returns the optional light name.
| void a3d::Light::name | ( | const std::string & | name | ) |
Sets the light name.
|
static |
Creates a white PointLight.
|
static |
Creates a PointLight with color.
Creates a SpotLight with color.