LuciadCPillar 2023.1.03
luciad::EyeDomeLightingEffect Class Referencefinal

This class implements the Eye-dome lighting (EDL) effect, a non-photorealistic lighting model which helps accentuate the shapes of different objects to improve depth perception, by shading their outlines. More...

#include <luciad/maps/effects/EyeDomeLightingEffect.h>

Public Member Functions

 EyeDomeLightingEffect (const EyeDomeLightingEffect &)=delete
 
Color getColor () const
 Returns the color of the shade. More...
 
double getStrength () const
 Returns the shading multiplication factor. More...
 
int32_t getWindow () const
 Returns the number of surrounding pixels taken into account by EDL model. More...
 
bool isEnabled () const
 
EyeDomeLightingEffectoperator= (const EyeDomeLightingEffect &)=delete
 
void set (int32_t window, double strength, Color color)
 Sets multiple properties in one go. More...
 
void setColor (Color color)
 Sets the color of the shade. More...
 
void setEnabled (bool enabled)
 Enables or disables the Eye-dome lighting effect. More...
 
void setStrength (double strength)
 Sets the shading multiplication factor. More...
 
void setWindow (int32_t window)
 Sets the number of surrounding pixels taken into account by EDL model. More...
 

Detailed Description

This class implements the Eye-dome lighting (EDL) effect, a non-photorealistic lighting model which helps accentuate the shapes of different objects to improve depth perception, by shading their outlines.

Left: eye-dome lighting disabled, Right: eye-dome lighting enabled

The lighting model applies a shade to each pixel, based on the depth difference between that pixel and its surrounding pixels. The EDL technique uses 3 properties:

  • the window property defines how many surrounding pixels must be taken into account.
  • the strength property is a factor to multiply with the shading that is applied to the image.
  • the color property defines what color the shade will have.

Note that Eye-dome lighting is only applied in 3D views.

You cannot create an EyeDomeLightingEffect. Instead, you can retrieve it from luciad::GraphicsEffects::getEyeDomeLighting.

Since
2022.1

Constructor & Destructor Documentation

◆ EyeDomeLightingEffect()

luciad::EyeDomeLightingEffect::EyeDomeLightingEffect ( const EyeDomeLightingEffect )
delete

Member Function Documentation

◆ getColor()

Color luciad::EyeDomeLightingEffect::getColor ( ) const

Returns the color of the shade.

Returns
the color of the shade.

◆ getStrength()

double luciad::EyeDomeLightingEffect::getStrength ( ) const

Returns the shading multiplication factor.

Returns
the shading multiplication factor.

◆ getWindow()

int32_t luciad::EyeDomeLightingEffect::getWindow ( ) const

Returns the number of surrounding pixels taken into account by EDL model.

Returns
the number of surrounding pixels taken into account by EDL model.

◆ isEnabled()

bool luciad::EyeDomeLightingEffect::isEnabled ( ) const
Returns
if the Eye-dome lighting effect is enabled.

◆ operator=()

EyeDomeLightingEffect & luciad::EyeDomeLightingEffect::operator= ( const EyeDomeLightingEffect )
delete

◆ set()

void luciad::EyeDomeLightingEffect::set ( int32_t  window,
double  strength,
Color  color 
)

Sets multiple properties in one go.

Parameters
windownumber of surrounding pixels taken into account by EDL model.
strengthcolor of the shade.
colorshading multiplication factor.
See also
setWindow
setStrength
setColor

◆ setColor()

void luciad::EyeDomeLightingEffect::setColor ( Color  color)

Sets the color of the shade.

Note that the alpha component of the color is ignored so the color is fully opaque.

The default color is black.

Parameters
colorcolor of the shade.

◆ setEnabled()

void luciad::EyeDomeLightingEffect::setEnabled ( bool  enabled)

Enables or disables the Eye-dome lighting effect.

The default is false.

Parameters
enabledtrue to enable the Eye-dome lighting effect or false to disable it.

◆ setStrength()

void luciad::EyeDomeLightingEffect::setStrength ( double  strength)

Sets the shading multiplication factor.

A value between 0 and 1 softens the shade, a value higher than 1 hardens the shade.

The default strength is 1.

Parameters
strengthshading multiplication factor.

◆ setWindow()

void luciad::EyeDomeLightingEffect::setWindow ( int32_t  window)

Sets the number of surrounding pixels taken into account by EDL model.

The default window is 2.

Parameters
windownumber of surrounding pixels taken into account by EDL model.