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
29
42JPH_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);
43
#define JPH_EXPORT
Definition Core.h:283
unsigned int uint
Definition Core.h:510
#define JPH_NAMESPACE_END
Definition Core.h:434
#define JPH_NAMESPACE_BEGIN
Definition Core.h:428
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:14
Definition Body.h:39
Manifold class, describes the contact surface between two bodies.
Definition ContactListener.h:20
Simple variable length array backed by a fixed size buffer.
Definition StaticArray.h:14
Definition Vec3.h:17
A structure that contains the estimated contact and friction impulses and the resulting body velociti...
Definition EstimateCollisionResponse.h:13
float mAngularFrictionImpulse
Estimated angular friction impulse around the world space normal (kg m^2 / s)
Definition EstimateCollisionResponse.h:25
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
StaticArray< float, ContactPoints::Capacity > mContactImpulse
Estimated contact impulses (kg m / s)
Definition EstimateCollisionResponse.h:27
Vec3 mTangent2
Second normalized tangent of contact normal (forms a basis with mTangent1 and mWorldSpaceNormal)
Definition EstimateCollisionResponse.h:21
Vec3 mTangent1
Normalized tangent of contact normal.
Definition EstimateCollisionResponse.h:20
Vec3 mFrictionPoint
Point at which friction was applied (relative to mBaseOffset of the manifold)
Definition EstimateCollisionResponse.h:19
Vec3 mLinearVelocity1
The estimated linear velocity of body 1 after collision.
Definition EstimateCollisionResponse.h:14
float mFrictionImpulse1
Estimated friction impulses in the direction of tangent 1 (kg m / s)
Definition EstimateCollisionResponse.h:23
float mFrictionImpulse2
Estimated friction impulses in the direction of tangent 2 (kg m / s)
Definition EstimateCollisionResponse.h:24
Vec3 mAngularVelocity2
The estimated angular velocity of body 2 after collision.
Definition EstimateCollisionResponse.h:17