Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/jolt_physics/Jolt/Physics/Collision/CollidePointResult.h
9912 views
1
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2
// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3
// SPDX-License-Identifier: MIT
4
5
#pragma once
6
7
#include <Jolt/Physics/Body/BodyID.h>
8
#include <Jolt/Physics/Collision/Shape/SubShapeID.h>
9
10
JPH_NAMESPACE_BEGIN
11
12
/// Structure that holds the result of colliding a point against a shape
13
class CollidePointResult
14
{
15
public:
16
JPH_OVERRIDE_NEW_DELETE
17
18
/// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For point queries there is no sensible return value.
19
inline float GetEarlyOutFraction() const { return 0.0f; }
20
21
BodyID mBodyID; ///< Body that was hit
22
SubShapeID mSubShapeID2; ///< Sub shape ID of shape that we collided against
23
};
24
25
JPH_NAMESPACE_END
26
27