NetForceAccumulator::NetForceAccumulator |
( |
| ) |
|
void NetForceAccumulator::AddConstantForce |
( |
Vector3Gf |
a | ) |
|
Adds a new constant force to the simuluation
- Parameters
-
a | acceleration vector of the new constant force |
void NetForceAccumulator::AddSpring |
( |
Spring |
spring | ) |
|
Adds a spring to the force simulation
- Parameters
-
void NetForceAccumulator::ComputeNetForce |
( |
const std::vector< std::shared_ptr< PhysicsEntity >> & |
entity_ptrs, |
|
|
const std::shared_ptr< PhysicsEntity > |
entity_ptr, |
|
|
Vector3Gf & |
force |
|
) |
| const |
Computes the net force acting on an entity in the sumulation via accumulation
- Parameters
-
entity_ptrs | list of all entities in the simulation |
entity_ptr | entity whom the net force is acting on |
force | vector that will be modified to contain the net force acting on the supplied entity |
void NetForceAccumulator::ComputeNetForceJacobian |
( |
const std::vector< std::shared_ptr< PhysicsEntity >> & |
entity_ptrs, |
|
|
const std::shared_ptr< PhysicsEntity > |
entity_ptr, |
|
|
Eigen::Matrix< GLfloat, 3, 3 > & |
dFdx, |
|
|
Eigen::Matrix< GLfloat, 3, 3 > & |
dFdv |
|
) |
| const |
Computes the net force jacobian for the supplied entity
- Parameters
-
entity_ptrs | list of all entities in the simulation |
entity_ptr | entity whom the net force is acting on |
dFdx | matrix that will be modified to contain the net force jacobian with respect to position |
dFdv | matrix that will be modified to contain the net force jacobian with respect to velocity |
void NetForceAccumulator::EnableDrag |
( |
bool |
enable | ) |
|
Enables/Disables velocity based drag
- Parameters
-
enable | true to turn on drag, false to turn off |
void NetForceAccumulator::EnableGravity |
( |
bool |
enable | ) |
|
Enables/Disables universial gravitation between entities
- Parameters
-
enable | true to turn on gravtational attraction, false to turn off |
void NetForceAccumulator::SetDragCoeff |
( |
GLfloat |
beta | ) |
|
Set the drag coefficent. Large values mean stronger drag
- Parameters
-
The documentation for this class was generated from the following files: