Index: code/branches/libraries2/src/orxonox/worldentities/Attacher.cc
===================================================================
--- code/branches/libraries2/src/orxonox/objects/worldentities/Attacher.cc	(revision 5727)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Attacher.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
-    CreateFactory(Attacher);
-
-    Attacher::Attacher(BaseObject* creator) : StaticEntity(creator)
-    {
-        RegisterObject(Attacher);
-
-        this->target_ = 0;
-    }
-
-    void Attacher::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Attacher, XMLPort, xmlelement, mode);
-
-        XMLPortParam(Attacher, "target", setTarget, getTarget, xmlelement, mode);
-        XMLPortObject(Attacher, WorldEntity, "", addObject, getObject, xmlelement, mode);
-    }
-
-    void Attacher::processEvent(Event& event)
-    {
-        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-            (*it)->fireEvent(event);
-    }
-
-    void Attacher::changedActivity()
-    {
-        SUPER(Attacher, changedActivity);
-
-        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-            (*it)->setActive(this->isActive());
-    }
-
-    void Attacher::changedVisibility()
-    {
-        SUPER(Attacher, changedVisibility);
-
-        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-            (*it)->setVisible(this->isVisible());
-    }
-
-    void Attacher::addObject(WorldEntity* object)
-    {
-        this->objects_.push_back(object);
-
-        this->attach(object);
-    }
-
-    WorldEntity* Attacher::getObject(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::list<WorldEntity*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-        {
-            if (i == index)
-                return (*it);
-
-            ++i;
-        }
-        return 0;
-    }
-
-    void Attacher::setTarget(const std::string& target)
-    {
-        this->targetname_ = target;
-        this->target_ = 0;
-
-        if (this->targetname_ == "")
-            return;
-
-        for (ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)
-            if (it->getName() == this->targetname_)
-                this->attachToParent(*it);
-    }
-
-    void Attacher::loadedNewXMLName(BaseObject* object)
-    {
-        if (this->target_ || this->targetname_ == "")
-            return;
-
-        WorldEntity* entity = orxonox_cast<WorldEntity*>(object);
-        if (entity && entity->getName() == this->targetname_)
-        {
-            this->target_ = entity;
-            this->attachToParent(entity);
-        }
-    }
-}
Index: code/branches/libraries2/src/orxonox/worldentities/Attacher.h
===================================================================
--- code/branches/libraries2/src/orxonox/objects/worldentities/Attacher.h	(revision 5727)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Attacher_H__
-#define _Attacher_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <list>
-#include <string>
-#include "core/XMLNameListener.h"
-#include "objects/worldentities/StaticEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Attacher : public StaticEntity, public XMLNameListener
-    {
-        public:
-            Attacher(BaseObject* creator);
-            virtual ~Attacher() {}
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            virtual void processEvent(Event& event);
-            virtual void changedActivity();
-            virtual void changedVisibility();
-
-            void addObject(WorldEntity* object);
-            WorldEntity* getObject(unsigned int index) const;
-
-            void setTarget(const std::string& target);
-            inline const std::string& getTarget() const
-                { return this->targetname_; }
-
-            void loadedNewXMLName(BaseObject* object);
-
-        private:
-            WorldEntity* target_;
-            std::string targetname_;
-            std::list<WorldEntity*> objects_;
-    };
-}
-
-#endif /* _Attacher_H__ */
Index: code/branches/libraries2/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/libraries2/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 5727)
+++ code/branches/libraries2/src/orxonox/worldentities/CMakeLists.txt	(revision 5734)
@@ -6,5 +6,4 @@
   ControllableEntity.cc
 
-  Attacher.cc
   Backlight.cc
   Billboard.cc
@@ -19,10 +18,7 @@
   ParticleEmitter.cc
   ParticleSpawner.cc
-  Planet.cc
   SpawnPoint.cc
   TeamSpawnPoint.cc
-  ForceField.cc
 )
 
 ADD_SUBDIRECTORY(pawns)
