ClosestPointTest.h 662 B

123456789101112131415161718192021
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <Tests/Test.h>
  5. // Test that interactively shows the algorithms from the ClosestPoints namespace
  6. class ClosestPointTest : public Test
  7. {
  8. public:
  9. JPH_DECLARE_RTTI_VIRTUAL(ClosestPointTest)
  10. // Update the test, called before the physics update
  11. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  12. private:
  13. void TestLine(Vec3Arg inPosition, Vec3Arg inA, Vec3Arg inB);
  14. void TestTri(Vec3Arg inPosition, Vec3Arg inA, Vec3Arg inB, Vec3Arg inC);
  15. void TestTetra(Vec3Arg inPosition, Vec3Arg inA, Vec3Arg inB, Vec3Arg inC, Vec3Arg inD);
  16. };