Applies proportional restorative force based on Hooke's Law.
More...
#include <spring_force.hpp>
Applies proportional restorative force based on Hooke's Law.
◆ SpringForce()
| frcsim::SpringForce::SpringForce |
( |
RigidBody * | otherBody, |
|
|
const Vector3 & | localConnectionPoint, |
|
|
const Vector3 & | otherConnectionPoint, |
|
|
double | springConstant, |
|
|
double | restLength ) |
|
inline |
Constructs a spring force generator.
- Parameters
-
| otherBody | The body this spring is attached to at the other end. |
| localConnectionPoint | Local position of the connection point on the object. |
| otherConnectionPoint | Local position of the connection point on the other body. |
| springConstant | The stiffness (k). |
| restLength | The natural resting length. |
◆ ~SpringForce()
| virtual frcsim::SpringForce::~SpringForce |
( |
| ) |
|
|
virtualdefault |
◆ UpdateForce()
| void frcsim::SpringForce::UpdateForce |
( |
double | duration | ) |
|
|
inlineoverride |
Applies spring force to registered objects.
- Parameters
-
The documentation for this class was generated from the following file: