ClothJointWidget.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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/ClothOutlinerNotificationHandler.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 ClothJointWidget : public SkeletonModelJointWidget
  22. {
  23. Q_OBJECT // AUTOMOC
  24. public:
  25. ClothJointWidget(QWidget* parent = nullptr);
  26. ~ClothJointWidget() = default;
  27. static Physics::CharacterColliderNodeConfiguration* GetNodeConfig(const QModelIndex& modelIndex);
  28. QString GetCardTitle() const override
  29. {
  30. return "Cloth Colliders";
  31. }
  32. QColor GetColor() const override
  33. {
  34. return QColor{ "#a675ff" };
  35. }
  36. public slots:
  37. void OnAddCollider(const AZ::TypeId& colliderType);
  38. void OnCopyCollider(size_t colliderIndex);
  39. void OnPasteCollider(size_t colliderIndex, bool replace);
  40. void OnRemoveCollider(size_t colliderIndex);
  41. protected:
  42. int WidgetCount() const override;
  43. public:
  44. ClothOutlinerNotificationHandler m_handler;
  45. private:
  46. // SkeletonModelJointWidget
  47. QWidget* CreateContentWidget(QWidget* parent) override;
  48. void InternalReinit() override;
  49. Physics::CharacterColliderNodeConfiguration* GetNodeConfig() const;
  50. int m_widgetCount = 0;
  51. };
  52. } // namespace EMotionFX