|
Momentum Scripting v1
|
#include <ContactPoint.h>
Public Member Functions | |
| ContactPoint () | |
| ContactPoint (const ContactPoint ©) | |
| std::shared_ptr< RigidBody > | getBody1 () const |
| std::shared_ptr< RigidBody > | getBody2 () const |
| std::shared_ptr< MaterialPair > | getContactMaterial () const |
| double | getDepth () const |
| Vec3 | getForce () const |
| Vec3 | getFrictionForce () const |
| Vec3 | getNormalForce () const |
| Vec3 | getPoint () const |
Static Public Member Functions | |
| static Vec3 | calculateSumForce (const std::vector< std::shared_ptr< ContactPoint > > &points) |
| static Vec3 | calculateSumFrictionForce (const std::vector< std::shared_ptr< ContactPoint > > &points) |
| static Vec3 | calculateSumNormalForce (const std::vector< std::shared_ptr< ContactPoint > > &points) |
A class describing a single contact point.
| MOMENTUM_NAMESPACE::ContactPoint::ContactPoint | ( | ) |
Default constructor.
| MOMENTUM_NAMESPACE::ContactPoint::ContactPoint | ( | const ContactPoint & | copy | ) |
|
static |
This static method will calculate the resulting sum of all Normal and Friction forces (in world coordinate system) for the specified contact points.
| points | - Vector of contact points |
|
static |
This static method will calculate the resulting sum of all Friction forces (in world coordinate system) for the specified contact points.
| points | - Vector of contact points |
|
static |
This static method will calculate the resulting sum of all Normal forces (in world coordinate system) for the specified contact points.
| points | - Vector of contact points |
| std::shared_ptr< RigidBody > MOMENTUM_NAMESPACE::ContactPoint::getBody1 | ( | ) | const |
Get the first of the bodies in the contact.
| std::shared_ptr< RigidBody > MOMENTUM_NAMESPACE::ContactPoint::getBody2 | ( | ) | const |
Get the second of the bodies in the contact.
| std::shared_ptr< MaterialPair > MOMENTUM_NAMESPACE::ContactPoint::getContactMaterial | ( | ) | const |
Get the contact material that the collision is using.
| double MOMENTUM_NAMESPACE::ContactPoint::getDepth | ( | ) | const |
Get the depth of the contact in meters, describing the size of the overlap.
| Vec3 MOMENTUM_NAMESPACE::ContactPoint::getForce | ( | ) | const |
Get the force that this contact applies to its bodies in Newton.
| Vec3 MOMENTUM_NAMESPACE::ContactPoint::getFrictionForce | ( | ) | const |
Get the friction force that this contact applies to its bodies in Newton.
Along the surface of the contact
| Vec3 MOMENTUM_NAMESPACE::ContactPoint::getNormalForce | ( | ) | const |
Get the normal that this contact applies to its bodies in Newton.
Orthogonal against the surface of the contact
| Vec3 MOMENTUM_NAMESPACE::ContactPoint::getPoint | ( | ) | const |
Get the point of the contact in the world.
In meters.