Index: code/branches/hud3/src/orxonox/hud/HUD.cc
===================================================================
--- code/branches/hud3/src/orxonox/hud/HUD.cc	(revision 1335)
+++ code/branches/hud3/src/orxonox/hud/HUD.cc	(revision 1339)
@@ -46,5 +46,5 @@
     HUD::HUD(int zoom){
         om = &Ogre::OverlayManager::getSingleton();
-		
+
 		// create Factories
         BarOverlayElementFactory *barOverlayElementFactory = new BarOverlayElementFactory();
@@ -55,5 +55,5 @@
         orxonoxHUD = om->create("Orxonox/HUD");
         container = static_cast<Ogre::OverlayContainer*>(om->createOverlayElement("Panel", "Orxonox/HUD/container"));
-        // create energy bar    
+        // create energy bar
         energyBar = static_cast<BarOverlayElement*>(om->createOverlayElement("Bar", "energyBar"));
         energyBar->show();
@@ -67,5 +67,5 @@
 		// set up screen-wide container
         container->show();
-        
+
         orxonoxHUD->add2D(container);
         orxonoxHUD->show();
@@ -79,5 +79,6 @@
         speedoBar->init(0.01, 0.90, 0.4, 0.04, container);
         radar->init(0.5, 0.9, 0.2, container);
-        radar->addObject(Vector3(1337.0, 0.0, 0.0));
+        radar->addObject(Vector3(1500.0, 0.0, 0.0));
+        radar->addObject(Vector3(0.0, 4000.0, 0.0));
     }
 
Index: code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc
===================================================================
--- code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc	(revision 1335)
+++ code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc	(revision 1339)
@@ -54,10 +54,14 @@
 
     void RadarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container){
-		om = &Ogre::OverlayManager::getSingleton();        
+        // some initial data
+		om = &Ogre::OverlayManager::getSingleton();
         dimRel_ = dimRel;
         leftRel_ = leftRel;
         topRel_ = topRel;
         container_ = container;
+        firstRadarObject_ = NULL;
+        lastRadarObject_ = NULL;
 
+        // these have to fit the data in the level
         shipPos_ = Vector3(0.0, 0.0, 0.0);
         initialDir_ = Vector3(1.0, 0.0, 0.0);
@@ -69,5 +73,5 @@
         setMaterialName("Orxonox/Radar");
         resize();
-        
+
         container_->addChild(this);
     }
@@ -89,33 +93,66 @@
 		currentOrth_ = SpaceShip::instance_s->getOrientation()*initialOrth_;
 
-		if(tomato_ == NULL) return;		
-		
-		tomato_->radius_ = acos((currentDir_.dotProduct(tomato_->pos_ - shipPos_))/
-			((tomato_->pos_ - shipPos_).length()*currentDir_.length()));
-        tomato_->phi_ = acos((currentOrth_.dotProduct(tomato_->pos_ - shipPos_))/
-        	((tomato_->pos_ - shipPos_).length()*currentOrth_.length()));
-        if((currentDir_.crossProduct(currentOrth_)).dotProduct(tomato_->pos_ - shipPos_) > 0) 
-        	tomato_->right_ = true;
-        else tomato_->right_=false;
+        RadarObject* ro = firstRadarObject_;
+        // iterate through all RadarObjects
+		while(ro != NULL){
+            ro->radius_ = calcRadius(ro);
+            ro->phi_ = calcPhi(ro);
+            ro->right_ = calcRight(ro);
+            if (ro->right_){
+                ro->panel_->setPosition(sin(ro->phi_)*ro->radius_/
+                    3.5*dim_/2+dim_/2+left_-2,-cos(ro->phi_)*ro->radius_/3.5*dim_/2+dim_/2+top_-2);
+            }
+            else {
+                ro->panel_->setPosition(-sin(ro->phi_)*ro->radius_/
+                    3.5*dim_/2+dim_/2+left_-2,-cos(ro->phi_)*ro->radius_/3.5*dim_/2+dim_/2+top_-2);
+            }
+            ro = ro->next;
+		}
+    }
 
