ShapeFilterTest.h 640 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <Tests/Test.h>
  3. class ShapeFilterTest : public Test
  4. {
  5. public:
  6. JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, ShapeFilterTest)
  7. // Description of the test
  8. virtual const char *GetDescription() const override
  9. {
  10. return "Demonstrates how to use a shape filter to filter out shapes during a collision query.";
  11. }
  12. // See: Test
  13. virtual void Initialize() override;
  14. virtual void PostPhysicsUpdate(float inDeltaTime) override;
  15. private:
  16. /// A value used as user data for a shape
  17. enum class ShapeIdentifier : uint64
  18. {
  19. Box = 42,
  20. Sphere = 43,
  21. Compound = 44
  22. };
  23. float mElapsedTime = 0.0f;
  24. ShapeRefC mCastShape;
  25. };