-ADD_SUBDIRECTORY(triggers)
Index: code/branches/libraries2/src/orxonox/worldentities/ForceField.cc
===================================================================
--- code/branches/libraries2/src/orxonox/objects/worldentities/ForceField.cc	(revision 5727)
+++ 	(revision )
@@ -1,87 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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:
- *      Aurelian Jaggi
- *   Co-authors:
- *      ...
- *
- */
-
-#include "ForceField.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "objects/worldentities/MobileEntity.h"
-
-namespace orxonox
-{
-    CreateFactory(ForceField);
-
-    ForceField::ForceField(BaseObject* creator) : StaticEntity(creator)
-    {
-        RegisterObject(ForceField);
-
-        //Standard Values
-        this->setDirection(Vector3::ZERO);
-        velocity_ = 100;
-        diameter_ = 500;
-        length_ = 5000;
-    }
-
-    ForceField::~ForceField() {}
-
-    void ForceField::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(ForceField, XMLPort, xmlelement, mode);
- 
-        //For correct xml import use: position, direction, velocity, scale
-        XMLPortParam(ForceField, "velocity", setVelocity, getVelocity, xmlelement, mode).defaultValues(100);
-        XMLPortParam(ForceField, "diameter", setDiameter, getDiameter, xmlelement, mode).defaultValues(500);
-        XMLPortParam(ForceField, "length"  , setLength  , getLength  , xmlelement, mode).defaultValues(2000);
-    }
-
-    void ForceField::tick(float dt)
-    {
-        for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
-        {
-            //calculate from
-            Vector3 directionVec = this->getOrientation() * WorldEntity::FRONT;
-            directionVec.normalise();
-
-            Vector3 distanceVec = it->getWorldPosition() - (this->getWorldPosition() + (this->length_ / 2 * directionVec));
-
-            //distance from centervector of the field (
-            float distFromCenterVec = ((it->getWorldPosition() - this->getWorldPosition()).crossProduct(directionVec)).length();
-
-            if (distanceVec.length() < this->length_ / 2 && distFromCenterVec < diameter_ / 2)
-            {
-                //normalize distance from center
-                it->applyCentralForce(((diameter_ / 2 - distFromCenterVec) / (diameter_ / 2)) * directionVec * velocity_);
-            }
-        }
-    }
-}
-
-
-
-
-
Index: code/branches/libraries2/src/orxonox/worldentities/ForceField.h
===================================================================
--- code/branches/libraries2/src/orxonox/objects/worldentities/ForceField.h	(revision 5727)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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:
- *      Aurelian Jaggi
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef _ForceField_H__
-#define _ForceField_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "tools/interfaces/Tickable.h"
-#include "StaticEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport ForceField : public StaticEntity, public Tickable
-    {
-    public:
-        ForceField(BaseObject* creator);
-        virtual ~ForceField();
-        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-        virtual void tick(float dt);
-
-        inline void setVelocity(float vel)
-            { this->velocity_ = vel; }
-
-        inline float getVelocity()
-            { return velocity_; }
-
-        inline void setDiameter(float diam)
-            { this->diameter_ = diam; }
-
-        inline float getDiameter()
-            { return diameter_; }
-
-        inline void setLength(float l)
-            { this->length_ = l; }
-
-        inline float getLength()
-            { return length_; }
-
-    private:
-        float velocity_;
-        float diameter_;
-        float length_;
-  };
-}
-
-#endif
-
Index: code/branches/libraries2/src/orxonox/worldentities/Planet.cc
===================================================================
--- code/branches/libraries2/src/orxonox/objects/worldentities/Planet.cc	(revision 5727)
+++ 	(revision )
@@ -1,175 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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:
- *      Marian Runo
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Planet.h"
-
-#include <OgreEntity.h>
-#include <OgreBillboardSet.h>
-#include <OgreProgressiveMesh.h>
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "core/XMLPort.h"
-#include "objects/Scene.h"
-#include "Camera.h"
-#include "CameraManager.h"
-
-namespace orxonox
-{
-    CreateFactory(Planet);    
-
-    /**
-     * @brief Constructor
-     */
-    Planet::Planet(BaseObject* creator): MovableEntity(creator)
-    {
-        RegisterObject(Planet);
-        this->registerVariables();
-    }
-
-    /**
-     * @brief Destructor
-     */
-    Planet::~Planet()
-    {
-        if (this->isInitialized() && this->mesh_.getEntity())
-            this->detachOgreObject(this->mesh_.getEntity());
-    }    
-
-    void Planet::tick(float dt)
-    {
-        if(!this->isVisible())
-            return;
-
-        if (GameMode::showsGraphics())
-        {
-            Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
-            if(activeCamera)
-            {
-                float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
-                //             COUT(2) << distance << std::endl;
-                float planetRadius = this->getScale();
-
-                float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
-                float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));
-                newScale = tempTest;
-
-                this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
-            }
-        }
-
-        SUPER(Planet, tick, dt);
-    }
-
-    void Planet::init()
-    {
-        float scaleFactor = this->getScale();
-
-        this->distList.push_back(10.0f*scaleFactor);
-        this->distList.push_back(19.0f*scaleFactor);
-        this->distList.push_back(27.0f*scaleFactor);
-        this->distList.push_back(34.0f*scaleFactor);
-        this->distList.push_back(40.0f*scaleFactor);
-        this->distList.push_back(45.0f*scaleFactor);
-        this->distList.push_back(49.0f*scaleFactor);
-        this->distList.push_back(52.0f*scaleFactor);
-        this->distList.push_back(54.0f*scaleFactor);
-        this->distList.push_back(55.0f*scaleFactor);
-
-        float reductionValue = 0.2f;
-
-        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
-        billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
-
-        this->attachOgreObject(this->billboard_.getBillboardSet());    
-        this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
-        this->setCastShadows(true);
-        this->billboard_.getBillboardSet()->setRenderQueueGroup(this->mesh_.getEntity()->getRenderQueueGroup());
-        this->mesh_.setCastShadows(true);
-    }
-
-    void Planet::changedMesh()
-    {
-        if (this->mesh_.getEntity())
-            this->detachOgreObject(this->mesh_.getEntity());
-
-        this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
-
-        if (this->mesh_.getEntity())
-        {
-            this->attachOgreObject(this->mesh_.getEntity());
-            this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
-            this->mesh_.setVisible(this->isVisible());
-        }
-        this->init();
-    }
-
-    void Planet::changedShadows()
-    {
-        this->mesh_.setCastShadows(this->bCastShadows_);
-    }
-
-    /**
-        @brief XML loading and saving.
-        @param xmlelement The XML-element
-        @param loading Loading (true) or saving (false)
-        @return The XML-element
-    */
-    void Planet::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Planet, XMLPort, xmlelement, mode);
-
-        if (GameMode::showsGraphics())
-        {
-            XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
-            XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);     
-            XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);         
-            XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
-            XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
-        }
-    }
-
-    void Planet::registerVariables()
-    {
-        registerVariable(this->atmosphere_, VariableDirection::ToClient);
-        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
-        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
-        registerVariable(this->atmosphereSize, VariableDirection::ToClient);
-        registerVariable(this->imageSize, VariableDirection::ToClient);
-    }
-
-    void Planet::changedVisibility()
-    {
-        SUPER(Planet, changedVisibility);
-        if (this->isInitialized())
-        {
-            this->mesh_.setVisible(this->isVisible());
-            this->billboard_.setVisible(this->isVisible());
-        }
-    }
-}
Index: code/branches/libraries2/src/orxonox/worldentities/Planet.h
===================================================================
--- code/branches/libraries2/src/orxonox/objects/worldentities/Planet.h	(revision 5727)
+++ 	(revision )
@@ -1,116 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   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:
- *      Marian Runo
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Planet_H__
-#define _Planet_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <string>
-#include "tools/BillboardSet.h"
-#include "tools/Mesh.h"
-#include "MovableEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Planet : public MovableEntity
-    {
-        public:
-            Planet(BaseObject* creator);
-            
-            virtual ~Planet();
-            
-            void init();
-            virtual void tick(float dt);
-            
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            
-            virtual void changedVisibility();
-            
-            inline void setMeshSource(const std::string& meshname)
-                { this->meshSrc_ = meshname; this->changedMesh(); }
-                
-            inline const std::string& getMeshSource() const
-                { return this->meshSrc_; }
-
-            inline void setCastShadows(bool bCastShadows)
-                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
-                
-            inline bool getCastShadows() const
-                { return this->bCastShadows_; }            
-            
-            inline const std::string& getMesh() const{
-                return this->meshSrc_;
-            }
-            
-            inline void setAtmosphereSize(float size){
-                this->atmosphereSize = size;
-            }
-            
-            inline float getAtmosphereSize(){
-                return this->atmosphereSize;
-            }
-            
-            inline void setAtmosphere(const std::string& atmosphere){
-                this->atmosphere_ = atmosphere;
-            }
-            
-            inline const std::string& getAtmosphere(){
-                return this->atmosphere_;
-            }
-            
-            inline void setImageSize(float size){
-                this->imageSize = size;
-            }
-            
-            inline float getImageSize(){
-                return this->imageSize;
-            }
-
-        protected:
-            void registerVariables();
-
-        private:
-        
-            void changedMesh();
-            void changedShadows();
-            
-            std::string meshSrc_;
-            std::string atmosphere_;
-            Mesh mesh_;
-            float atmosphereSize;
-            float imageSize;
-            std::vector<float> distList;
-            BillboardSet billboard_;
-            bool bCastShadows_;
-
-    };
-}
-
-#endif
-
