Engine
LinearDragForceGenerator Class Reference

Computes a simple linear drag force on the provided entity. More...

#include <linear_drag_force.h>

Public Member Functions

 LinearDragForceGenerator ()
 
 LinearDragForceGenerator (GLfloat beta)
 
GLfloat GetDragCoeff ()
 
void SetDragCoeff (GLfloat beta)
 
void AccumulateForce (std::shared_ptr< PhysicsEntity > entity, Vector3Gf &F) const
 
void AccumulatedFdv (const std::shared_ptr< PhysicsEntity > entity, Eigen::Matrix< GLfloat, 3, 3 > &dF) const
 

Detailed Description

Computes a simple linear drag force on the provided entity.

Constructor & Destructor Documentation

LinearDragForceGenerator::LinearDragForceGenerator ( )
LinearDragForceGenerator::LinearDragForceGenerator ( GLfloat  beta)

Constructs a LinearDragForceGenerator with the chosen drag coefficient

Parameters
betadrag coefficent

Member Function Documentation

void LinearDragForceGenerator::AccumulatedFdv ( const std::shared_ptr< PhysicsEntity entity,
Eigen::Matrix< GLfloat, 3, 3 > &  dF 
) const

Adds the velocity jacobian

Parameters
entityEntity whom the force is acting on
dFMatrix that will accumulate the derivative of force with respect to velocity
void LinearDragForceGenerator::AccumulateForce ( std::shared_ptr< PhysicsEntity entity,
Vector3Gf &  F 
) const

Adds a drag force whose magnitude is proportional to the drag coeffient

Parameters
entityEntity whom the force will be applied against
FForce vector that will accumulate the constant force represented by this instance
GLfloat LinearDragForceGenerator::GetDragCoeff ( )
Returns
the drag coefficent
void LinearDragForceGenerator::SetDragCoeff ( GLfloat  beta)

Sets the drag coefficent

Parameters
betadrag coefficient

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