Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 25, 2007, 3:05:01 AM (17 years ago)
Author:
patrick
Message:

merged playability. but got strange bug

Location:
branches/playability.new
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/playability.new

    • Property svn:ignore
      •  

        old new  
        1010autom4te.cache
        1111aclocal.m4
         12tags
         13test.bmp
         14config.sub
         15config.guess
         16OrxonoxPlayability.kdevses
         17OrxonoxPlayability.kdevelop.pcs
  • branches/playability.new/src/lib/math/curve.cc

    r9110 r10362  
    142142    tmpNode = tmpNode->next;
    143143  return tmpNode->position;
     144}
     145
     146/**
     147 * This function returns an approximation of the length of the curve
     148 *
     149*/
     150float Curve::getLength()
     151{
     152      float length = 0;
     153      PathNode* tmpNode = this->firstNode;
     154      for(int i = 1; i < this->nodeCount; i++)
     155      {
     156              length += Vector(tmpNode->next->position - tmpNode->position).len();
     157      }
     158      return length;
    144159}
    145160
     
    273288Vector BezierCurve::calcDir (float t)
    274289{
    275   return this->dirCurve->calcPos(t);
     290  return this->calcPos(t + 0.01) - this->calcPos(t);
     291  //return this->dirCurve->calcPos(t);
    276292}
    277293
Note: See TracChangeset for help on using the changeset viewer.