RigPileTest.h 1.1 KB

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