Quark Physics
1.0
2D Rigid and Soft Body Physics Engine
|
QManifold retrieves collision data from collision tests between two QBody objects using QCollision methods and resolves collisions based on this data. The Solve() method applies collision reactions by changing the positions of contact partners, while the SolveFrictionAndVelocities() method applies friction to the contact partners and adjusts their velocity values. More...
#include <qmanifold.h>
Public Member Functions | |
QManifold (QBody *bodyA, QBody *bodyB) | |
void | Solve () |
void | SolveFrictionAndVelocities () |
Public Attributes | |
QBody * | bodyA |
QBody * | bodyB |
vector< QCollision::Contact * > | contacts |
QManifold retrieves collision data from collision tests between two QBody objects using QCollision methods and resolves collisions based on this data. The Solve() method applies collision reactions by changing the positions of contact partners, while the SolveFrictionAndVelocities() method applies friction to the contact partners and adjusts their velocity values.
Creates new manifold with two bodies.
bodyA | A body in the world. |
bodyB | Another body in the world. |
void QManifold::Solve | ( | ) |
Applies collision reactions by changing the positions of the contact partners.
void QManifold::SolveFrictionAndVelocities | ( | ) |
Applies friction to the contact partners and adjust their velocity values
vector<QCollision::Contact*> QManifold::contacts |
The collection of contacs from collision test using QCollision methods.