Avara3D 0.2.0
C++ API reference
a3d::PointLight Class Reference

Omnidirectional light located at its containing Node's world position. More...

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

Inheritance diagram for a3d::PointLight:
[legend]

Public Member Functions

 PointLight ()
 Creates an unnamed white PointLight. More...
 
 PointLight (const std::string &name)
 Creates a named white PointLight. More...
 
 PointLight (const Color &color)
 Creates an unnamed PointLight with color. More...
 
 PointLight (const std::string &name, const Color &color)
 Creates a PointLight with name and color. More...
 
const Attenuationattenuation () 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 Colorcolor () 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< 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

Omnidirectional light located at its containing Node's world position.

Light intensity is reduced with distance according to the configured Attenuation coefficients.

Definition at line 26 of file PointLight.h.

Constructor & Destructor Documentation

◆ PointLight() [1/4]

a3d::PointLight::PointLight ( )

Creates an unnamed white PointLight.

◆ PointLight() [2/4]

a3d::PointLight::PointLight ( const std::string &  name)
explicit

Creates a named white PointLight.

◆ PointLight() [3/4]

a3d::PointLight::PointLight ( const Color color)
explicit

Creates an unnamed PointLight with color.

◆ PointLight() [4/4]

a3d::PointLight::PointLight ( const std::string &  name,
const Color color 
)

Creates a PointLight with name and color.

Member Function Documentation

◆ attenuation() [1/2]

const Attenuation & a3d::PointLight::attenuation ( ) const

Returns the distance-attenuation coefficients.

◆ attenuation() [2/2]

void a3d::PointLight::attenuation ( const Attenuation attenuation)

Sets the distance-attenuation coefficients.


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