Index: code/trunk/src/orxonox/hud/BarOverlayElement.cc~
===================================================================
--- code/trunk/src/orxonox/hud/BarOverlayElement.cc~	(revision 1362)
+++ 	(revision )
@@ -1,129 +1,0 @@
-/*
-*   ORXONOX - the hottest 3D action shooter ever to exist
-*
-*
-*   License notice:
-*
-*   This program is free software; you can redistribute it and/or
-*   modify it under the terms of the GNU General Public License
-*   as published by the Free Software Foundation; either version 2
-*   of the License, or (at your option) any later version.
-*
-*   This program is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with this program; if not, write to the Free Software
-*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*
-*   Author:
-*      Yuning Chai
-*   Co-authors:
-*      Felix Schulthess
-*
-*/
-
-#include <OgreOverlayManager.h>
-#include <OgreOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
-#include "GraphicsEngine.h"
-#include "BarOverlayElement.h"
-
-namespace orxonox
-{
-  using namespace Ogre;
-
-    BarOverlayElement::BarOverlayElement(const String& name):Ogre::PanelOverlayElement(name){
-        name_ = name;
-    }
-
-    BarOverlayElement::~BarOverlayElement(){}
-
-    void BarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container){
-        // init some values...
-        container_ = container;
-        om = &Ogre::OverlayManager::getSingleton();
-        value_ = 0;
-        color_ = 2;
-        autoColor_ = true;
-        left2Right = false; 	// default is right to left progress
-        leftRel_ = leftRel;
-        topRel_ = topRel;
-        dimRel_ = dimRel;
-        
-        // create background...
-        background_ = static_cast<OverlayContainer*>(om->createOverlayElement("Panel", name_+"container"));
-        background_->show();
-        container_->addChild(background_);
-        background_->setMetricsMode(Ogre::GMM_PIXELS);
-        background_->setMaterialName("Orxonox/BarBackground");
-
-        // calculate absolute coordinates...
-        resize();
-
-        show();
-        setMetricsMode(Ogre::GMM_PIXELS);
-        setMaterialName("Orxonox/Green");
-        background_->addChild(this);
-    }
-
-    void BarOverlayElement::resize(){
-        windowW_ = GraphicsEngine::getSingleton().getWindowWidth();
-        windowH_ = GraphicsEngine::getSingleton().getWindowHeight();
-        // calculate new absolute coordinates...
-        left_ = (int) (leftRel_ * windowW_);
-        top_ = (int) (topRel_ * windowH_);
-        width_ = (int) (dimRel_ * windowW_);
-        height_ = (int) (0.1*width_);	// the texture has dimensions height:length = 1:10
-        // adapt background
-        background_->setPosition(left_, top_);
-        background_->setDimensions(width_, height_);
-        // adapt bar
-        setValue(value_);
-    }
-
-    void BarOverlayElement::setValue(float value){
-        value_ = value;
-        // set color, if nescessary
-        if(autoColor_){
-            if (value_>0.5) {setColor(BarOverlayElement::GREEN);}
-            else if (value_>0.25) {setColor(BarOverlayElement::YELLOW);}
-            else setColor(BarOverlayElement::RED);
-        }
-        // set value
-        if(left2Right){ // backward case
-            setPosition(0+width_-width_*value_, 0);
-            setDimensions(width_*value_,height_);
-        }else{          // default case
-            setPosition(0, 0);
-            setDimensions(width_*value_,height_);
-        }
-        if(value_ != 0) setTiling(value_, 1.0);
-    }
-
-    void BarOverlayElement::setColor(int color){
-        color_ = color;
-        switch(color){
-        case 0:
-            setMaterialName("Orxonox/Red");
-            break;
-        case 1:
-            setMaterialName("Orxonox/Yellow");
-            break;
-        case 2:
-            setMaterialName("Orxonox/Green");
-        }
-    }
-
-    float BarOverlayElement::getValue(){
-        return(value_);
-    }
-
-    int BarOverlayElement::getBarColor(){
-        return(color_);
-    }
-}
-
-
Index: code/trunk/src/orxonox/hud/BarOverlayElement.h~
===================================================================
--- code/trunk/src/orxonox/hud/BarOverlayElement.h~	(revision 1362)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
-*   ORXONOX - the hottest 3D action shooter ever to exist
-*
-*
-*   License notice:
-*
-*   This program is free software; you can redistribute it and/or
-*   modify it under the terms of the GNU General Public License
-*   as published by the Free Software Foundation; either version 2
-*   of the License, or (at your option) any later version.
-*
-*   This program is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with this program; if not, write to the Free Software
-*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*
-*   Author:
-*      Yuning Chai
-*   Co-authors:
-*      Felix Schulthess
-*
-*/
-
-
-#ifndef _BAR_H__
-#define _BAR_H__
-
-#include <OgreOverlayManager.h>
-#include <OgreOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
-
-#include <OgrePrerequisites.h>
-#include "../OrxonoxPrereqs.h"
-
-
-
-namespace orxonox
-{
-  class _OrxonoxExport BarOverlayElement : public Ogre::PanelOverlayElement
-  {
-    private:
-        bool autoColor_;                    // whether bar changes color automatically
-        float value_;                       // progress of bar
-        int color_;
-        int left_;
-        int top_;
-        int width_;
-        int height_;
-        int windowW_, windowH_;
-        Ogre::Real leftRel_;
-        Ogre::Real topRel_;
-        Ogre::Real widthRel_;
-        Ogre::Real heightRel_;
-        Ogre::OverlayManager* om;           // our overlay manager
-        Ogre::OverlayContainer* container_; // our parent container to attach to
-        Ogre::OverlayContainer* background_;
-        Ogre::String name_;
-
-    public:
-        bool left2Right;
-        static const int RED = 0;           // predefined colors
-        static const int YELLOW = 1;
-        static const int GREEN = 2;
-
-        BarOverlayElement(const Ogre::String& name);
-        virtual ~BarOverlayElement();
-        void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
-        void resize();
-        void setValue(float value);
-        void setColor(int color);
-        float getValue();
-        int getBarColor();
-    };
-}
-#endif
-
-
Index: code/trunk/src/orxonox/hud/OverlayElementFactories.h~
===================================================================
--- code/trunk/src/orxonox/hud/OverlayElementFactories.h~	(revision 1362)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
-*   ORXONOX - the hottest 3D action shooter ever to exist
-*
-*
-*   License notice:
-*
-*   This program is free software; you can redistribute it and/or
-*   modify it under the terms of the GNU General Public License
-*   as published by the Free Software Foundation; either version 2
-*   of the License, or (at your option) any later version.
-*
-*   This program is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with this program; if not, write to the Free Software
-*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*
-*   Author:
-*      Yuning Chai
-*   Co-authors:
-*      ...
-*
-*/
-
-#ifndef _FACTORIES_H__
-#define _FACTORIES_H__
-
-
-#include <OgreOverlayElement.h>
-#include <OgrePrerequisites.h>
-#include <OgreOverlayElementFactory.h>
-
-#include "BarOverlayElement.h"
-
-
-namespace orxonox{
-
-  class _OrxonoxExport BarOverlayElementFactory : public Ogre::OverlayElementFactory{
-    public:
-    Ogre::OverlayElement* createOverlayElement(const Ogre::String& instanceName){
-      return new BarOverlayElement(instanceName);
-    }
-    const Ogre::String& getTypeName(void) const{
-      static Ogre::String name = "Bar";
-      return name;
-    }
-  };
-
-
-  class _OrxonoxExport SmartBarOverlayElementFactory : public Ogre::OverlayElementFactory{
-    public:
-    Ogre::OverlayElement* createOverlayElement(const Ogre::String& instanceName){
-      return new SmartBarOverlayElement(instanceName);
-    }
-    const Ogre::String& getTypeName(void) const{
-      static Ogre::String name = "SmartBar";
-      return name;
-    }
-  };
-
-}
-
-
-
-
-#endif
Index: code/trunk/src/orxonox/hud/RadarOverlayElement.cc~
===================================================================
--- code/trunk/src/orxonox/hud/RadarOverlayElement.cc~	(revision 1362)
+++ 	(revision )
@@ -1,188 +1,0 @@
-/*
-*   ORXONOX - the hottest 3D action shooter ever to exist
-*
-*
-*   License notice:
-*
-*   This program is free software; you can redistribute it and/or
-*   modify it under the terms of the GNU General Public License
-*   as published by the Free Software Foundation; either version 2
-*   of the License, or (at your option) any later version.
-*
-*   This program is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with this program; if not, write to the Free Software
-*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*
-*   Author:
-*      Yuning Chai
-*   Co-authors:
-*      ...
-*
-*/
-
-/*	local coordinate system of space ship at the beginning:
-
-			y
-			+   z
-			|  +
-			| /
-			|/
-   x +------O
-*/
-
-#include <OgreOverlayManager.h>
-#include <OgreOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
-#include <OgreStringConverter.h>
-#include "RadarOverlayElement.h"
-#include "GraphicsEngine.h"
-
-namespace orxonox
-{
-    using namespace Ogre;
-
-    RadarOverlayElement::RadarOverlayElement(const String& name):Ogre::PanelOverlayElement(name){
-    }
-
-    RadarOverlayElement::~RadarOverlayElement(){
-    }
-
-    void RadarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container){
-        // 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);
-        currentDir_ = initialDir_;
-        initialOrth_ = Vector3(0.0, 0.0, 1.0);
-        currentOrth_ = initialOrth_;
-
-        setMetricsMode(Ogre::GMM_PIXELS);
-        setMaterialName("Orxonox/Radar");
-        resize();
-
-        container_->addChild(this);
-    }
-
-    void RadarOverlayElement::resize() {
-        // if window is resized, we must adapt these...
-        windowW_ = GraphicsEngine::getSingleton().getWindowWidth();
-        windowH_ = GraphicsEngine::getSingleton().getWindowHeight();
-        dim_ = (int) (dimRel_*windowH_);
-        left_ = (int) (leftRel_*windowW_-dim_/2);
-        top_ = (int) (topRel_*windowH_-dim_/2);
-        setPosition(left_, top_);
-        setDimensions(dim_,dim_);
-    }
-
-    void RadarOverlayElement::update() {
-        shipPos_ = SpaceShip::instance_s->getPosition();
-        currentDir_ = SpaceShip::instance_s->getOrientation()*initialDir_; 		// according to beni....
-		currentOrth_ = SpaceShip::instance_s->getOrientation()*initialOrth_;
-
-        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;
-		}
-    }
-
-    void RadarOverlayElement::addObject(Vector3 pos){
-        if(firstRadarObject_ == NULL){
-            firstRadarObject_ = new RadarObject(container_);
-            firstRadarObject_->pos_ = pos;
-            lastRadarObject_ = firstRadarObject_;
-        }
-        else{
-            lastRadarObject_->next = new RadarObject(container_);
-            lastRadarObject_->next->pos_ = pos;
-            lastRadarObject_ = lastRadarObject_->next;
-        }
-	}
-
-	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;		// initialize static variable
-
-	RadarObject::RadarObject(Ogre::OverlayContainer* container){
-		container_ = container;
-		pos_ = Vector3(0.0, 0.0, 0.0);
-		init();
-	}
-
-	RadarObject::RadarObject(Ogre::OverlayContainer* container, Vector3 pos){
-		container_ = container;
-		pos_ = pos;
-		init();
-	}
-
-	RadarObject::~RadarObject(){}
-
-	void RadarObject::init(){
-	    next = NULL;
-		om = &Ogre::OverlayManager::getSingleton();
-		panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
-			"Object"+Ogre::StringConverter::toString(count++)));
-		panel_->setMaterialName("Orxonox/RedDot");
-		panel_->setDimensions(5,5);
-        panel_->setMetricsMode(Ogre::GMM_PIXELS);
-        panel_->show();
-        container_->addChild(panel_);
-	}
-}
-
-/* my local clipboard...
-COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
-COUT(3) << firstRadarObject_->radius_ << "  " << firstRadarObject_->phi_ << std::endl;
-COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
-*/
Index: code/trunk/src/orxonox/hud/RadarOverlayElement.h~
===================================================================
--- code/trunk/src/orxonox/hud/RadarOverlayElement.h~	(revision 1362)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/*
-*   ORXONOX - the hottest 3D action shooter ever to exist
-*
-*
-*   License notice:
-*
-*   This program is free software; you can redistribute it and/or
-*   modify it under the terms of the GNU General Public License
-*   as published by the Free Software Foundation; either version 2
-*   of the License, or (at your option) any later version.
-*
-*   This program is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with this program; if not, write to the Free Software
-*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*
-*   Author:
-*      Yuning Chai
-*   Co-authors:
-*      ...
-*
-*/
-
-#ifndef _RADAR_H__
-#define _RADAR_H__
-
-#include <string.h>
-#include <OgreOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
-#include <util/Math.h>
-#include <string.h>
-#include "core/Tickable.h"
-#include <OgrePrerequisites.h>
-#include "objects/SpaceShip.h"
-#include "../OrxonoxPrereqs.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport RadarObject
-    {
-    	private:
-    		Ogre::OverlayManager* om;				// our one and only overlay manager
-    		
-    	public:
-    		RadarObject(Ogre::OverlayContainer* container);
-    		RadarObject(Ogre::OverlayContainer* container, Vector3 pos);
-    		~RadarObject();
-    		
-    		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
-			
-    		static int count;
-	};
-
-    class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
-    {
-        private:
-            Ogre::OverlayManager* om;               // our one and only overlay manager
-            Ogre::OverlayContainer* container_;
-            Vector3 initialDir_;	                // direction of nose
-            Vector3 currentDir_;					
-            Vector3 initialOrth_;                   // direction of normal
-            Vector3 currentOrth_;
-            Vector3 shipPos_;                       // position of ship
-            
-			RadarObject* tomato_;            
-            
-            Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
-            int left_, top_, dim_;                  // absolute position/dimension
-            int windowW_, windowH_;             	// absolute window dimensions
-
-        public:
-            RadarOverlayElement(const Ogre::String& name);
-            ~RadarOverlayElement();
-            void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
-			void resize();            
-            void update();
-            void addObject(Vector3 pos);
-	};
-}
-
-#endif
