Open 3D Engine AtomLyIntegration Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Render::PolygonLightDelegate Class Referencefinal

#include <PolygonLightDelegate.h>

Inherits AZ::Render::LightDelegateBase< PolygonLightFeatureProcessorInterface >.

Public Member Functions

 PolygonLightDelegate (LmbrCentral::PolygonPrismShapeComponentRequests *shapeBus, EntityId entityId, bool isVisible)
 
void SetLightEmitsBothDirections (bool lightEmitsBothDirections) override
 Sets if this shape is double-sided (only applicable for 2d shapes).
 
float GetSurfaceArea () const override
 Gets the surface area of the shape.
 
float GetEffectiveSolidAngle () const override
 Returns the number of steradians covered by this light type.
 
float CalculateAttenuationRadius (float lightThreshold) const override
 Calculates the attenuation radius for this light type based on a threshold value.
 
void DrawDebugDisplay (const Transform &transform, const Color &color, AzFramework::DebugDisplayRequests &debugDisplay, bool isSelected) const override
 Handle any additional debug display drawing for beyond what the shape already provides.
 
Aabb GetLocalVisualizationBounds () const override
 Returns the Aabb for the debug visualization of the light.
 
- Public Member Functions inherited from AZ::Render::LightDelegateBase< PolygonLightFeatureProcessorInterface >
 LightDelegateBase (EntityId entityId, bool isVisible)
 
void SetConfig (const AreaLightComponentConfig *config) override
 Sets the area light component config so delegates don't have to cache the same data locally.
 
void SetChroma (const Color &chroma) override
 Sets the color of the light independent of light intensity. The color is a mask on the total light intensity.
 
void SetIntensity (float intensity) override
 Sets the light intensity.
 
float SetPhotometricUnit (PhotometricUnit unit) override
 Sets the light unit, and returns the converted light intensity.
 
void SetAttenuationRadius (float radius) override
 Sets the maximum distance from any part of the surface of the area light at which this light will have an effect.
 
const PhotometricValue & GetPhotometricValue () const override
 Gets the light intensity.
 
void SetLightEmitsBothDirections (bool lightEmitsBothDirections) override
 Sets if this shape is double-sided (only applicable for 2d shapes).
 
void SetUseFastApproximation (bool useFastApproximation) override
 
void SetVisibility (bool visibility) override
 Turns the visibility of this light on/off.
 
void SetEnableShutters (bool enabled) override
 
void SetShutterAngles (float innerAngleDegrees, float outerAngleDegrees) override
 
void SetEnableShadow (bool enabled) override
 Sets if shadows should be enabled.
 
void SetShadowBias (float bias) override
 Sets the shadow bias.
 
void SetShadowmapMaxSize (ShadowmapSize size) override
 Sets the maximum resolution of the shadow map.
 
void SetShadowFilterMethod (ShadowFilterMethod method) override
 Sets the filter method for the shadow.
 
void SetFilteringSampleCount (uint32_t count) override
 Sets the sample count for filtering of the shadow boundary, max 64.
 
void SetEsmExponent (float esmExponent) override
 Sets the Esm exponent to use. Higher values produce a steeper falloff between light and shadow.
 
void SetNormalShadowBias (float bias) override
 Sets the normal bias. Reduces acne by biasing the shadowmap lookup along the geometric normal.
 
void SetShadowCachingMode (AreaLightComponentConfig::ShadowCachingMode cachingMode) override
 
void SetAffectsGI (bool affectsGI) override
 Sets if the light should affect diffuse global illumination.
 
void SetAffectsGIFactor (float affectsGIFactor) override
 Sets the multiplier on the contribution to diffuse global illumination.
 
virtual void SetConfig (const AreaLightComponentConfig *config)=0
 Sets the area light component config so delegates don't have to cache the same data locally.
 
virtual void SetChroma (const Color &chroma)=0
 Sets the color of the light independent of light intensity. The color is a mask on the total light intensity.
 
virtual void SetIntensity (float intensity)=0
 Sets the light intensity.
 
virtual float SetPhotometricUnit (PhotometricUnit unit)=0
 Sets the light unit, and returns the converted light intensity.
 
virtual void SetAttenuationRadius (float radius)=0
 Sets the maximum distance from any part of the surface of the area light at which this light will have an effect.
 
virtual const PhotometricValue & GetPhotometricValue () const =0
 Gets the light intensity.
 
virtual float GetSurfaceArea () const =0
 Gets the surface area of the shape.
 
virtual float GetEffectiveSolidAngle () const =0
 Returns the number of steradians covered by this light type.
 
virtual void SetLightEmitsBothDirections (bool lightEmitsBothDirections)=0
 Sets if this shape is double-sided (only applicable for 2d shapes).
 
virtual void SetUseFastApproximation (bool useFastApproximation)=0
 
