CollidePointResult.h 663 B

12345678910111213141516171819202122
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <Physics/Body/BodyID.h>
  5. #include <Physics/Collision/Shape/SubShapeID.h>
  6. namespace JPH {
  7. /// Structure that holds the result of colliding a point against a shape
  8. class CollidePointResult
  9. {
  10. public:
  11. /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For point queries there is no sensible return value.
  12. inline float GetEarlyOutFraction() const { return 0.0f; }
  13. BodyID mBodyID; ///< Body that was hit
  14. SubShapeID mSubShapeID2; ///< Sub shape ID of shape that we collided against
  15. };
  16. } // JPH