- Timestamp:
- Sep 24, 2005, 12:37:39 AM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r5215 r5232 38 38 { 39 39 /* save all important variables localy */ 40 this->numTriangles = numTriangles; 40 41 this->pTriangles = triangles; 41 this->num Triangles = numTriangles;42 this->numVertices = numVertices; 42 43 this->pVertices = pVertices; 43 this->numVertices = numVertices; 44 44 45 this->quadtree = quadtree; 45 46 this->parent = parent; … … 260 261 ++counter; 261 262 } 263 delete iterator; 264 262 265 counter = 0; 263 266 iterator = listB->getIterator(); … … 269 272 ++counter; 270 273 } 274 delete iterator; 275 271 276 counter = 0; 272 277 iterator = listC->getIterator(); … … 278 283 ++counter; 279 284 } 285 delete iterator; 286 280 287 counter = 0; 281 288 iterator = listD->getIterator(); … … 287 294 ++counter; 288 295 } 296 delete iterator; 289 297 290 298 /* now do cleanup */ … … 293 301 delete listC; 294 302 delete listD; 295 delete iterator;296 303 297 304 -
trunk/src/lib/math/curve.cc
r5231 r5232 64 64 if (dirCurve) 65 65 delete dirCurve; 66 67 66 } 68 67 … … 203 202 204 203 // rebuilding the Curve itself 205 float k =0;204 float k = 0; 206 205 float n = nodeCount -1; 207 206 float binCoef = 1; 208 while( tmpNode)207 while( tmpNode) 209 208 { 210 209 tmpNode->factor = binCoef; 211 if (tmpNode =tmpNode->next)210 if( tmpNode = tmpNode->next) 212 211 { 213 binCoef *= (n-k)/(k+1);212 binCoef *= (n-k) / (k+1); 214 213 ++k; 215 214 } … … 217 216 218 217 // rebuilding the Derivation curve 219 if( this->derivation <= 1)218 if( this->derivation <= 1) 220 219 { 221 220 tmpNode = firstNode; 222 221 delete dirCurve; 223 222 dirCurve = new BezierCurve(1); 224 while( tmpNode->next)223 while( tmpNode->next) 225 224 { 226 Vector tmpVector = (tmpNode->next->position) - (tmpNode->position);225 Vector tmpVector = (tmpNode->next->position) - (tmpNode->position); 227 226 tmpVector.x*=(float)nodeCount; 228 227 tmpVector.y*=(float)nodeCount;
Note: See TracChangeset
for help on using the changeset viewer.