MutableCompoundShapeTest.h 762 B

123456789101112131415161718192021222324252627282930
  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. class MutableCompoundShapeTest : public Test
  7. {
  8. public:
  9. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, MutableCompoundShapeTest)
  10. // See: Test
  11. virtual void Initialize() override;
  12. // Update the test, called before the physics update
  13. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  14. // Saving / restoring state for replay
  15. virtual void SaveState(StateRecorder &inStream) const override;
  16. virtual void RestoreState(StateRecorder &inStream) override;
  17. private:
  18. BodyIDVector mBodyIDs;
  19. RefConst<Shape> mSubCompound;
  20. int mFrameNumber = 0;
  21. };