hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Public Attributes | Friends | List of all members
hx3d::physics2d::Manifold Class Reference

Contact manifold definition. More...

#include <manifold.hpp>

Public Member Functions

 Manifold (const Ptr< Collider > &a, const Ptr< Collider > &b)
 Create a manifold. More...
 
bool solve ()
 Solve the contact.
 
void initialize ()
 Initialize the manifold.
 
void applyImpulse ()
 Apply impulses to the colliders.
 
void positionalCorrection ()
 Do positional correction on the colliders.
 
void infiniteMassCorrection ()
 Do infinite mass correction on the colliders.
 

Public Attributes

Ptr< Collidera
 First collider.
 
Ptr< Colliderb
 Second collider.
 
float penetration
 Penetration coefficient.
 
bool disabled
 Is the contact disabled ?
 
glm::vec2 normal
 Normal vector.
 
std::vector< glm::vec2 > contacts
 Contact points.
 
float mixedRestitution
 Mixed restitution (e)
 
float mixedDynamicFriction
 Mixed dynamic friction (df)
 
float mixedStaticFriction
 Mixed static friction (sf)
 

Friends

bool operator< (const Manifold &m1, const Manifold &m2)
 Compare two manifolds using their penetration coefficients.
 

Detailed Description

Contact manifold definition.

Definition at line 33 of file manifold.hpp.

Constructor & Destructor Documentation

hx3d::physics2d::Manifold::Manifold ( const Ptr< Collider > &  a,
const Ptr< Collider > &  b 
)

Create a manifold.

Parameters
aFirst collider
bSecond collider

Definition at line 10 of file manifold.cpp.


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