Engine
GravityForceGenerator Class Reference

Computes graviational force of attraction between 2 entities. More...

#include <gravity_force.h>

Public Member Functions

 GravityForceGenerator ()
 
void AccumulateForce (const std::shared_ptr< PhysicsEntity > e1, const std::shared_ptr< PhysicsEntity > e2, Vector3Gf &F) const
 
void AccumulatedFdx (const std::shared_ptr< PhysicsEntity > e1, const std::shared_ptr< PhysicsEntity > e2, Eigen::Matrix< GLfloat, 3, 3 > &dF) const
 

Detailed Description

Computes graviational force of attraction between 2 entities.

Constructor & Destructor Documentation

GravityForceGenerator::GravityForceGenerator ( )

Member Function Documentation

void GravityForceGenerator::AccumulatedFdx ( const std::shared_ptr< PhysicsEntity e1,
const std::shared_ptr< PhysicsEntity e2,
Eigen::Matrix< GLfloat, 3, 3 > &  dF 
) const

Adds the position jacobian

Parameters
e1Entity whom the force is acting on
e2Entity which is gravitationally interacting with e1
dFMatrix that will accumulate the derivative of force with respect to position
void GravityForceGenerator::AccumulateForce ( const std::shared_ptr< PhysicsEntity e1,
const std::shared_ptr< PhysicsEntity e2,
Vector3Gf &  F 
) const

Adds a constant force determined by the mass of the provided entity and the stored acceleration vector

Parameters
e1Entity whom the force is acting on
e2Entity which is gravitationally interacting with e1
FForce vector that will accumulate the constant force represented by this instance

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