Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 14, 2005, 10:27:47 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/physics: new forces added

File:
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/util/physics/fields/twirl.cc

    r4182 r4184  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "gravity.h"
     18#include "twirl.h"
    1919
    2020using namespace std;
     
    2525   \todo this constructor is not jet implemented - do it
    2626*/
    27 Gravity::Gravity ()
     27Twirl::Twirl ()
    2828{
    29    this->setClassName ("Gravity");
     29   this->setClassName ("Twirl");
    3030}
    3131
     
    3535
    3636*/
    37 Gravity::~Gravity ()
     37Twirl::~Twirl ()
    3838{
    3939  // delete what has to be deleted here
     
    4141
    4242/**
    43    \brief calculates the Gravity on any point in space
    44    \param data The Position of the Point in space to attache gravity to.
     43   \brief calculates the Twirl on any point in space
     44   \param data The Position of the Point in space to attache twirl to.
    4545   \returns The force.
    4646*/
    47 Vector Gravity::calcForce(const Vector& data) const
     47Vector Twirl::calcForce(const Vector& data) const
    4848{
    49   return /*(this->getAbsDir().apply(Vector(0,1,0)))*/ Vector(0,-1,0) * this->getMagnitude();
     49  return /*this->getAbsDir()*/ Vector(0,1,0).cross(this->getAbsCoor() - data)
     50    * this->getMagnitude();
    5051}
    5152
Note: See TracChangeset for help on using the changeset viewer.