RigPileTest.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. class RigPileTest : public Test
  8. {
  9. public:
  10. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, RigPileTest)
  11. // Description of the test
  12. virtual const char * GetDescription() const override
  13. {
  14. return "Tests the performance of a pile of ragdolls on a terrain.";
  15. }
  16. // Destructor
  17. virtual ~RigPileTest() override;
  18. // Number used to scale the terrain and camera movement to the scene
  19. virtual float GetWorldScale() const override { return 0.2f; }
  20. virtual void Initialize() override;
  21. // Optional settings menu
  22. virtual bool HasSettingsMenu() const override { return true; }
  23. virtual void CreateSettingsMenu(DebugUI *inUI, UIElement *inSubMenu) override;
  24. private:
  25. // List of possible scene names
  26. static const char * sScenes[];
  27. // Filename of animation to load for this test
  28. static const char * sSceneName;
  29. // Number of ragdolls per pile
  30. static int sPileSize;
  31. // Number of piles per axis
  32. static int sNumPilesPerAxis;
  33. // All active ragdolls
  34. Array<Ref<Ragdoll>> mRagdolls;
  35. };