Avara3D 0.2.0
C++ API reference
a3d::Light Class Referenceabstract

Base class for light sources attached to Scene Nodes. More...

#include <a3d/visual/light/Light.h>

Inheritance diagram for a3d::Light:
[legend]

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 Colorcolor () const
 Returns the light color. More...
 
void color (const Color &color)
 Sets the light color. More...
 

Static Public Member Functions

static std::shared_ptr< AmbientLightAmbient ()
 Creates a white AmbientLight. More...
 
static std::shared_ptr< AmbientLightAmbient (const Color &color)
 Creates an AmbientLight with color. More...
 
static std::shared_ptr< DirectionalLightDirectional ()
 Creates a white DirectionalLight. More...
 
static std::shared_ptr< DirectionalLightDirectional (const Color &color)
 Creates a DirectionalLight with color. More...
 
static std::shared_ptr< PointLightPoint ()
 Creates a white PointLight. More...
 
static std::shared_ptr< PointLightPoint (const Color &color)
 Creates a PointLight with color. More...
 
static std::shared_ptr< SpotLightSpot ()
 Creates a white SpotLight. More...
 
static std::shared_ptr< SpotLightSpot (const Color &color)
 Creates a SpotLight with color. More...
 

Detailed Description

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.

Definition at line 32 of file Light.h.

Member Function Documentation

◆ Ambient() [1/2]

static std::shared_ptr< AmbientLight > a3d::Light::Ambient ( )
static

Creates a white AmbientLight.

◆ Ambient() [2/2]

static std::shared_ptr< AmbientLight > a3d::Light::Ambient ( const Color color)
static

Creates an AmbientLight with color.

◆ color() [1/2]

const Color & a3d::Light::color ( ) const

Returns the light color.

◆ color() [2/2]

void a3d::Light::color ( const Color color)

Sets the light color.

◆ Directional() [1/2]

static std::shared_ptr< DirectionalLight > a3d::Light::Directional ( )
static

Creates a white DirectionalLight.

◆ Directional() [2/2]

static std::shared_ptr< DirectionalLight > a3d::Light::Directional ( const Color color)
static

Creates a DirectionalLight with color.

◆ name() [1/2]

const std::optional< std::string > & a3d::Light::name ( ) const

Returns the optional light name.

◆ name() [2/2]

void a3d::Light::name ( const std::string &  name)

Sets the light name.

◆ Point() [1/2]

static std::shared_ptr< PointLight > a3d::Light::Point ( )
static

Creates a white PointLight.

◆ Point() [2/2]

static std::shared_ptr< PointLight > a3d::Light::Point ( const Color color)
static

Creates a PointLight with color.

◆ Spot() [1/2]

static std::shared_ptr< SpotLight > a3d::Light::Spot ( )
static

Creates a white SpotLight.

◆ Spot() [2/2]

static std::shared_ptr< SpotLight > a3d::Light::Spot ( const Color color)
static

Creates a SpotLight with color.


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