CollidePointResult.h 713 B

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