-        if (tomato_->right_){
-            tomato_->panel_->setPosition(sin(tomato_->phi_)*tomato_->radius_/
-            	3.5*dim_/2+dim_/2+left_-2,-cos(tomato_->phi_)*tomato_->radius_/3.5*dim_/2+dim_/2+top_-2);
+    void RadarOverlayElement::addObject(Vector3 pos){
+        if(firstRadarObject_ == NULL){
+            firstRadarObject_ = new RadarObject(container_);
+            firstRadarObject_->pos_ = pos;
+            lastRadarObject_ = firstRadarObject_;
         }
-        else {
-            tomato_->panel_->setPosition(-sin(tomato_->phi_)*tomato_->radius_/
-            	3.5*dim_/2+dim_/2+left_-2,-cos(tomato_->phi_)*tomato_->radius_/3.5*dim_/2+dim_/2+top_-2);
+        else{
+            lastRadarObject_->next = new RadarObject(container_);
+            lastRadarObject_->next->pos_ = pos;
+            lastRadarObject_ = lastRadarObject_->next;
         }
-    }
-    
-    void RadarOverlayElement::addObject(Vector3 pos){
-		tomato_ = new RadarObject(container_);
-		tomato_->pos_ = pos;
 	}
-	
+
+	void RadarOverlayElement::listObjects(){
+	    int i = 0;
+	    RadarObject* ro = firstRadarObject_;
+	    COUT(3) << "List of RadarObjects:\n";
+	    // iterate through all Radar Objects
+	    while(ro != NULL) {
+	        COUT(3) << i++ << ": " << ro->pos_ << std::endl;
+	        ro = ro->next;
+	    }
+	}
+
+	float RadarOverlayElement::calcRadius(RadarObject* obj){
+	    return(acos((currentDir_.dotProduct(obj->pos_ - shipPos_))/
+			((obj->pos_ - shipPos_).length()*currentDir_.length())));
+	}
+
+	float RadarOverlayElement::calcPhi(RadarObject* obj){
+	    return(acos((currentOrth_.dotProduct(firstRadarObject_->pos_ - shipPos_))/
+        	((firstRadarObject_->pos_ - shipPos_).length()*currentOrth_.length())));
+	}
+
+	bool RadarOverlayElement::calcRight(RadarObject* obj){
+	    if((currentDir_.crossProduct(currentOrth_)).dotProduct(obj->pos_ - shipPos_) > 0)
+        	return true;
+        else return false;
+	}
+
 	//// RadarObject ////
-	
+
 	int RadarObject::count = 0;
-	
+
 	RadarObject::RadarObject(Ogre::OverlayContainer* container){
 		container_ = container;
@@ -123,5 +160,5 @@
 		init();
 	}
-	
+
 	RadarObject::RadarObject(Ogre::OverlayContainer* container, Vector3 pos){
 		container_ = container;
@@ -129,8 +166,9 @@
 		init();
 	}
-	
+
 	RadarObject::~RadarObject(){}
-	
+
 	void RadarObject::init(){
+	    next = NULL;
 		om = &Ogre::OverlayManager::getSingleton();
 		panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
@@ -146,5 +184,5 @@
 /* my local clipboard...
 COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
-COUT(3) << tomato_->radius_ << "  " << tomato_->phi_ << std::endl;
+COUT(3) << firstRadarObject_->radius_ << "  " << firstRadarObject_->phi_ << std::endl;
 COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
 */
Index: code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h
===================================================================
--- code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h	(revision 1335)
+++ code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h	(revision 1339)
@@ -46,16 +46,17 @@
     		Ogre::OverlayManager* om;				// our one and only overlay manager
     		void init();
-    		
+
     	public:
     		RadarObject(Ogre::OverlayContainer* container);
     		RadarObject(Ogre::OverlayContainer* container, Vector3 pos);
     		~RadarObject();
-    		
+
+            bool right_;
     		Vector3 pos_;							// position in space
 			Ogre::Real radius_, phi_;				// position on radar
-			bool right_;
 			Ogre::OverlayContainer* container_;
 			Ogre::PanelOverlayElement* panel_;		// the panel used to show the dot
-			
+			RadarObject* next;                      // next pointer of linked list
+
     		static int count;
 	};
@@ -67,11 +68,12 @@
             Ogre::OverlayContainer* container_;
             Vector3 initialDir_;	                // direction of nose
-            Vector3 currentDir_;					
+            Vector3 currentDir_;
             Vector3 initialOrth_;                   // direction of normal
             Vector3 currentOrth_;
             Vector3 shipPos_;                       // position of ship
-            
-			RadarObject* tomato_;            
-            
+
+			RadarObject* firstRadarObject_;         // start of linked list
+			RadarObject* lastRadarObject_;          // end of linked list
+
             Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
             int left_, top_, dim_;                  // absolute position/dimension
@@ -82,7 +84,11 @@
             ~RadarOverlayElement();
             void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
-			void resize();            
+			void resize();
             void update();
             void addObject(Vector3 pos);
+            void listObjects();
+            float calcRadius(RadarObject* obj);
+            float calcPhi(RadarObject* obj);
+            bool calcRight(RadarObject* obj);
 	};
 }
