Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
EstimateCollisionResponse.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2023 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
8
10
13{
18
21
22 struct Impulse
23 {
27 };
28
30
32};
33
46JPH_EXPORT void EstimateCollisionResponse(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, CollisionEstimationResult &outResult, float inCombinedFriction, float inCombinedRestitution, float inMinVelocityForRestitution = 1.0f, uint inNumIterations = 10);
47
#define JPH_EXPORT
Definition: Core.h:227
unsigned int uint
Definition: Core.h:439
#define JPH_NAMESPACE_END
Definition: Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
JPH_EXPORT void EstimateCollisionResponse(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, CollisionEstimationResult &outResult, float inCombinedFriction, float inCombinedRestitution, float inMinVelocityForRestitution=1.0f, uint inNumIterations=10)
Definition: EstimateCollisionResponse.cpp:12
Definition: Body.h:35
Manifold class, describes the contact surface between two bodies.
Definition: ContactListener.h:20
Definition: Vec3.h:16
Definition: EstimateCollisionResponse.h:23
float mFrictionImpulse2
Estimated friction impulses in the direction of tangent 2 (kg m / s)
Definition: EstimateCollisionResponse.h:26
float mContactImpulse
Estimated contact impulses (kg m / s)
Definition: EstimateCollisionResponse.h:24
float mFrictionImpulse1
Estimated friction impulses in the direction of tangent 1 (kg m / s)
Definition: EstimateCollisionResponse.h:25
A structure that contains the estimated contact and friction impulses and the resulting body velociti...
Definition: EstimateCollisionResponse.h:13
Vec3 mLinearVelocity2
The estimated linear velocity of body 2 after collision.
Definition: EstimateCollisionResponse.h:16
Vec3 mAngularVelocity1
The estimated angular velocity of body 1 after collision.
Definition: EstimateCollisionResponse.h:15
Vec3 mTangent2
Second normalized tangent of contact normal (forms a basis with mTangent1 and mWorldSpaceNormal)
Definition: EstimateCollisionResponse.h:20
Vec3 mTangent1
Normalized tangent of contact normal.
Definition: EstimateCollisionResponse.h:19
Impulses mImpulses
Definition: EstimateCollisionResponse.h:31
Vec3 mLinearVelocity1
The estimated linear velocity of body 1 after collision.
Definition: EstimateCollisionResponse.h:14
Vec3 mAngularVelocity2
The estimated angular velocity of body 2 after collision.
Definition: EstimateCollisionResponse.h:17