Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4555 in orxonox.OLD for orxonox/trunk/src/lib/physics


Ignore:
Timestamp:
Jun 8, 2005, 2:17:00 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: small diffs

Location:
orxonox/trunk/src/lib/physics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/physics/physics_interface.cc

    r4480 r4555  
    11
    22
    3 /* 
     3/*
    44   orxonox - the future of 3D-vertical-scrollers
    55
     
    1414   main-programmer: Patrick Boenzli
    1515   co-programmer: Benjamin Grauer
    16    
     16
    1717   bensch: renamed the file
    1818*/
     
    3636   \brief standard constructor
    3737*/
    38 PhysicsInterface::PhysicsInterface (void* objectPointer) 
     38PhysicsInterface::PhysicsInterface (void* objectPointer)
    3939{
    4040  this->objectPointer = objectPointer;
     
    5050/**
    5151   \brief standard deconstructor
    52 
    5352*/
    54 PhysicsInterface::~PhysicsInterface () 
     53PhysicsInterface::~PhysicsInterface ()
    5554{
    5655   PhysicsEngine::getInstance()->removePhysicsInterface(this);
     
    6766    PNode* massCalcPNode = dynamic_cast<PNode*>(this);  //! \todo not sure if this will work ....
    6867    float massSum = 0;
    69    
     68
    7069    tIterator<PNode>* iterator = massCalcPNode->children->getIterator();
    7170    PNode* pn = iterator->nextElement();
    72     while( pn != NULL) 
    73     { 
     71    while( pn != NULL)
     72    {
    7473    // todo: find out if children are PhysicsInterface in an efficient way
    7574    if (strcmp( pn->getClassName(), "PhysicsInterface")) {
     
    7978    }
    8079    delete iterator;
    81    
     80
    8281    if (massSum != this->massChildren ) {
    8382    this->massChildren = massSum;
     
    8988  */
    9089}
    91        
     90
    9291/**
    9392   \brief applyes a field to this Object
     
    9796{
    9897  PNode* tmp = (PNode*) objectPointer;
    99   this->forceSum += field->calcForce(tmp->getAbsCoor()); 
     98  this->forceSum += field->calcForce(tmp->getAbsCoor());
    10099}
    101100
  • orxonox/trunk/src/lib/physics/physics_interface.h

    r4480 r4555  
    1 /*! 
     1/*!
    22    \file physics_interface.h
    33    \brief a physics interface simulating a body with a mass
     
    4545  virtual void recalcMass();
    4646
    47  
     47
    4848 private:
    4949  void*          objectPointer;         //!< A Pointer to the object we handel (actually should be this)
    50   float          mass;                  //!< Mass of this object
    51   float          massChildren;          //!< Sum of the masses of the children nodes
    52   Vector         forceSum;              //!< Total central force for this tick
    53   Quaternion     momentumSum;           //!< Total momentum in this tick
    54        
    55 
     50  float          mass;                  //!< Mass of this object
     51  float          massChildren;          //!< Sum of the masses of the children nodes
     52  Vector         forceSum;              //!< Total central force for this tick
     53  Quaternion     momentumSum;           //!< Total momentum in this tick
    5654};
    5755
Note: See TracChangeset for help on using the changeset viewer.