Changeset 3554 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 15, 2005, 12:21:28 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/null_parent.cc
r3551 r3554 36 36 \todo this constructor is not jet implemented - do it 37 37 */ 38 NullParent::NullParent () : PNode ("NullParent")38 NullParent::NullParent () : PNode (new Vector(0,0,0), NULL) 39 39 { 40 40 printf("NullParent::NullParent() - making new NullParent, there can only be one..\n"); … … 45 45 46 46 47 NullParent::NullParent (Vector* absCoordinate) : PNode ("NullParent")47 NullParent::NullParent (Vector* absCoordinate) : PNode (new Vector(0,0,0), NULL) 48 48 { 49 singletonRef = this; 49 50 this->parent = this; 50 51 this->mode = ALL; -
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 -
orxonox/trunk/src/lib/coord/p_node.h
r3552 r3554 87 87 88 88 protected: 89 PNode(char*);90 91 89 float timeStamp; //!< this the timeStamp of when the abs{Coordinat, Direction} has been calculated 92 90 char* objectName; //!< The name of the Object
Note: See TracChangeset
for help on using the changeset viewer.