Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

orxonox/trunk: PhysicsEngine: doxytags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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{
Note: See TracChangeset for help on using the changeset viewer.