Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4480 in orxonox.OLD


Ignore:
Timestamp:
Jun 2, 2005, 5:10:03 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: PhysicsEngine: doxytags

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

Legend:

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

    r4395 r4480  
    2626using namespace std;
    2727
     28/**
     29   \brief creates a PhysicsConnection
     30*/
    2831PhysicsConnection::PhysicsConnection(PhysicsInterface* subject, Field* field)
    2932{
     
    4750/**
    4851    \brief applies the Force to some Object.
    49     \param dt The time to apply in Seconds
    5052*/
    5153void PhysicsConnection::apply(void) const
  • orxonox/trunk/src/lib/physics/physics_connection.h

    r4395 r4480  
    2626 public:
    2727  PhysicsConnection(PhysicsInterface* subject, Field* field);
    28   PhysicsConnection(PhysicsInterface* partnerOne, PhysicsInterface* partnerTwo);
     28  //  PhysicsConnection(PhysicsInterface* partnerOne, PhysicsInterface* partnerTwo);
    2929
    3030  virtual ~PhysicsConnection();
  • orxonox/trunk/src/lib/physics/physics_interface.cc

    r4440 r4480  
    4848}
    4949
    50 
    5150/**
    5251   \brief standard deconstructor
     
    6665{
    6766  /*
    68   PNode* massCalcPNode = dynamic_cast<PNode*>(this);  //! \todo not sure if this will work ....
    69   float massSum = 0;
    70  
    71   tIterator<PNode>* iterator = massCalcPNode->children->getIterator();
    72   PNode* pn = iterator->nextElement();
    73   while( pn != NULL)
     67    PNode* massCalcPNode = dynamic_cast<PNode*>(this);  //! \todo not sure if this will work ....
     68    float massSum = 0;
     69   
     70    tIterator<PNode>* iterator = massCalcPNode->children->getIterator();
     71    PNode* pn = iterator->nextElement();
     72    while( pn != NULL)
    7473    {
    75       // todo: find out if children are PhysicsInterface in an efficient way
    76       if (strcmp( pn->getClassName(), "PhysicsInterface")) {
    77         massSum += ((PhysicsInterface*)pn)->getTotalMass();
    78       }
    79       pn = iterator->nextElement();
     74    // todo: find out if children are PhysicsInterface in an efficient way
     75    if (strcmp( pn->getClassName(), "PhysicsInterface")) {
     76    massSum += ((PhysicsInterface*)pn)->getTotalMass();
    8077    }
    81   delete iterator;
    82        
    83   if (massSum != this->massChildren ) {
     78    pn = iterator->nextElement();
     79    }
     80    delete iterator;
     81   
     82    if (massSum != this->massChildren ) {
    8483    this->massChildren = massSum;
    8584    if (strcmp( massCalcPNode->parent->getClassName(), "PhysicsInterface"))
    86       ((PhysicsInterface*)massCalcPNode->parent)->recalcMass();
    87   } else {
     85    ((PhysicsInterface*)massCalcPNode->parent)->recalcMass();
     86    } else {
    8887    this->massChildren = massSum;
    89   }
     88    }
    9089  */
    9190}
    9291       
    93        
     92/**
     93   \brief applyes a field to this Object
     94   \param field the field to apply
     95*/
    9496void PhysicsInterface::applyField(Field* field)
    9597{
     
    98100}
    99101
    100 
     102/**
     103   \brief ticks the PhysicsEffect
     104   \param dt: the value about which to tick
     105*/
    101106void PhysicsInterface::tickPhys( float dt )
    102107{
  • orxonox/trunk/src/lib/physics/physics_interface.h

    r4397 r4480  
    1111
    1212#ifndef NULL
    13 #define NULL 0
     13#define NULL 0          //!< NULL
    1414#endif
    1515
     
    4747 
    4848 private:
    49   void* objectPointer;
    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
     49  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
    5454       
    5555
Note: See TracChangeset for help on using the changeset viewer.