SoftBodyBendConstraintTest.h 681 B

123456789101112131415161718192021222324
  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. // This test shows the effect of bend constraints in a soft body.
  7. class SoftBodyBendConstraintTest : public Test
  8. {
  9. public:
  10. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, SoftBodyBendConstraintTest)
  11. // See: Test
  12. virtual void Initialize() override;
  13. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  14. private:
  15. // Size and spacing of the cloth
  16. static constexpr int cNumVerticesX = 10;
  17. static constexpr int cNumVerticesZ = 10;
  18. static constexpr float cVertexSpacing = 0.5f;
  19. };