Stores and converts between photometric data stored in various units like Lux, Lumens, and EV100.
More...
#include <PhotometricValue.h>
|
| AZ_RTTI (PhotometricValue, "61931C74-75B6-49CA-BE50-ABFFA9D8C4D6") |
|
| PhotometricValue (float intensity, const AZ::Color &colorMask, PhotometricUnit unit) |
|
Color | GetCombinedRgb () const |
| Returns a color in the current unit type that is the combination of the chroma and intensity.
|
|
template<PhotometricUnit T> |
PhotometricColor< T > | GetCombinedRgb () const |
| Returns a color in the provided unit type is the combination of the chroma and intensity.
|
|
float | GetCombinedIntensity () const |
| Returns an intensity in the current unit type that takes into account the chroma assuming sRGB primaries.
|
|
float | GetCombinedIntensity (PhotometricUnit type) const |
| Returns an intensity in the provided unit type that takes into account the chroma assuming sRGB primaries.
|
|
void | SetChroma (const Color &chroma) |
| Set the chroma of the light value.
|
|
void | SetIntensity (float value) |
| Set the intensity of the light value in the current working photometric unit.
|
|
void | SetArea (float area) |
| Sets the area the light covers in meteres squared.
|
|
void | SetEffectiveSolidAngle (float steradians) |
|
const Color & | GetChroma () const |
| Returns the chroma of the light value.
|
|
float | GetIntensity () const |
| Returns the intensity of the light value in the current working photometric unit.
|
|
float | GetArea () const |
| Returns the area this light value covers in meters squared.
|
|
float | GetEffectiveSolidAngle () |
| Returns the effective number of steradians that this light covers. See SetEffectiveSolidAngle() for details.
|
|
void | ConvertToPhotometricUnit (PhotometricUnit unit) |
| Converts this PhotometricValue to another photometric unit while maintaining the overall physical light intensity.
|
|
PhotometricUnit | GetType () const |
| Returns which light type this particular light is.
|
|
|
static void | Reflect (ReflectContext *context) |
|
static const char * | GetTypeSuffix (PhotometricUnit type) |
| Gets the characters for an abbreviation of a photometric unit including preceeding space character.
|
|
static float | ConvertIntensityBetweenUnits (PhotometricUnit fromUnit, PhotometricUnit toUnit, float intensity, float effectiveSolidAngle=OmnidirectionalSteradians, float area=1.0f) |
|
static float | GetPerceptualLuminance (AZ::Color color) |
| Returns a single luminance value in linear space from a color in linear sRGB space based on the percieved brightness of red, green, and blue.
|
|
|
static constexpr float | Ev100LightMeterConstantIlluminance = 250.0f |
|
static constexpr float | Ev100LightMeterConstantLuminance = 12.5f |
|
static constexpr float | Ev100Iso = 100.0f |
|
static constexpr float | Ev100ShutterSpeed = 1.0f |
|
static constexpr float | LuxToNitsRatio = 1.0f / Constants::Pi |
|
static constexpr float | OmnidirectionalSteradians = 4.0f * Constants::Pi |
|
static constexpr float | DirectionalEffectiveSteradians = Constants::Pi |
|
Stores and converts between photometric data stored in various units like Lux, Lumens, and EV100.
◆ PhotometricValue()
AZ::Render::PhotometricValue::PhotometricValue |
( |
float | intensity, |
|
|
const AZ::Color & | colorMask, |
|
|
PhotometricUnit | unit ) |
Creates a new photometric value.
- Parameters
-
intensity | - The value of the photometric unit. |
colorMask | - The 0.0 - 1.0 color of the light used as a mask against the value. |
unit | - The Photometric unit of the value. |
◆ ConvertIntensityBetweenUnits()
static float AZ::Render::PhotometricValue::ConvertIntensityBetweenUnits |
( |
PhotometricUnit | fromUnit, |
|
|
PhotometricUnit | toUnit, |
|
|
float | intensity, |
|
|
float | effectiveSolidAngle = OmnidirectionalSteradians, |
|
|
float | area = 1.0f ) |
|
static |
Converts intensity from the oldType to the newType given an area in meters squared. effectiveSolidAngle is only required when converting between candela and another type. area is only required when converting between one photometric unit that is in terms of area and another that is not.
◆ SetEffectiveSolidAngle()
void AZ::Render::PhotometricValue::SetEffectiveSolidAngle |
( |
float | steradians | ) |
|
Sets the effective number of steradians this light covers taking into account changes in brightness depending on the angle. For instance, a uniform omnidirectional light will output a full 4pi steradians, but a flat surface with lambertian emission will output only pi steradians over a hemisphere.
The documentation for this class was generated from the following file:
- Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PhotometricValue.h