Workspace 6.21.5
Public Member Functions | List of all members
DirectionalLight Class Reference

Defines a directional light which is a source at infinity with no edge fall-off or attentuation. More...

#include <Rendering/SceneComponents/Lights/directionallight.h>

Inheritance diagram for DirectionalLight:
[legend]

Public Member Functions

 DirectionalLight ()
 
 DirectionalLight (const DirectionalLight &light)
 
 ~DirectionalLight () override
 
DirectionalLightclone () const override
 
DirectionalLightoperator= (const DirectionalLight &light)
 
bool visit (LightsProcessor &processor) override
 
- Public Member Functions inherited from Light
 Light (const QString &id="")
 
 ~Light () override
 
Lightclone () const override=0
 
const QColor & getColor () const
 
double getIntensity () const
 
Mesh::Vector3d getOrientation () const
 
Mesh::Vector3d getPosition () const
 
void setColor (const QColor &color)
 
void setIntensity (double d)
 
virtual bool visit (LightsProcessor &processor)=0
 
bool visit (SceneProcessor &processor) override
 
- Public Member Functions inherited from SceneItem
 ~SceneItem () override
 
SceneItemclone () const override=0
 
bool getEnabled () const
 
const QString & getId () const
 
const Mesh::BoundingBoxMinimalgetLocalBoundingBox () const
 
virtual Mesh::TransformMatrix getMatrixGlobal () const
 
virtual Mesh::TransformMatrix getMatrixLocal () const
 
const QString & getName () const
 
Mesh::TransformMatrix getParentMatrixGlobal () const
 
TransformgetParentTransform ()
 
void setEnabled (bool b)
 
void setId (const QString &itemId)
 
virtual void setLocalBoundingBox (const Mesh::BoundingBoxMinimal &bb)
 
void setName (const QString &name)
 
virtual TransformtoTransform ()
 
virtual const TransformtoTransform () const
 
virtual void updateGlobalMatrix ()
 
virtual bool visit (SceneProcessor &processor)=0
 
- Public Member Functions inherited from Observable
virtual ~Observable ()
 
void attachObserver (Observer &observer)
 
void destroy ()
 
void detachObserver (Observer &observer)
 
void notifyEvent (const ObservableEvent &event)
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Additional Inherited Members

- Protected Member Functions inherited from Light
 Light (const Light &light)
 
Lightoperator= (const Light &light)
 
- Protected Member Functions inherited from SceneItem
 SceneItem (const QString &id)
 
 SceneItem (const SceneItem &item)
 
virtual void addToScene (Scene &scene, const QString &opIdPath="")
 
bool isTransformModified () const
 
SceneItemoperator= (const SceneItem &item)
 
void setTransformModified (bool b)
 
- Protected Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 

Detailed Description

Directional lights do not support attenuation and have no edge fall-off. They represent a light at infinity, but they do have a direction. If you want a light with edge fall-off and/or attentuation based on distance from the source of the light, use SpotLight instead.

Constructor & Destructor Documentation

◆ DirectionalLight() [1/2]

◆ DirectionalLight() [2/2]

DirectionalLight ( const DirectionalLight light)

◆ ~DirectionalLight()

~DirectionalLight ( )
override

Member Function Documentation

◆ clone()

DirectionalLight * clone ( ) const
overridevirtual
Returns
A clone of this item.

Subclasses must reimplement this function to return a clone of themselves.

Implements Light.

◆ operator=()

DirectionalLight & operator= ( const DirectionalLight light)

◆ visit()

bool visit ( LightsProcessor processor)
overridevirtual
Parameters
processorThe light processor visiting this light.

Light subclasses should reimplement this function to call processor.visit() and return the result of that call. This is the usual visitor pattern as used for other scene items and model processors.

Implements Light.