BroadPhaseInsertionTest.h 775 B

1234567891011121314151617181920212223242526
  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/BroadPhase/BroadPhaseTest.h>
  6. #include <random>
  7. // Test that adds/removes objects to/from the broadphase and casts a ray through the boxes to see if the collision results are correct
  8. class BroadPhaseInsertionTest : public BroadPhaseTest
  9. {
  10. public:
  11. JPH_DECLARE_RTTI_VIRTUAL(BroadPhaseInsertionTest)
  12. // Initialize the test
  13. virtual void Initialize() override;
  14. // Update the test, called before the physics update
  15. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  16. private:
  17. default_random_engine mRandomGenerator;
  18. size_t mCurrentBody = 0;
  19. int mDirection = 1;
  20. };