A force Field is an object which can interact with other objects with a force, defined by its calculateForce function.
More...
#include <Field.h>
A force Field is an object which can interact with other objects with a force, defined by its calculateForce function.
◆ Field()
A force Field is identified by its position and a function.
- Parameters
-
position | The position of che "center" of the field. |
calculateForce | A function which returns the force applied by the field to the object. Such force can be based on all of the characteristics of the object inside the field, such as its position, mass or speed. Therefore a field can also be used to compute forces like friction. |
◆ calculateAppliedForce()
Returns the force applied by the field to a body.
- Parameters
-
body | An object under the influx of this force field. |
- Returns
- The Force applied by the force field to the body.
◆ getPosition()
Position Vulkan::Physics::Field::getPosition |
( |
| ) |
const |
|
inline |
◆ setPosition()
void Vulkan::Physics::Field::setPosition |
( |
Position |
position | ) |
|
|
inline |
The documentation for this class was generated from the following file: