HighSpeedTest.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <Tests/Test.h>
  5. // This test spawns a number of high speed objects to check that they don't tunnel through geometry
  6. class HighSpeedTest : public Test
  7. {
  8. public:
  9. JPH_DECLARE_RTTI_VIRTUAL(HighSpeedTest)
  10. // See: Test
  11. virtual void Initialize() override;
  12. // Number used to scale the terrain and camera movement to the scene
  13. virtual float GetWorldScale() const override { return sSelectedScene == 0? 1.0f : 0.2f; }
  14. // Optional settings menu
  15. virtual bool HasSettingsMenu() const override { return true; }
  16. virtual void CreateSettingsMenu(DebugUI *inUI, UIElement *inSubMenu) override;
  17. private:
  18. void CreateDynamicObject(Vec3 inPosition, Vec3 inVelocity, Shape *inShape, EMotionQuality inMotionQuality = EMotionQuality::LinearCast);
  19. void CreateDominoBlocks(Vec3Arg inOffset, int inNumWalls, float inDensity, float inRadius);
  20. void CreateFastSmallConvexObjects();
  21. void CreateSimpleScene();
  22. void CreateConvexOnLargeTriangles();
  23. void CreateConvexOnTerrain1();
  24. static const char * sScenes[];
  25. static int sSelectedScene;
  26. };