InteractivePairsTest.h 1004 B

123456789101112131415161718192021222324
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <Tests/Test.h>
  5. // Renders pairs of objects and their collisions. Use Z, X, C keys to control distance.
  6. class InteractivePairsTest : public Test
  7. {
  8. public:
  9. JPH_DECLARE_RTTI_VIRTUAL(InteractivePairsTest)
  10. // Update the test, called before the physics update
  11. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  12. private:
  13. void TestBoxVsBox(Vec3Arg inTranslationA, Vec3Arg inRotationA, float inConvexRadiusA, const AABox &inA, Vec3Arg inTranslationB, Vec3Arg inRotationB, float inConvexRadiusB, const AABox &inB);
  14. void TestSphereVsBox(Vec3Arg inTranslationA, float inRadiusA, Vec3Arg inTranslationB, Vec3Arg inRotationB, float inConvexRadiusB, const AABox &inB);
  15. void TestSphereVsSphere(Vec3Arg inTranslationA, float inRadiusA, Vec3Arg inTranslationB, float inRadiusB, bool inTreatSphereAsPointWithConvexRadius);
  16. bool mKeyboardMode = false;
  17. float mDistance = 3.0f;
  18. };