Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3351 in orxonox.OLD for orxonox/branches/parenting


Ignore:
Timestamp:
Jan 6, 2005, 5:09:13 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: :TrackManager: forking works.

Location:
orxonox/branches/parenting/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/curve.cc

    r3349 r3351  
    131131  float n = nodeCount -1;
    132132  float binCoef = 1;
    133   printf("n=%f\n", n);
    134133  while(tmpNode)
    135134    {
    136135      tmpNode->factor = binCoef;
    137       printf("bincoef: %f\n", binCoef);
    138136      if (tmpNode =tmpNode->next)
    139137        {
  • orxonox/branches/parenting/src/track_manager.cc

    r3350 r3351  
    232232    }
    233233  this->currentTrackElem->curve->addNode(newPoint);
     234  this->currentTrackElem->nodeCount++;
    234235}
    235236
     
    249250  // \todo HotPoint Handling.
    250251  this->currentTrackElem->curve->addNode(newPoint);
     252  this->currentTrackElem->nodeCount++;
    251253}
    252254
     
    277279void TrackManager::fork(unsigned int count, ...)
    278280{
    279   int* trackIDs = new int [count];
     281  int* trackIDs = new int[count];
     282  this->forkV(count, trackIDs);
    280283  va_list ID;
    281284  va_start (ID, count);
    282285  for(int i = 0; i < count; i++)
    283286    {
    284       trackIDs[i] = va_arg (ID, int);
    285     }
    286   va_end(ID);
    287   this->forkV(count, trackIDs);
     287      *va_arg (ID, int*) = trackIDs[i];
     288    }
     289  va_end(ID); 
    288290  delete []trackIDs;
    289291}
     
    303305    return;
    304306  this->currentTrackElem->isFork = true;
    305 
     307  for(int i = 0; i < count; i++)
     308    trackIDs[i]=this->trackElemCount+1+i;
    306309  this->initChildren(count);
    307310}
     
    463466            printf("   is a SavePoint\n");
    464467          if(tmpElem->isFork)
    465             printf("   is A Fork with with %d children\n", tmpElem->childCount);
     468            {
     469              printf("   is A Fork with with %d children: ", tmpElem->childCount);
     470              for(int i = 0; i < tmpElem->childCount; i++)
     471                printf("=%d= ", tmpElem->children[i]->ID);
     472              printf("\n");
     473            }
    466474          if(tmpElem->isJoined)
    467475            printf("   is Joined at the End\n");
  • orxonox/branches/parenting/src/world.cc

    r3350 r3351  
    244244      trackManager->addPoint(Vector(150,0,-10));
    245245      trackManager->setDuration(.5);
     246      int fork11, fork12;
     247      trackManager->fork(2, &fork11, &fork12);
     248      printf("FORKS: %d, %d\n", fork11, fork12);
     249      trackManager->workOn(fork11);
     250      trackManager->addPoint(Vector(170, 0, -15));
     251      trackManager->addPoint(Vector(180, 0, -15));
     252      trackManager->workOn(fork12);
     253      trackManager->addPoint(Vector(170, 0, 10));
     254      trackManager->addPoint(Vector(180, 0, 10));
    246255     
    247256      /*
Note: See TracChangeset for help on using the changeset viewer.