#include <coulombforce.h>
Inheritance diagram for CoulombForce:

Public Member Functions | |
| CoulombForce (double electricConst=Constants::Electric) | |
| void | calcForce () |
| double | electricConst () const |
| void | setElectricConst (double electricConst) |
| virtual void | worldItemRemoved (Item *item) |
| virtual void | setWorld (World *world) |
| World * | world () const |
| const QString & | name () const |
| void | setName (const QString &name) |
The force acts between pairs of charged bodies (currently only ChargedParticle) and equals:
where:
is CoulombForce::electricConst
and
is ChargedParticle::charge of the first and second body
is difference of Particle::position of the first and second body
| CoulombForce | ( | double | electricConst = Constants::Electric |
) |
Constructs CoulombForce
| void calcForce | ( | ) | [virtual] |
| double electricConst | ( | ) | const [inline] |
Get electric const
| void setElectricConst | ( | double | electricConst | ) | [inline] |
Set electric const
| virtual void worldItemRemoved | ( | Item * | item | ) | [inline, virtual, inherited] |
| virtual void setWorld | ( | World * | world | ) | [inline, virtual, inherited] |
| World* world | ( | ) | const [inline, inherited] |
| const QString& name | ( | ) | const [inline, inherited] |
Returns name of the object
| void setName | ( | const QString & | name | ) | [inline, inherited] |
Set name of the object
1.5.1