EActiveEdgeMode
Definition: ActiveEdgeMode.h:12
EBackFaceMode
How collision detection functions will treat back facing triangles.
Definition: BackFaceMode.h:11
ECollectFacesMode
Whether or not to collect faces, used by CastShape and CollideShape.
Definition: CollectFacesMode.h:11
#define JPH_NAMESPACE_END
Definition: Core.h:378
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:31
JPH_NAMESPACE_BEGIN constexpr float cDefaultCollisionTolerance
If objects are closer than this distance, they are considered to be colliding (used for GJK) (unit: m...
Definition: PhysicsSettings.h:10
constexpr float cDefaultPenetrationTolerance
A factor that determines the accuracy of the penetration depth calculation. If the change of the squa...
Definition: PhysicsSettings.h:13
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition: BodyID.h:13
Settings to be passed with a collision query.
Definition: CollideShape.h:72
float mCollisionTolerance
If objects are closer than this distance, they are considered to be colliding (used for GJK) (unit: m...
Definition: CollideShape.h:83
ECollectFacesMode mCollectFacesMode
If colliding faces should be collected or only the collision point.
Definition: CollideShape.h:80
float mPenetrationTolerance
A factor that determines the accuracy of the penetration depth calculation. If the change of the squa...
Definition: CollideShape.h:86
JPH_OVERRIDE_NEW_DELETE EActiveEdgeMode mActiveEdgeMode
How active edges (edges that a moving object should bump into) are handled.
Definition: CollideShape.h:77
Vec3 mActiveEdgeMovementDirection
When mActiveEdgeMode is CollideOnlyWithActive a movement direction can be provided....
Definition: CollideShape.h:89
Class that contains all information of two colliding shapes.
Definition: CollideShape.h:19
SubShapeID mSubShapeID1
Sub shape ID that identifies the face on shape 1.
Definition: CollideShape.h:63
BodyID mBodyID2
BodyID to which shape 2 belongs to.
Definition: CollideShape.h:65
Vec3 mContactPointOn2
Contact point on the surface of shape 2 (in world space or relative to base offset)....
Definition: CollideShape.h:60
Vec3 mPenetrationAxis
Direction to move shape 2 out of collision along the shortest path (magnitude is meaningless,...
Definition: CollideShape.h:61
Vec3 mContactPointOn1
Contact point on the surface of shape 1 (in world space or relative to base offset)
Definition: CollideShape.h:59
JPH_OVERRIDE_NEW_DELETE CollideShapeResult()=default
Default constructor.
CollideShapeResult Reversed() const
Reverses the hit result, swapping contact point 1 with contact point 2 etc.
Definition: CollideShape.h:42
CollideShapeResult(Vec3Arg inContactPointOn1, Vec3Arg inContactPointOn2, Vec3Arg inPenetrationAxis, float inPenetrationDepth, const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2, const BodyID &inBodyID2)
Constructor.
Definition: CollideShape.h:27
float mPenetrationDepth
Penetration depth (move shape 2 by this distance to resolve the collision)
Definition: CollideShape.h:62
Face mShape1Face
Colliding face on shape 1 (optional result, in world space or relative to base offset)
Definition: CollideShape.h:66
SubShapeID mSubShapeID2
Sub shape ID that identifies the face on shape 2.
Definition: CollideShape.h:64
float GetEarlyOutFraction() const
Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'....
Definition: CollideShape.h:39
Face mShape2Face
Colliding face on shape 2 (optional result, in world space or relative to base offset)
Definition: CollideShape.h:67
Settings to be passed with a collision query.
Definition: CollideShape.h:94
JPH_OVERRIDE_NEW_DELETE float mMaxSeparationDistance
When > 0 contacts in the vicinity of the query shape can be found. All nearest contacts that are not ...
Definition: CollideShape.h:99
EBackFaceMode mBackFaceMode
How backfacing triangles should be treated.
Definition: CollideShape.h:102
A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...
Definition: SubShapeID.h:23
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition: Vec3.inl:107