LuciadCPillar 2026.1
Loading...
Searching...
No Matches
luciad::HeadlightModel Class Referencefinal

Light that follows the orientation of the viewer. More...

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

Inheritance diagram for luciad::HeadlightModel:
luciad::LightModel

Classes

class  Builder
 Builder for a luciad::HeadlightModel. More...

Public Member Functions

 ~HeadlightModel () override
Builder asBuilder () const
 Creates a builder pre-filled with this light's parameters.
Color getAmbientColor () const
 Returns the ambient color of the light.
Color getDiffuseColor () const
 Returns the diffuse color of the light.
std::optional< double > getPitchOffset () const
 Returns the pitch offset in degrees, or std::nullopt to follow the camera's pitch.
bool operator== (const HeadlightModel &other) const
 Returns whether this light is equal to another.
Public Member Functions inherited from luciad::LightModel
 LightModel (const LightModel &)=delete
virtual ~LightModel ()=default
LightModel & operator= (const LightModel &)=delete

Static Public Member Functions

static Builder newBuilder ()
 Creates a new builder with the default headlight parameters.

Additional Inherited Members

Protected Member Functions inherited from luciad::LightModel
 LightModel ()=default
 Default constructor.

Detailed Description

Light that follows the orientation of the viewer.

In a 3D view, the light follows the azimuth from the eye point to the reference point of the camera. The vertical orientation of the camera does not affect the direction of the headlight. Instead, getPitchOffset is used, unless the pitch offset is std::nullopt, in which case the light follows the camera's pitch exactly.

This is the default light.

Since
2026.1

Constructor & Destructor Documentation

◆ ~HeadlightModel()

luciad::HeadlightModel::~HeadlightModel ( )
override

Member Function Documentation

◆ asBuilder()

Builder luciad::HeadlightModel::asBuilder ( ) const

Creates a builder pre-filled with this light's parameters.

Returns
a builder pre-filled with this light's parameters.

◆ getAmbientColor()

Color luciad::HeadlightModel::getAmbientColor ( ) const

Returns the ambient color of the light.

Returns
the ambient color of the light.

◆ getDiffuseColor()

Color luciad::HeadlightModel::getDiffuseColor ( ) const

Returns the diffuse color of the light.

Returns
the diffuse color of the light.

◆ getPitchOffset()

std::optional< double > luciad::HeadlightModel::getPitchOffset ( ) const

Returns the pitch offset in degrees, or std::nullopt to follow the camera's pitch.

The pitch offset is the fixed vertical orientation of the light.

Returns
the pitch offset in degrees, or std::nullopt to follow the camera's pitch.

◆ newBuilder()

Builder luciad::HeadlightModel::newBuilder ( )
static

Creates a new builder with the default headlight parameters.

Returns
a new builder.

◆ operator==()

bool luciad::HeadlightModel::operator== ( const HeadlightModel & other) const

Returns whether this light is equal to another.

Parameters
otherthe light to compare with.
Returns
whether this light is equal to another.