diff options
Diffstat (limited to 'src/render/lights/qspotlight.cpp')
-rw-r--r-- | src/render/lights/qspotlight.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/render/lights/qspotlight.cpp b/src/render/lights/qspotlight.cpp index 81c18387b..c4deaf817 100644 --- a/src/render/lights/qspotlight.cpp +++ b/src/render/lights/qspotlight.cpp @@ -83,6 +83,18 @@ QSpotLightPrivate::QSpotLightPrivate() \since 5.5 \brief Encapsulate a Spot Light object in a Qt 3D scene. + A spotlight is a light source that emits a cone of light in a particular direction. + + A spotlight 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. */ /*! @@ -93,6 +105,18 @@ QSpotLightPrivate::QSpotLightPrivate() \since 5.5 \brief Encapsulate a Spot Light object in a Qt 3D scene. + A spotlight is a light source that emits a cone of light in a particular direction. + + A spotlight 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. */ /*! |