CollidePointResult.h 777 B

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