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

step/stepcore

StepCore::WeightForce

StepCore::WeightForce Class Reference
[Physical forces]

#include <gravitation.h>

Inheritance diagram for StepCore::WeightForce:

Inheritance graph
[legend]

List of all members.


Detailed Description

Weight force (constant gravitational force).

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

\[ \overrightarrow{f} = \left( \begin{array}{c} 0 \\ mg \end{array} \right) \]

where:
$m$ is Particle::mass
$g$ is WeightForce::weightConst

Todo:
Add interface for massive bodies, support bodies with distributed mass

Definition at line 145 of file gravitation.h.


Public Member Functions

void calcForce (bool calcVariances)
void setWeightConst (double weightConst)
double weightConst () const
 WeightForce (double weightConst=Constants::WeightAccel)
WeightForceErrors * weightForceErrors ()

Protected Member Functions

ObjectErrors * createObjectErrors ()

Protected Attributes

double _weightConst

Constructor & Destructor Documentation

StepCore::WeightForce::WeightForce ( double  weightConst = Constants::WeightAccel  ) 

Constructs WeightForce.

Definition at line 99 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 106 of file gravitation.cc.

ObjectErrors* StepCore::WeightForce::createObjectErrors (  )  [inline, protected, virtual]

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:
  • 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