LoadSaveBinaryRigTest.h 842 B

1234567891011121314151617181920212223242526272829303132
  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/Test.h>
  6. #include <Jolt/Physics/Ragdoll/Ragdoll.h>
  7. class LoadSaveBinaryRigTest : public Test
  8. {
  9. public:
  10. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, LoadSaveBinaryRigTest)
  11. // Description of the test
  12. virtual const char * GetDescription() const override
  13. {
  14. return "Loads a ragdoll from disc, writes it to a binary stream, loads it again and simulates it.";
  15. }
  16. // Destructor
  17. virtual ~LoadSaveBinaryRigTest() override;
  18. // Number used to scale the terrain and camera movement to the scene
  19. virtual float GetWorldScale() const override { return 0.2f; }
  20. virtual void Initialize() override;
  21. private:
  22. // Our ragdoll
  23. Ref<Ragdoll> mRagdoll;
  24. };