virtual float CalculateAttenuationRadius (float lightThreshold) const =0
 Calculates the attenuation radius for this light type based on a threshold value.
 
virtual void DrawDebugDisplay (const Transform &transform, const Color &color, AzFramework::DebugDisplayRequests &debugDisplay, bool isSelected) const =0
 Handle any additional debug display drawing for beyond what the shape already provides.
 
virtual void SetVisibility (bool visibility)=0
 Turns the visibility of this light on/off.
 
virtual void SetEnableShutters (bool enabled)=0
 
virtual void SetShutterAngles (float innerAngleDegrees, float outerAngleDegrees)=0
 
virtual void SetEnableShadow (bool enabled)=0
 Sets if shadows should be enabled.
 
virtual void SetShadowBias (float bias)=0
 Sets the shadow bias.
 
virtual void SetShadowmapMaxSize (ShadowmapSize size)=0
 Sets the maximum resolution of the shadow map.
 
virtual void SetShadowFilterMethod (ShadowFilterMethod method)=0
 Sets the filter method for the shadow.
 
virtual void SetFilteringSampleCount (uint32_t count)=0
 Sets the sample count for filtering of the shadow boundary, max 64.
 
virtual void SetEsmExponent (float exponent)=0
 Sets the Esm exponent to use. Higher values produce a steeper falloff between light and shadow.
 
virtual void SetNormalShadowBias (float bias)=0
 Sets the normal bias. Reduces acne by biasing the shadowmap lookup along the geometric normal.
 
virtual void SetShadowCachingMode (AreaLightComponentConfig::ShadowCachingMode cachingMode)=0
 
virtual void SetAffectsGI (bool affectsGI)=0
 Sets if the light should affect diffuse global illumination.
 
virtual void SetAffectsGIFactor (float affectsGIFactor)=0
 Sets the multiplier on the contribution to diffuse global illumination.
 
virtual Aabb GetLocalVisualizationBounds () const =0
 Returns the Aabb for the debug visualization of the light.
 

Additional Inherited Members

- Protected Member Functions inherited from AZ::Render::LightDelegateBase< PolygonLightFeatureProcessorInterface >
void InitBase (EntityId entityId)
 
PolygonLightFeatureProcessorInterface * GetFeatureProcessor () const
 
const AreaLightComponentConfigGetConfig () const
 
FeatureProcessorType::LightHandle GetLightHandle () const
 
const Transform & GetTransform () const
 
bool GetShuttersEnabled ()
 
bool GetShadowsEnabled ()
 
virtual void HandleShapeChanged ()=0
 
void OnShapeChanged (ShapeChangeReasons changeReason) override
 
void OnTransformChanged (const Transform &local, const Transform &world) override
 
- Protected Attributes inherited from AZ::Render::LightDelegateBase< PolygonLightFeatureProcessorInterface >
LmbrCentral::ShapeComponentRequests * m_shapeBus
 

Detailed Description

Manages rendering a Polygon light through the Polygon light feature processor and communication with a Polygon shape bus for the area light component.

Member Function Documentation

◆ CalculateAttenuationRadius()

float AZ::Render::PolygonLightDelegate::CalculateAttenuationRadius ( float  lightThreshold) const
overridevirtual

Calculates the attenuation radius for this light type based on a threshold value.

Implements AZ::Render::LightDelegateInterface.

◆ DrawDebugDisplay()

void AZ::Render::PolygonLightDelegate::DrawDebugDisplay ( const Transform &  transform,
const Color &  color,
AzFramework::DebugDisplayRequests &  debugDisplay,
bool  isSelected 
) const
overridevirtual

Handle any additional debug display drawing for beyond what the shape already provides.

Implements AZ::Render::LightDelegateInterface.

◆ GetEffectiveSolidAngle()

float AZ::Render::PolygonLightDelegate::GetEffectiveSolidAngle ( ) const
inlineoverridevirtual

Returns the number of steradians covered by this light type.

Implements AZ::Render::LightDelegateInterface.

◆ GetLocalVisualizationBounds()

Aabb AZ::Render::PolygonLightDelegate::GetLocalVisualizationBounds ( ) const
overridevirtual

Returns the Aabb for the debug visualization of the light.

Implements AZ::Render::LightDelegateInterface.

◆ GetSurfaceArea()

float AZ::Render::PolygonLightDelegate::GetSurfaceArea ( ) const
overridevirtual

Gets the surface area of the shape.

Implements AZ::Render::LightDelegateInterface.

◆ SetLightEmitsBothDirections()

void AZ::Render::PolygonLightDelegate::SetLightEmitsBothDirections ( bool  lightEmitsBothDirections)
overridevirtual

Sets if this shape is double-sided (only applicable for 2d shapes).

Implements AZ::Render::LightDelegateInterface.


The documentation for this class was generated from the following file: