SimplePointLightDelegate.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/Component/TransformBus.h>
  10. #include <CoreLights/LightDelegateBase.h>
  11. #include <Atom/Feature/CoreLights/SimplePointLightFeatureProcessorInterface.h>
  12. #include <AzFramework/Entity/EntityDebugDisplayBus.h>
  13. namespace AZ::Render
  14. {
  15. class SimplePointLightDelegate final : public LightDelegateBase<SimplePointLightFeatureProcessorInterface>
  16. {
  17. public:
  18. SimplePointLightDelegate(EntityId entityId, bool isVisible);
  19. // LightDelegateBase overrides...
  20. float CalculateAttenuationRadius(float lightThreshold) const override;
  21. void DrawDebugDisplay(
  22. const Transform& transform,
  23. const Color& color,
  24. AzFramework::DebugDisplayRequests& debugDisplay,
  25. bool isSelected) const override;
  26. float GetSurfaceArea() const override;
  27. float GetEffectiveSolidAngle() const override;
  28. void SetAffectsGI(bool affectsGI) override;
  29. void SetAffectsGIFactor(float affectsGIFactor) override;
  30. Aabb GetLocalVisualizationBounds() const override;
  31. private:
  32. void HandleShapeChanged() override;
  33. };
  34. inline float SimplePointLightDelegate::GetEffectiveSolidAngle() const
  35. {
  36. return PhotometricValue::OmnidirectionalSteradians;
  37. }
  38. } // namespace AZ::Render