Open 3D Engine Atom Gem API Reference
23.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
Stores and converts between photometric data stored in various units like Lux, Lumens, and EV100. More...
#include <PhotometricValue.h>
Public Member Functions | |
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 Public Member Functions | |
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. | |
Stores and converts between photometric data stored in various units like Lux, Lumens, and EV100.
AZ::Render::PhotometricValue::PhotometricValue | ( | float | intensity, |
const AZ::Color & | colorMask, | ||
PhotometricUnit | unit | ||
) |
Creates a new photometric value.
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. |
|
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.
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.