Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3527 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Mar 13, 2005, 8:49:01 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: trackManager: now the TrackManager knows his path also backwards.

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3526 r3527  
    221221            // Create SkySphere
    222222            skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
    223             this->localPlayer->addChild(this->skySphere);
     223            this->localCamera->addChild(this->skySphere);
     224            this->skySphere->setMode(MOVEMENT);
    224225
    225226            /*monitor progress*/
     
    230231            env->setName ("env");
    231232            this->spawn(env);
    232             this->trackManager->setBindSlave(env);
    233233
    234234            Vector* es = new Vector (50, 2, 0);
     
    249249        case DEBUG_WORLD_1:
    250250          {
    251             /*
    252             this->testCurve = new UPointCurve();
    253             this->testCurve->addNode(Vector( 0, 0, 0));
    254             this->testCurve->addNode(Vector(10, 0, 5));
    255             this->testCurve->addNode(Vector(20, -5,-5));
    256             this->testCurve->addNode(Vector(30, 5, 10));
    257             this->testCurve->addNode(Vector(40, 0,-10));
    258             this->testCurve->addNode(Vector(50, 0,-10));
    259             */
    260 
    261251            this->nullParent = NullParent::getInstance ();
    262252            this->nullParent->setName ("NullParent");
  • orxonox/trunk/src/track_manager.cc

    r3522 r3527  
    4646  this->curve = NULL;
    4747  this->children = NULL;
     48
     49  this->history = NULL;
     50
    4851  this->condFunc = &TrackElement::random;
    4952}
     
    645648      && this->currentTrackElem->children)
    646649    {
    647       if (this->currentTrackElem->jumpTime > 0)
     650      if (this->currentTrackElem->jumpTime != 0.0)
    648651        this->jumpTo(this->localTime + this->currentTrackElem->jumpTime);
     652      // jump to the next TrackElement and also set the history of the new Element to the old one.
     653      TrackElement* tmpHistoryElem = this->currentTrackElem;
    649654      this->currentTrackElem = this->currentTrackElem->children[this->choosePath(this->currentTrackElem)];
     655      this->currentTrackElem->history = tmpHistoryElem;
    650656    }
    651657  if (this->bindSlave)
  • orxonox/trunk/src/track_manager.h

    r3522 r3527  
    4848  int childCount;            //!< The number of Children This TrackElement has.
    4949  TrackElement** children;   //!< A TrackElement can have a Tree of following TrackElements.
     50
     51  // runtime
     52  TrackElement* history;     //!< a pointer to the last TrackElement we were on. This is if you want to walk the path backwards again.
    5053
    5154  // CONDITION FUNCTIONS and STUFF
Note: See TracChangeset for help on using the changeset viewer.