Changeset 3463 in orxonox.OLD for orxonox/branches/trackManager/src/track_node.cc
- Timestamp:
- Mar 9, 2005, 10:50:20 AM (20 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/trackManager/src/track_node.cc
r3455 r3463 12 12 13 13 ### File Specific: 14 main-programmer: Patrick Boenzli14 main-programmer: Benjamin Grauer 15 15 co-programmer: ... 16 16 */ 17 17 18 18 19 #include "track_node.h" 20 19 21 #include "null_parent.h" 20 22 23 #include "track_manager.h" 21 24 22 25 using namespace std; 23 26 24 NullParent* NullParent::singletonRef = 0;27 TrackNode* TrackNode::singletonRef = 0; 25 28 26 NullParent* NullParent::getInstance ()29 TrackNode* TrackNode::getInstance () 27 30 { 28 if (singletonRef == NULL)29 singletonRef = new NullParent();31 if (singletonRef == NULL) 32 singletonRef = new TrackNode (); 30 33 return singletonRef; 31 34 } … … 36 39 \todo this constructor is not jet implemented - do it 37 40 */ 38 NullParent::NullParent()41 TrackNode::TrackNode () 39 42 { 40 this->parent = this; 43 this->setParent(NullParent::getInstance()); 44 this->trackManager = TrackManager::getInstance(); 41 45 this->mode = ALL; 42 46 } 43 47 44 48 45 NullParent::NullParent(Vector* absCoordinate)49 TrackNode::TrackNode (Vector* absCoordinate) 46 50 { 47 this->parent = this; 51 this->parent = NullParent::getInstance(); 52 this->trackManager = TrackManager::getInstance(); 48 53 this->mode = ALL; 49 54 this->absCoordinate = *absCoordinate; … … 56 61 \todo this deconstructor is not jet implemented - do it 57 62 */ 58 NullParent::~NullParent()63 TrackNode::~TrackNode () 59 64 { 60 delete singletonRef;61 65 singletonRef = NULL; 62 66 } 63 64 65 66 67 67 68 /** … … 72 73 worry, normaly... 73 74 */ 74 void NullParent::update (float timeStamp)75 void TrackNode::update (float timeStamp) 75 76 { 76 this->absCoordinate = t his->relCoordinate;77 this->absDirection = parent->getAbsDir () * this->relDirection;77 this->absCoordinate = trackManager->calcPos(); 78 this->absDirection = Quaternion(trackManager->calcDir(), Vector(0,1,0)); 78 79 79 80 PNode* pn = this->children->enumerate ();
Note: See TracChangeset
for help on using the changeset viewer.