Declarations of the velocity and position constraint solver functions. More...
#include <playrho/Span.hpp>
#include <playrho/d2/Math.hpp>
#include <playrho/d2/PositionSolution.hpp>
Namespaces | |
playrho | |
playrho::d2 | |
Functions | |
d2::PositionSolution | playrho::GaussSeidel::SolvePositionConstraint (const d2::PositionConstraint &pc, bool moveA, bool moveB, const Span< d2::BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Momentum | playrho::GaussSeidel::SolveVelocityConstraint (d2::VelocityConstraint &vc, const Span< d2::BodyConstraint > &bodies) |
Solves the velocity constraint. More... | |
Declarations of the velocity and position constraint solver functions.
d2::PositionSolution playrho::GaussSeidel::SolvePositionConstraint | ( | const d2::PositionConstraint & | pc, |
bool | moveA, | ||
bool | moveB, | ||
const Span< d2::BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the given position constraint.
This pushes apart the two given positions for every point in the contact position constraint and returns the minimum separation value from the position solver manifold for each point.
Referenced by playrho::GaussSeidel::SolvePositionConstraint().
Momentum playrho::GaussSeidel::SolveVelocityConstraint | ( | d2::VelocityConstraint & | vc, |
const Span< d2::BodyConstraint > & | bodies | ||
) |
Solves the velocity constraint.
This updates the tangent and normal impulses of the velocity constraint points of the given velocity constraint and updates the given velocities.
vc | Velocity constraint to solve for. |
bodies | Collection of bodies containing the two for the velocity constraint. |
vc
must have a valid normal, a valid tangent, valid point relative positions, valid velocity biases, and 1 or 2 point counts. Referenced by playrho::GaussSeidel::SolveVelocityConstraint().