CameraComponent.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/Component.h>
  10. #include <AzCore/Component/TransformBus.h>
  11. #include <AzFramework/Components/ComponentAdapter.h>
  12. #include <AzFramework/Components/CameraBus.h>
  13. #include <CameraComponentController.h>
  14. #include <Atom/RPI.Public/Base.h>
  15. #include <Atom/RPI.Public/ViewportContextBus.h>
  16. #include <Atom/RPI.Public/ViewProviderBus.h>
  17. #include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
  18. namespace Camera
  19. {
  20. //////////////////////////////////////////////////////////////////////////
  21. /// The CameraComponent holds all of the data necessary for a camera.
  22. /// Get and set data through the CameraRequestBus or TransformBus
  23. //////////////////////////////////////////////////////////////////////////
  24. using CameraComponentBase = AzFramework::Components::ComponentAdapter<CameraComponentController, CameraComponentConfig>;
  25. class CameraComponent
  26. : public CameraComponentBase
  27. {
  28. public:
  29. AZ_COMPONENT(CameraComponent, CameraComponentTypeId, AZ::Component);
  30. CameraComponent() = default;
  31. CameraComponent(const CameraComponentConfig& properties);
  32. virtual ~CameraComponent() = default;
  33. // AZ::Component interface
  34. void Activate() override;
  35. void Deactivate() override;
  36. static void Reflect(AZ::ReflectContext* reflection);
  37. };
  38. } // Camera