RigPileTest.h 950 B

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <Tests/Test.h>
  5. #include <Jolt/Physics/Ragdoll/Ragdoll.h>
  6. // This test tests the performance of a pile of ragdolls on a terrain.
  7. class RigPileTest : public Test
  8. {
  9. public:
  10. JPH_DECLARE_RTTI_VIRTUAL(RigPileTest)
  11. // Destructor
  12. virtual ~RigPileTest() override;
  13. // Number used to scale the terrain and camera movement to the scene
  14. virtual float GetWorldScale() const override { return 0.2f; }
  15. virtual void Initialize() override;
  16. // Optional settings menu
  17. virtual bool HasSettingsMenu() const override { return true; }
  18. virtual void CreateSettingsMenu(DebugUI *inUI, UIElement *inSubMenu) override;
  19. private:
  20. // List of possible scene names
  21. static const char * sScenes[];
  22. // Filename of animation to load for this test
  23. static const char * sSceneName;
  24. // All active ragdolls
  25. Array<Ref<Ragdoll>> mRagdolls;
  26. };