SoftBodyVertexRadiusTest.h 900 B

1234567891011121314151617181920212223242526272829303132
  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. #include <Jolt/Physics/SoftBody/SoftBodySharedSettings.h>
  7. class SoftBodyVertexRadiusTest : public Test
  8. {
  9. public:
  10. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, SoftBodyVertexRadiusTest)
  11. // Description of the test
  12. virtual const char * GetDescription() const override
  13. {
  14. return "Shows how you can use the vertex radius of a soft body to prevent z-fighting while rendering it.";
  15. }
  16. // See: Test
  17. virtual void Initialize() override;
  18. // Optional settings menu
  19. virtual bool HasSettingsMenu() const override { return true; }
  20. virtual void CreateSettingsMenu(DebugUI *inUI, UIElement *inSubMenu) override;
  21. private:
  22. Ref<SoftBodySharedSettings> mSharedSettings;
  23. static inline float sVertexRadius = 0.01f;
  24. };