• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

step/stepcore

StepCore::GravitationForce

StepCore::GravitationForce Class Reference
[Physical forces]

#include <gravitation.h>

Inheritance diagram for StepCore::GravitationForce:

Inheritance graph
[legend]

List of all members.


Detailed Description

Newton gravitational force.

The force acts between pairs of massive bodies (currently only Particle) and equals:

\[ \overrightarrow{f} = G \frac{m_1 m_2 \overrightarrow{r}} {|\overrightarrow{r}|^3} \]

where:
$G$ is GravitationForce::gravitationConst
$m_1$ and $m_2$ is Particle::mass of first and second body
$\overrightarrow{r}$ 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  ) 

Constructs GravitationForce.

Definition at line 57 of file gravitation.cc.


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]

Reimplemented from StepCore::Item.

Definition at line 100 of file gravitation.h.

double StepCore::GravitationForce::gravitationConst (  )  const [inline]

Get gravitational constant.

Definition at line 91 of file gravitation.h.

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]

Set gravitational constant.

Definition at line 93 of file gravitation.h.


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:
  • gravitation.h
  • gravitation.cc

step/stepcore

Skip menu "step/stepcore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal