|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Configuration options for a point light source that is limited to a cone shape, which can be used to approximate e.g. a headlamp on a car. More...
#include <GREM/graphics_3d/Lights3D.hpp>
Public Member Functions | |
| constexpr bool | operator== (const SpotLightOptions3D &other) const noexcept=default |
| Compare these options to another set of options for equality. | |
Public Attributes | |
| vec3 | position {0.0f, 0.0f, 0.0f} |
| Position of the light, in world coordinates. | |
| vec3 | direction {0.0f, -1.0f, 0.0f} |
| Vector representing the direction of the light, in world coordinates. | |
| float | range = 10.0f |
| Maximum range of the light, in world coordinates, beyond which the light will have no effect, or a non-positive value for infinite range. | |
| float | innerConeAngle = convertDegreesToRadians(22.5f) |
| Angle, from the light's direction axis, of the inner limit where the light cone is the brightest, in radians. | |
| float | outerConeAngle = convertDegreesToRadians(45.0f) |
| Angle, from the light's direction axis, of the outer limit where the light cone fades to zero, in radians. | |
| Color | color = Color::WHITE |
| Color of the light, where the alpha component controls the light's intensity. | |
| float | shadowNearZ = 0.01f |
| Distance to the near plane of the light's shadow map. | |
| float | shadowFarZ = 100.0f |
| Distance to the near plane of the light's shadow map. | |
| float | shadowMapNormalOffsetBiasConstantFactor = 0.04f |
| Constant normal offset bias factor to use when sampling the shadow map of the light. | |
| float | shadowMapNormalOffsetBiasSlopeFactor = 1.0f |
| Slope-scaled normal offset bias factor to use when sampling the shadow map of the light. | |
| bool | shadowMapped = true |
| Whether the light should use shadow mapping or not. | |
Configuration options for a point light source that is limited to a cone shape, which can be used to approximate e.g. a headlamp on a car.
|
nodiscardconstexprdefaultnoexcept |
Compare these options to another set of options for equality.
| other | the options to compare these to. |
| vec3 grem::graphics::SpotLightOptions3D::position {0.0f, 0.0f, 0.0f} |
Position of the light, in world coordinates.
| vec3 grem::graphics::SpotLightOptions3D::direction {0.0f, -1.0f, 0.0f} |
Vector representing the direction of the light, in world coordinates.
| float grem::graphics::SpotLightOptions3D::range = 10.0f |
Maximum range of the light, in world coordinates, beyond which the light will have no effect, or a non-positive value for infinite range.
| float grem::graphics::SpotLightOptions3D::innerConeAngle = convertDegreesToRadians(22.5f) |
Angle, from the light's direction axis, of the inner limit where the light cone is the brightest, in radians.
Must be less than or equal to outerConeAngle, and between 0 and pi radians (inclusive).
| float grem::graphics::SpotLightOptions3D::outerConeAngle = convertDegreesToRadians(45.0f) |
Angle, from the light's direction axis, of the outer limit where the light cone fades to zero, in radians.
Must be greater than or equal to innerConeAngle, and between 0 and pi radians (inclusive).
| Color grem::graphics::SpotLightOptions3D::color = Color::WHITE |
Color of the light, where the alpha component controls the light's intensity.
| float grem::graphics::SpotLightOptions3D::shadowNearZ = 0.01f |
Distance to the near plane of the light's shadow map.
Must be less than or equal to shadowFarZ.
| float grem::graphics::SpotLightOptions3D::shadowFarZ = 100.0f |
Distance to the near plane of the light's shadow map.
Must be greater than or equal to shadowNearZ.
| float grem::graphics::SpotLightOptions3D::shadowMapNormalOffsetBiasConstantFactor = 0.04f |
Constant normal offset bias factor to use when sampling the shadow map of the light.
| float grem::graphics::SpotLightOptions3D::shadowMapNormalOffsetBiasSlopeFactor = 1.0f |
Slope-scaled normal offset bias factor to use when sampling the shadow map of the light.
| bool grem::graphics::SpotLightOptions3D::shadowMapped = true |
Whether the light should use shadow mapping or not.