summaryrefslogtreecommitdiffstats
path: root/src/render/lights/qpointlight.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-30 03:03:34 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-30 03:03:34 +0200
commit94353454aa20b3fb51b53276f94024981925e5d3 (patch)
tree230858edeac7bee7281b6f72d611ab640b7fec85 /src/render/lights/qpointlight.cpp
parent7e60b6d599db9d4b18db3fe050d9f53ccb3125c1 (diff)
parent309c3139f8111ea246dd3a1f996578d0b35bb151 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/render/lights/qpointlight.cpp')
-rw-r--r--src/render/lights/qpointlight.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/render/lights/qpointlight.cpp b/src/render/lights/qpointlight.cpp
index 28dd265b8..2b042c91d 100644
--- a/src/render/lights/qpointlight.cpp
+++ b/src/render/lights/qpointlight.cpp
@@ -75,6 +75,19 @@ QPointLightPrivate::QPointLightPrivate()
\since 5.5
\brief Encapsulate a Point Light object in a Qt 3D scene.
+ A point light is a light source that emits light in all directions, from a single point.
+ Conceptually, this is similar to light given off by a standard light bulb.
+
+ A point light uses three attenuation factors to describe how the intensity of the light
+ decreases over distance. These factors are designed to be used together in calcuating total
+ attenuation. For the materials in Qt3D Extras the following formula is used, where distance
+ is the distance from the light to the surface being rendered:
+
+ \code
+ totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));
+ \endcode
+
+ Custom materials may choose to interpret these factors differently.
*/
/*!
@@ -84,6 +97,20 @@ QPointLightPrivate::QPointLightPrivate()
\inqmlmodule Qt3D.Render
\since 5.5
\brief Encapsulate a Point Light object in a Qt 3D scene.
+
+ A point light is a light source that emits light in all directions, from a single point.
+ Conceptually, this is similar to light given off by a standard light bulb.
+
+ A point light uses three attenuation factors to describe how the intensity of the light
+ decreases over distance. These factors are designed to be used together in calcuating total
+ attenuation. For the materials in Qt3D Extras the following formula is used, where distance
+ is the distance from the light to the surface being rendered:
+
+ \code
+ totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));
+ \endcode
+
+ Custom materials may choose to interpret these factors differently.
*/
/*!