- Timestamp:
- Apr 13, 2005, 7:51:49 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r3802 r3804 72 72 /** 73 73 \brief standard deconstructor 74 75 \todo this deconstructor is not jet implemented - do it76 74 */ 77 75 PNode::~PNode () 78 76 { 79 /* 80 delete &this->children; 81 delete &this->relCoordinate; 82 delete &this->absCoordinate; 83 delete &this->relDirection; 84 delete &this->absDirection; 85 */ 86 //this->parent = NULL; 87 /* there is currently a problem with cleaning up - fix*/ 88 89 PNode* pn = this->children->enumerate(); 77 tIterator<PNode>* iterator = this->children->getIterator(); 78 PNode* pn = iterator->nextElement(); 90 79 while( pn != NULL) 91 80 { 92 81 delete pn; 93 pn = this->children->nextElement(); 94 95 } 96 82 pn = iterator->nextElement(); 83 } 84 delete iterator; 97 85 /* this deletes all children in the list */ 98 86 delete this->children; 99 87 this->parent = NULL; 100 88 delete []this->objectName; 89 90 delete this->relCoordinate; 91 delete this->absCoordinate; 92 delete this->relDirection; 93 delete this->absDirection; 94 delete this->lastAbsCoordinate; 95 delete this->diffCoordinate; 101 96 } 102 97 … … 148 143 change it unless you realy know what you are doing. 149 144 */ 150 Vector* PNode::getRelCoor () const 151 { 152 //Vector r = *this->relCoordinate; /* return a copy, so it can't be modified */ 153 return this->relCoordinate; 154 } 145 //Vector* PNode::getRelCoor () const 146 155 147 156 148 … … 189 181 \returns absolute coordinates from (0,0,0) 190 182 */ 191 Vector PNode::getAbsCoor () const 192 { 193 return *this->absCoordinate; 194 } 183 //Vector PNode::getAbsCoor () const 195 184 196 185 … … 300 289 \returns relative direction to its parent 301 290 */ 302 Quaternion PNode::getRelDir () const 303 { 304 return *this->relDirection; 305 } 291 //Quaternion* PNode::getRelDir () const 292 306 293 307 294 … … 332 319 \returns absolute coordinates 333 320 */ 334 Quaternion PNode::getAbsDir () const 335 { 336 return *this->absDirection; 337 } 321 //Quaternion PNode::getAbsDir () const 322 338 323 339 324 -
orxonox/trunk/src/lib/coord/p_node.h
r3802 r3804 23 23 24 24 #include "base_object.h" 25 //#include "vector.h"25 #include "vector.h" 26 26 27 27 // FORWARD DEFINITION \\ 28 28 class PNode; /* forward decleration, so that parentEntry has access to PNode */ 29 class Quaternion;30 class Vector;29 //class Quaternion; 30 //class Vector; 31 31 template<class T> class tList; 32 32 … … 57 57 58 58 59 Vector* getRelCoor () const;59 inline Vector* getRelCoor () const { return this->relCoordinate; } 60 60 void setRelCoor (Vector* relCoord); 61 61 void setRelCoor (Vector relCoord); 62 Vector getAbsCoor () const;62 inline Vector getAbsCoor () const { return *this->absCoordinate; } 63 63 void setAbsCoor (Vector* absCoord); 64 64 void setAbsCoor (Vector absCoord); … … 67 67 //void shiftCoor (Vector shift); 68 68 69 Quaternion getRelDir () const;69 inline Quaternion getRelDir () const { return *this->relDirection; } 70 70 void setRelDir (Quaternion* relDir); 71 71 void setRelDir (Quaternion relDir); 72 Quaternion getAbsDir () const;72 inline Quaternion getAbsDir () const { return *this->absDirection; } 73 73 void setAbsDir (Quaternion* absDir); 74 74 void setAbsDir (Quaternion absDir);
Note: See TracChangeset
for help on using the changeset viewer.