ColliderRotationMode.h 1.4 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 <Editor/Source/ComponentModes/PhysXSubComponentModeBase.h>
  10. #include <AzToolsFramework/Manipulators/RotationManipulators.h>
  11. #include <AzFramework/Entity/EntityDebugDisplayBus.h>
  12. namespace PhysX
  13. {
  14. /// Sub component mode for modifying the rotation on a collider in the viewport.
  15. class ColliderRotationMode
  16. : public PhysXSubComponentModeBase
  17. , private AzFramework::EntityDebugDisplayEventBus::Handler
  18. {
  19. public:
  20. AZ_CLASS_ALLOCATOR_DECL
  21. ColliderRotationMode();
  22. // PhysXSubComponentModeBase ...
  23. void Setup(const AZ::EntityComponentIdPair& idPair) override;
  24. void Refresh(const AZ::EntityComponentIdPair& idPair) override;
  25. void Teardown(const AZ::EntityComponentIdPair& idPair) override;
  26. void ResetValues(const AZ::EntityComponentIdPair& idPair) override;
  27. private:
  28. // AzFramework::EntityDebugDisplayEventBus ...
  29. void DisplayEntityViewport(
  30. const AzFramework::ViewportInfo& viewportInfo,
  31. AzFramework::DebugDisplayRequests& debugDisplay) override;
  32. AzToolsFramework::RotationManipulators m_rotationManipulators;
  33. };
  34. } //namespace PhysX