ROS2CameraSystemComponent.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 <Atom/RPI.Public/Pass/PassSystemInterface.h>
  10. #include <AzCore/Component/Component.h>
  11. #include <ROS2Sensors/ROS2SensorsTypeIds.h>
  12. namespace ROS2
  13. {
  14. //! System Component for Camera simulation in ROS 2.
  15. class ROS2SystemCameraComponent : public AZ::Component
  16. {
  17. public:
  18. AZ_COMPONENT(ROS2SystemCameraComponent, ROS2Sensors::ROS2SystemCameraComponentTypeId, AZ::Component);
  19. static void Reflect(AZ::ReflectContext* context);
  20. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  21. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  22. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  23. void InitPassTemplateMappingsHandler();
  24. protected:
  25. ////////////////////////////////////////////////////////////////////////
  26. // AZ::Component override
  27. void Activate() override;
  28. void Deactivate() override;
  29. ////////////////////////////////////////////////////////////////////////
  30. private:
  31. //! Load the pass templates of the ROS 2 Camera.
  32. void LoadPassTemplateMappings();
  33. AZ::RPI::PassSystemInterface::OnReadyLoadTemplatesEvent::Handler m_loadTemplatesHandler;
  34. };
  35. } // namespace ROS2