step/stepcore
StepCore::WeightForce Class Reference
[Physical forces]
Weight force (constant gravitational force). More...
#include <gravitation.h>

Public Member Functions | |
| WeightForce (double weightConst=Constants::WeightAccel) | |
| void | calcForce (bool calcVariances) |
| void | setWeightConst (double weightConst) |
| double | weightConst () const |
| WeightForceErrors * | weightForceErrors () |
Protected Member Functions | |
| ObjectErrors * | createObjectErrors () |
Protected Attributes | |
| double | _weightConst |
Detailed Description
Weight force (constant gravitational force).
The force acts between on massive bodies (currently only Particle) and equals:
where:
is Particle::mass
is WeightForce::weightConst
- Todo:
- Add interface for massive bodies, support bodies with distributed mass
Definition at line 145 of file gravitation.h.
Constructor & Destructor Documentation
| StepCore::WeightForce::WeightForce | ( | double | weightConst = Constants::WeightAccel |
) |
Constructs WeightForce.
Definition at line 100 of file gravitation.cc.
Member Function Documentation
| void StepCore::WeightForce::calcForce | ( | bool | calcVariances | ) | [virtual] |
Calculate force.
Bodies can be accessed through this->world()->bodies()
Implements StepCore::Force.
Definition at line 107 of file gravitation.cc.
| ObjectErrors* StepCore::WeightForce::createObjectErrors | ( | ) | [inline, protected, virtual] |
For internal use only.
Creates specific ObjectErrors-derived class (to be reimplemented in derived classes)
Reimplemented from StepCore::Item.
Definition at line 165 of file gravitation.h.
| void StepCore::WeightForce::setWeightConst | ( | double | weightConst | ) | [inline] |
Set weight constant.
Definition at line 158 of file gravitation.h.
| double StepCore::WeightForce::weightConst | ( | ) | const [inline] |
Get weight constant.
Definition at line 156 of file gravitation.h.
| WeightForceErrors* StepCore::WeightForce::weightForceErrors | ( | ) | [inline] |
Get (and possibly create) WeightForceErrors object.
Definition at line 161 of file gravitation.h.
Member Data Documentation
double StepCore::WeightForce::_weightConst [protected] |
Definition at line 167 of file gravitation.h.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference