Quark Physics  1.0
2D Rigid and Soft Body Physics Engine
QManifold Class Reference

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>

Collaboration diagram for QManifold:

Public Member Functions

 QManifold (QBody *bodyA, QBody *bodyB)
 
void Solve ()
 
void SolveFrictionAndVelocities ()
 

Public Attributes

QBodybodyA
 
QBodybodyB
 
vector< QCollision::Contact * > contacts
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QManifold()

QManifold::QManifold ( QBody bodyA,
QBody bodyB 
)

Creates new manifold with two bodies.

Parameters
bodyAA body in the world.
bodyBAnother body in the world.

Member Function Documentation

◆ Solve()

void QManifold::Solve ( )

Applies collision reactions by changing the positions of the contact partners.

◆ SolveFrictionAndVelocities()

void QManifold::SolveFrictionAndVelocities ( )

Applies friction to the contact partners and adjust their velocity values

Member Data Documentation

◆ contacts

vector<QCollision::Contact*> QManifold::contacts

The collection of contacs from collision test using QCollision methods.


The documentation for this class was generated from the following files: