RandomRayTest.h 717 B

123456789101112131415161718192021
  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. // Tests a lot of random rays against convex shapes
  7. class RandomRayTest : public Test
  8. {
  9. public:
  10. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, RandomRayTest)
  11. // Update the test, called before the physics update
  12. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  13. private:
  14. template <typename A, typename Context>
  15. void TestRay(const char *inTestName, RVec3Arg inRenderOffset, const A &inA, const Context &inContext, float (*inCompareFunc)(const Context &inContext, Vec3Arg inRayOrigin, Vec3Arg inRayDirection));
  16. };