Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 6, 2005, 3:39:28 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: :TrackManager: curves are now being added in a C1-static maner (at least for bezier).

File:
1 edited

Legend:

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

    r3348 r3349  
    4040  this->childCount = 0;
    4141  this->name = NULL;
     42  this->startPoint = Vector(0,0,0);
     43  this->startTangentPoint = Vector(0,0,0);
    4244  this->curve = NULL;
    4345  this->children = NULL;
     
    154156      this->currentTrackElem->children[i]->ID = ++trackElemCount;
    155157      this->currentTrackElem->children[i]->startingTime = this->currentTrackElem->startingTime+this->currentTrackElem->duration;
     158      this->currentTrackElem->children[i]->startPoint = this->currentTrackElem->curve->getNode(this->currentTrackElem->curve->getNodeCount());
     159      this->currentTrackElem->children[i]->startTangentPoint = (this->currentTrackElem->children[i]->startPoint *2) - this->currentTrackElem->curve->getNode(this->currentTrackElem->curve->getNodeCount()-1);
    156160    }
    157161}
     
    221225      this->setCurveType(BEZIERCURVE);
    222226      this->currentTrackElem->isFresh = false;
     227      if(this->currentTrackElem != this->firstTrackElem)
     228        this->addPoint(this->currentTrackElem->startPoint);
     229        this->addPoint(this->currentTrackElem->startTangentPoint);
     230     
    223231    }
    224232  this->currentTrackElem->curve->addNode(newPoint);
Note: See TracChangeset for help on using the changeset viewer.