ROS2EditorCameraSystemComponent.h 1.9 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 "ROS2CameraSystemComponent.h"
  10. #include <AzToolsFramework/Entity/EditorEntityContextBus.h>
  11. #include <ROS2Sensors/ROS2SensorsTypeIds.h>
  12. namespace ROS2Sensors
  13. {
  14. /// Editor system component for ROS2 camera simulation.
  15. class ROS2EditorCameraSystemComponent
  16. : public ROS2SystemCameraComponent
  17. , private AzToolsFramework::EditorEntityContextNotificationBus::Handler
  18. {
  19. using BaseSystemComponent = ROS2SystemCameraComponent;
  20. public:
  21. AZ_COMPONENT(ROS2EditorCameraSystemComponent, ROS2Sensors::ROS2EditorCameraSystemComponentTypeId, BaseSystemComponent);
  22. static void Reflect(AZ::ReflectContext* context);
  23. private:
  24. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  25. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  26. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  27. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  28. //////////////////////////////////////////////////////////////////////////
  29. // Component overrides
  30. void Activate() override;
  31. void Deactivate() override;
  32. //////////////////////////////////////////////////////////////////////////
  33. //////////////////////////////////////////////////////////////////////////
  34. // EditorEntityContextNotificationBus overrides
  35. void OnStartPlayInEditorBegin() override;
  36. void OnStopPlayInEditor() override;
  37. //////////////////////////////////////////////////////////////////////////
  38. };
  39. } // namespace ROS2Sensors