ConstraintPriorityTest.h 803 B

12345678910111213141516171819202122232425262728
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2023 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. #include <Tests/Test.h>
  6. #include <Jolt/Physics/Constraints/FixedConstraint.h>
  7. class ConstraintPriorityTest : public Test
  8. {
  9. public:
  10. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, ConstraintPriorityTest)
  11. // Description of the test
  12. virtual const char * GetDescription() const override
  13. {
  14. return "Tests constraint priority system to demonstrate that the order of solving can have an effect on the simulation.\n"
  15. "Solving the root first will make the system stiffer.";
  16. }
  17. // See: Test
  18. virtual void Initialize() override;
  19. virtual void PostPhysicsUpdate(float inDeltaTime) override;
  20. private:
  21. Array<Ref<FixedConstraint>> mConstraints;
  22. };