// SPDX-FileCopyrightText: 2021 Jorrit Rouwe // SPDX-License-Identifier: MIT #pragma once #include // Create a convex hull, shrink it with the convex radius and expand it again to check the error class ConvexHullShrinkTest : public Test { public: JPH_DECLARE_RTTI_VIRTUAL(ConvexHullShrinkTest) // Initialize the test virtual void Initialize() override; // Update the test, called before the physics update virtual void PrePhysicsUpdate(const PreUpdateParams &inParams) override; // Number used to scale the terrain and camera movement to the scene virtual float GetWorldScale() const override { return 0.2f; } private: // A list of predefined points to feed the convex hull algorithm using Points = Array; Array mPoints; // Which index in the list we're currently using size_t mIteration = 0; };