PerformanceTestScene.h 755 B

12345678910111213141516171819202122232425
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. // Base class for a test scene to test performance
  6. class PerformanceTestScene
  7. {
  8. public:
  9. // Virtual destructor
  10. virtual ~PerformanceTestScene() { }
  11. // Get name of test for debug purposes
  12. virtual const char * GetName() const = 0;
  13. // Load assets for the scene
  14. virtual bool Load() { return true; }
  15. // Start a new test by adding objects to inPhysicsSystem
  16. virtual void StartTest(PhysicsSystem &inPhysicsSystem, EMotionQuality inMotionQuality) = 0;
  17. // Stop a test and remove objects from inPhysicsSystem
  18. virtual void StopTest(PhysicsSystem &inPhysicsSystem) { }
  19. };