Changeset 10366 in orxonox.OLD for branches/playability.merge/src/lib/math/curve.cc
- Timestamp:
- Jan 25, 2007, 12:48:13 PM (18 years ago)
- Location:
- branches/playability.merge
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability.merge
- Property svn:ignore
-
old new 10 10 autom4te.cache 11 11 aclocal.m4 12 tags 13 test.bmp 14 config.sub 15 config.guess 16 OrxonoxPlayability.kdevses 17 OrxonoxPlayability.kdevelop.pcs
-
- Property svn:ignore
-
branches/playability.merge/src/lib/math/curve.cc
r9110 r10366 142 142 tmpNode = tmpNode->next; 143 143 return tmpNode->position; 144 } 145 146 /** 147 * This function returns an approximation of the length of the curve 148 * 149 */ 150 float 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; 144 159 } 145 160 … … 273 288 Vector BezierCurve::calcDir (float t) 274 289 { 275 return this->dirCurve->calcPos(t); 290 return this->calcPos(t + 0.01) - this->calcPos(t); 291 //return this->dirCurve->calcPos(t); 276 292 } 277 293
Note: See TracChangeset
for help on using the changeset viewer.