RandomRayTest.h 637 B

1234567891011121314151617181920
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <Tests/Test.h>
  5. // Tests a lot of random rays against convex shapes
  6. class RandomRayTest : public Test
  7. {
  8. public:
  9. JPH_DECLARE_RTTI_VIRTUAL(RandomRayTest)
  10. // Update the test, called before the physics update
  11. virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override;
  12. private:
  13. template <typename A, typename Context>
  14. void TestRay(const char *inTestName, Vec3Arg inRenderOffset, const A &inA, const Context &inContext, float (*inCompareFunc)(const Context &inContext, Vec3Arg inRayOrigin, Vec3Arg inRayDirection));
  15. };