The Light class represents a light source with a packed, shader compatible memory layout.
More...
#include <light.h>
|
| static Light | createAmbient (const QVector3D &color) |
| |
| static Light | createDirectional (const QVector3D &color, const QVector3D &direction) |
| |
| static Light | createPoint (const QVector3D &color, const QVector3D &position, float intensity) |
| |
| static Light | createSpot (const QVector3D &color, const QVector3D &position, const QVector3D &direction, float intensity, float cutoffDegrees, float cutoffBorder) |
| |
The Light class represents a light source with a packed, shader compatible memory layout.
- See also
- LightManager
The type of a light source.
The type of a light source determines which fields will effectively be used
| Enumerator |
|---|
| AMBIENT |
|
| DIRECTIONAL |
Ambient light, only color is used.
|
| POINT |
Directional light, defined by direction and color.
|
| SPOT |
Point light, defined by position, attenuation and color.
|
| Light terminus::Light::createAmbient |
( |
const QVector3D & |
color | ) |
|
|
static |
| Light terminus::Light::createDirectional |
( |
const QVector3D & |
color, |
|
|
const QVector3D & |
direction |
|
) |
| |
|
static |
| Light terminus::Light::createPoint |
( |
const QVector3D & |
color, |
|
|
const QVector3D & |
position, |
|
|
float |
intensity |
|
) |
| |
|
static |
| Light terminus::Light::createSpot |
( |
const QVector3D & |
color, |
|
|
const QVector3D & |
position, |
|
|
const QVector3D & |
direction, |
|
|
float |
intensity, |
|
|
float |
cutoffDegrees, |
|
|
float |
cutoffBorder |
|
) |
| |
|
static |
| void terminus::Light::setColor |
( |
const QVector3D & |
color | ) |
|
| void terminus::Light::setCutoff |
( |
float |
cutoffDegrees, |
|
|
float |
cutoffBorder |
|
) |
| |
| void terminus::Light::setDirection |
( |
const QVector3D & |
direction | ) |
|
| void terminus::Light::setIntensity |
( |
float |
intensity | ) |
|
| void terminus::Light::setPosition |
( |
const QVector3D & |
position | ) |
|
| QVector4D terminus::Light::colorCutOff |
|
protected |
| QVector4D terminus::Light::directionIntensity |
|
protected |
| const Light terminus::Light::nullLight |
|
static |
a light that has no effect on the scene
| QVector4D terminus::Light::positionType |
|
protected |
| constexpr int terminus::Light::vectorCount = 3 |
|
static |
the number of 4d vectors occupied by an instance of this class
The documentation for this class was generated from the following files: