Changeset 3554 in orxonox.OLD for orxonox/trunk/src/lib/coord/p_node.cc
- Timestamp:
- Mar 15, 2005, 12:21:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r3552 r3554 48 48 PNode::PNode (Vector* absCoordinate, PNode* parent ) 49 49 { 50 this->init(parent); 51 50 52 this->absCoordinate = *absCoordinate; 51 this->relCoordinate = this->absCoordinate - parent->getAbsCoor (); 52 53 this->init(parent); 54 55 parent->addChild (this); 56 } 57 58 59 /** 60 \brief this constructor is very special. 61 \param with the name of the class 62 63 this constuctor exists, because there was a little issue with a 64 PNode<->NullPointer relation. It is crutial, that this construcor 65 exists, and is never used except from the NullParent itself. If you 66 delete it, there will probably be a endless loop, because in the 67 default constcutor of PNode NullPointer is generated, and NullPointer 68 gerenates itself again and again... 69 dont't think about it... 70 \todo patrick think about this one here... 71 */ 72 PNode::PNode(char* name) 73 { 74 this->init(NULL); 53 if (parent != NULL) 54 { 55 this->relCoordinate = this->absCoordinate - parent->getAbsCoor (); 56 parent->addChild (this); 57 } 58 else 59 this->relCoordinate = Vector(0,0,0); 75 60 } 76 61
Note: See TracChangeset
for help on using the changeset viewer.