HitDetectionJointWidget.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #if !defined(Q_MOC_RUN)
  10. #include <Editor/Plugins/ColliderWidgets/HitDetectionOutlinerNotificationHandler.h>
  11. #include <Editor/SkeletonModelJointWidget.h>
  12. #endif
  13. namespace Physics
  14. {
  15. class CharacterColliderNodeConfiguration;
  16. };
  17. namespace EMotionFX
  18. {
  19. class AddColliderButton;
  20. class ColliderContainerWidget;
  21. class HitDetectionJointWidget : public SkeletonModelJointWidget
  22. {
  23. Q_OBJECT // AUTOMOC
  24. public:
  25. HitDetectionJointWidget(QWidget* parent = nullptr);
  26. ~HitDetectionJointWidget() = default;
  27. QString GetCardTitle() const override
  28. {
  29. return "Hit Detection";
  30. }
  31. QColor GetColor() const override
  32. {
  33. return QColor{ "#4A90E2" };
  34. }
  35. public slots:
  36. void OnAddCollider(const AZ::TypeId& colliderType);
  37. void OnCopyCollider(size_t colliderIndex);
  38. void OnPasteCollider(size_t colliderIndex, bool replace);
  39. void OnRemoveCollider(size_t colliderIndex);
  40. public:
  41. HitDetectionOutlinerNotificationHandler m_handler;
  42. int WidgetCount() const override;
  43. private:
  44. // SkeletonModelJointWidget
  45. QWidget* CreateContentWidget(QWidget* parent) override;
  46. void InternalReinit() override;
  47. Physics::CharacterColliderNodeConfiguration* GetNodeConfig() const;
  48. int m_widgetCount = 0;
  49. };
  50. } // namespace EMotionFX