step/stepcore
StepCore::GravitationForce Class Reference
[Physical forces]
#include <gravitation.h>
Inheritance diagram for StepCore::GravitationForce:

Detailed Description
Newton gravitational force.The force acts between pairs of massive bodies (currently only Particle) and equals:
where:
is GravitationForce::gravitationConst
and
is Particle::mass of first and second body
is difference of Particle::position of the first and second body
- Todo:
- Add interface for massive bodies, support bodies with distributed mass
Definition at line 80 of file gravitation.h.
Public Member Functions | |
| void | calcForce (bool calcVariances) |
| double | gravitationConst () const |
| GravitationForce (double gravitationConst=Constants::Gravitational) | |
| GravitationForceErrors * | gravitationForceErrors () |
| void | setGravitationConst (double gravitationConst) |
Protected Member Functions | |
| ObjectErrors * | createObjectErrors () |
Protected Attributes | |
| double | _gravitationConst |
Constructor & Destructor Documentation
| StepCore::GravitationForce::GravitationForce | ( | double | gravitationConst = Constants::Gravitational |
) |
Member Function Documentation
| void StepCore::GravitationForce::calcForce | ( | bool | calcVariances | ) | [virtual] |
Calculate force.
Bodies can be accessed through this->world()->bodies()
Implements StepCore::Force.
Definition at line 64 of file gravitation.cc.
| ObjectErrors* StepCore::GravitationForce::createObjectErrors | ( | ) | [inline, protected, virtual] |
| double StepCore::GravitationForce::gravitationConst | ( | ) | const [inline] |
| GravitationForceErrors* StepCore::GravitationForce::gravitationForceErrors | ( | ) | [inline] |
Get (and possibly create) GravitationForceErrors object.
Definition at line 96 of file gravitation.h.
| void StepCore::GravitationForce::setGravitationConst | ( | double | gravitationConst | ) | [inline] |
Member Data Documentation
double StepCore::GravitationForce::_gravitationConst [protected] |
Definition at line 102 of file gravitation.h.
The documentation for this class was generated from the following files:
KDE 4.1 API Reference