![]() |
Workspace 6.21.5
|
Defines a point light source at specific position with attentuation. More...
#include <Rendering/SceneComponents/Lights/pointlight.h>
Public Member Functions | |
PointLight () | |
PointLight (const PointLight &light) | |
~PointLight () override | |
void | clearAttenuationFactors () |
PointLight * | clone () const override |
double | getAttenuationFactor (unsigned power) const |
unsigned | numAttenuationFactors () const |
PointLight & | operator= (const PointLight &light) |
void | setAttenuationFactor (unsigned power, double factor) |
bool | visit (LightsProcessor &processor) override |
![]() | |
Light (const QString &id="") | |
~Light () override | |
Light * | clone () 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 |
![]() | |
~SceneItem () override | |
SceneItem * | clone () const override=0 |
bool | getEnabled () const |
const QString & | getId () const |
const Mesh::BoundingBoxMinimal & | getLocalBoundingBox () const |
virtual Mesh::TransformMatrix | getMatrixGlobal () const |
virtual Mesh::TransformMatrix | getMatrixLocal () const |
const QString & | getName () const |
Mesh::TransformMatrix | getParentMatrixGlobal () const |
Transform * | getParentTransform () |
void | setEnabled (bool b) |
void | setId (const QString &itemId) |
virtual void | setLocalBoundingBox (const Mesh::BoundingBoxMinimal &bb) |
void | setName (const QString &name) |
virtual Transform * | toTransform () |
virtual const Transform * | toTransform () const |
virtual void | updateGlobalMatrix () |
virtual bool | visit (SceneProcessor &processor)=0 |
![]() | |
virtual | ~Observable () |
void | attachObserver (Observer &observer) |
void | destroy () |
void | detachObserver (Observer &observer) |
void | notifyEvent (const ObservableEvent &event) |
![]() | |
virtual | ~Clonable ()=default |
virtual Clonable * | clone () const =0 |
Additional Inherited Members | |
![]() | |
Light (const Light &light) | |
Light & | operator= (const Light &light) |
![]() | |
SceneItem (const QString &id) | |
SceneItem (const SceneItem &item) | |
virtual void | addToScene (Scene &scene, const QString &opIdPath="") |
bool | isTransformModified () const |
SceneItem & | operator= (const SceneItem &item) |
void | setTransformModified (bool b) |
![]() | |
Observable () | |
Observable (const Observable &) | |
Point lights do support attenuation but not edge fall-off. You can think of a point light as being essentially the same as a spot light with no cutoff angle.
PointLight | ( | ) |
PointLight | ( | const PointLight & | light | ) |
|
override |
void clearAttenuationFactors | ( | ) |
Clears all the attenuation factors. This will result in a light with no attenuation with distance from the light source.
|
overridevirtual |
Subclasses must reimplement this function to return a clone of themselves.
Implements Light.
double getAttenuationFactor | ( | unsigned | power | ) | const |
power | The power of the factor to retrieve. |
unsigned numAttenuationFactors | ( | ) | const |
PointLight & operator= | ( | const PointLight & | light | ) |
void setAttenuationFactor | ( | unsigned | power, |
double | factor | ||
) |
power | The integer power whose factor will be set. If this is beyond the end of the current set of factors (ie if power is greater or equal to the result from numAttenuationFactors()), the factors will be zero-filled to extend them up to the specified power. |
factor | The factor to apply to the power attenuation factor. |
The attentuation factors correspond to integer powers starting with a power of zero. The factors may be interpretted differently by different renderers, so ensure you understand how they will be used when setting them. Most renderers will have a fairly small limit on the number of supported powers, but it would normally be safe to assume that up to at least a power of 2 would be supported (this is the limit OpenGL specifies, for example).
|
overridevirtual |