Changeset 5231 in orxonox.OLD for trunk/src/lib/math
- Timestamp:
- Sep 24, 2005, 12:11:28 AM (19 years ago)
- Location:
- trunk/src/lib/math
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/math/curve.cc
r5218 r5231 38 38 Curve::Curve() 39 39 { 40 nodeCount = 0; 41 firstNode = new PathNode; 42 currentNode = firstNode; 43 44 firstNode->position = Vector (.0, .0, .0); 45 firstNode->number = 0; 46 firstNode->next = 0; // not sure if this really points to NULL!! 47 } 40 this->nodeCount = 0; 41 this->localTime = 0; 42 this->derivation = 0; 43 this->dirCurve = NULL; 44 this->firstNode = new PathNode(); 45 this->currentNode = firstNode; 46 47 this->firstNode->position = Vector (.0, .0, .0); 48 this->firstNode->number = 0; 49 this->firstNode->next = 0; // not sure if this really points to NULL!! 50 } 51 52 53 Curve::~Curve() 54 { 55 PathNode* pn = this->firstNode; 56 PathNode* unusedPN; 57 while( pn != NULL) 58 { 59 unusedPN = pn; 60 pn = pn->next; 61 delete unusedPN; 62 } 63 64 if (dirCurve) 65 delete dirCurve; 66 67 } 68 48 69 49 70 /** … … 171 192 BezierCurve::~BezierCurve() 172 193 { 173 PathNode* tmpNode; 174 currentNode = firstNode; 175 while (tmpNode != 0) 176 { 177 tmpNode = currentNode; 178 currentNode = currentNode->next; 179 delete tmpNode; 180 } 181 if (dirCurve) 182 delete dirCurve; 194 183 195 } 184 196 -
trunk/src/lib/math/curve.h
r5225 r5231 37 37 public: 38 38 Curve(); 39 virtual ~Curve(); 39 40 40 41 void addNode(const Vector& newNode);
Note: See TracChangeset
for help on using the changeset viewer.