RayTracingDebugComponentController.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <AtomLyIntegration/CommonFeatures/Debug/RayTracingDebugBus.h>
  10. #include <AtomLyIntegration/CommonFeatures/Debug/RayTracingDebugComponentConfig.h>
  11. namespace AZ::Render
  12. {
  13. class RayTracingDebugComponentController final : public RayTracingDebugRequestBus::Handler
  14. {
  15. friend class RayTracingDebugEditorComponent;
  16. public:
  17. AZ_TYPE_INFO(RayTracingDebugComponentController, "{7B1CAB96-6B9E-46C4-BBDE-B140E8082CEB}");
  18. static void Reflect(ReflectContext* context);
  19. RayTracingDebugComponentController() = default;
  20. RayTracingDebugComponentController(const RayTracingDebugComponentConfig& config);
  21. void Activate(EntityId entityId);
  22. void Deactivate();
  23. void SetConfiguration(const RayTracingDebugComponentConfig& config);
  24. const RayTracingDebugComponentConfig& GetConfiguration() const;
  25. // clang-format off
  26. // Generate function override declarations (functions definitions in .cpp)
  27. #include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
  28. #include <Atom/Feature/Debug/RayTracingDebugParams.inl>
  29. #include <Atom/Feature/ParamMacros/EndParams.inl>
  30. // clang-format on
  31. private:
  32. void OnConfigurationChanged();
  33. RayTracingDebugSettingsInterface* m_rayTracingDebugSettingsInterface{ nullptr };
  34. EntityId m_entityId{ EntityId::InvalidEntityId };
  35. RayTracingDebugComponentConfig m_configuration;
  36. };
  37. } // namespace AZ::Render