JSim 2026.06.01-p(1)
Loading...
Searching...
No Matches
contact_solver.hpp
Go to the documentation of this file.
1// Copyright (c) JSim contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the LGPLv3 license file in the root directory of this project.
4
5#pragma once
6
8
9namespace frcsim {
10
11class RigidBody; // Forward declaration
12
17public:
18 virtual ~ContactSolver() = default;
19
27 virtual void SolveContacts(
28 RigidBody* bodyA,
29 RigidBody* bodyB,
30 const CollisionManifold& manifold,
31 double dt) = 0;
32};
33
34} // namespace frcsim
Solves contact constraints applying impulses to resolve interpenetration and calculate friction.
Definition contact_solver.hpp:16
virtual ~ContactSolver()=default
virtual void SolveContacts(RigidBody *bodyA, RigidBody *bodyB, const CollisionManifold &manifold, double dt)=0
Modifies velocities to resolve contact and penetration.
Simulated rigid body with translational/angular dynamics and optional aero metadata.
Definition rigid_body.hpp:44
Definition vector.hpp:13
Represents the result of a collision check between two shapes.
Definition collision_detector.hpp:28