SoftBodyLRAConstraintTest.h 829 B

1234567891011121314151617181920212223242526272829
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2024 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. #include <Tests/Test.h>
  6. class SoftBodyLRAConstraintTest : public Test
  7. {
  8. public:
  9. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, SoftBodyLRAConstraintTest)
  10. // Description of the test
  11. virtual const char * GetDescription() const override
  12. {
  13. return "Shows the effect of Long Range Attachment (LRA) constraints in a soft body which can help reduce cloth stretching.";
  14. }
  15. // See: Test
  16. virtual void Initialize() override;
  17. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  18. private:
  19. // Size and spacing of the cloth
  20. static constexpr int cNumVerticesX = 10;
  21. static constexpr int cNumVerticesZ = 50;
  22. static constexpr float cVertexSpacing = 0.5f;
  23. };