Index: code/branches/steering/src/CMakeLists.txt
===================================================================
--- code/branches/steering/src/CMakeLists.txt	(revision 208)
+++ code/branches/steering/src/CMakeLists.txt	(revision 209)
@@ -3,6 +3,6 @@
 # create a few variables to simplify life
 
-SET(SRC_FILES orxonox.cc loader/LevelLoader.cc xml/xmlParser.cc)
-SET(INC_FILES loader/LevelLoader.h xml/xmlParser.h)
+SET(SRC_FILES orxonox.cc loader/LevelLoader.cc xml/xmlParser.cc spaceship_steering.cc)
+SET(INC_FILES loader/LevelLoader.h xml/xmlParser.h spaceship_steering.h )
 
 #Creates an executable
Index: code/branches/steering/src/orxonox.cc
===================================================================
--- code/branches/steering/src/orxonox.cc	(revision 208)
+++ code/branches/steering/src/orxonox.cc	(revision 209)
@@ -41,4 +41,7 @@
 #include "xml/xmlParser.h"
 #include "loader/LevelLoader.h"
+
+#include "spaceship_steering.h"
+SpaceshipSteering* steering;
 
 
@@ -86,5 +89,41 @@
     bool frameStarted(const FrameEvent& evt)
     {
+      float speed = 1;
+      float rotate = 1;
       mKeyboard->capture();
+      if (mKeyboard->isKeyDown(OIS::KC_SPACE))
+        steering->moveForward(speed);
+      else
+        steering->moveForward(0);
+      if(mKeyboard->isKeyDown(OIS::KC_C))
+        steering->brake(speed);
+      else
+        steering->brake(0.1);
+      if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+        steering->rotateUp(rotate);
+      else
+        steering->rotateUp(0);
+      if (mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+        steering->rotateDown(rotate);
+      else
+        steering->rotateDown(0);
+      if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+        steering->rotateRight(rotate);
+      else
+        steering->rotateRight(0);
+      if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+        steering->rotateLeft(rotate);
+      else
+        steering->rotateLeft(0);
+      if (mKeyboard->isKeyDown(OIS::KC_E))
+        steering->loopRight(rotate);
+      else
+        steering->loopRight(0);
+      if (mKeyboard->isKeyDown(OIS::KC_Q))
+        steering->loopLeft(rotate);
+      else
+        steering->loopLeft(0);
+      steering->tick(evt.timeSinceLastFrame);
+//	scenemanager->spacehip->tick(evt.timesincelastframe);
       return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
     }
@@ -199,5 +238,35 @@
       SceneManager *mgr = mRoot->createSceneManager(ST_GENERIC, "Default SceneManager");
       Camera *cam = mgr->createCamera("Camera");
+      cam->setPosition(Vector3(0,0,-250));
+      cam->lookAt(Vector3(0,0,0));
       Viewport *vp = mRoot->getAutoCreatedWindow()->addViewport(cam);
+
+
+      mgr->setAmbientLight(ColourValue(1,1,1));
+      Entity* head = mgr->createEntity("head", "ogrehead.mesh");
+      SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode", Vector3(0,0,0));
+      node->attachObject(head);
+      node->attachObject(cam);
+      mgr->setSkyBox(true, "Examples/SceneSkyBox2");
+
+      Entity* head1 = mgr->createEntity("head1", "ogrehead.mesh");
+      SceneNode *node1 = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode1", Vector3(200,0,0));
+      node1->attachObject(head1);
+      Entity* head2 = mgr->createEntity("head2", "ogrehead.mesh");
+      SceneNode *node2 = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode2", Vector3(200,400,-100));
+      node2->attachObject(head2);
+      Entity* head3 = mgr->createEntity("head3", "ogrehead.mesh");
+      SceneNode *node3 = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode3", Vector3(0,400,200));
+      node3->attachObject(head3);
+      Entity* head4 = mgr->createEntity("head4", "ogrehead.mesh");
+      SceneNode *node4 = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode4", Vector3(-400,-200,600));
+      node4->attachObject(head4);
+      Entity* head5 = mgr->createEntity("head5", "ogrehead.mesh");
+      SceneNode *node5 = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode5", Vector3(0,0,-400));
+      node5->attachObject(head5);
+
+      steering = new SpaceshipSteering(500, 200, 200, 200);
+      steering->addNode(node);
+
     }
 
@@ -240,5 +309,5 @@
     {
       mListener = new OrxExitListener(mKeyboard);
-      mRoot->addFrameListener(mListener);
+      mRoot->addFrameListener(mListener);      
     }
 
Index: code/branches/steering/src/spaceship_steering.cc
===================================================================
--- code/branches/steering/src/spaceship_steering.cc	(revision 209)
+++ code/branches/steering/src/spaceship_steering.cc	(revision 209)
@@ -0,0 +1,173 @@
+#include "Ogre.h"
+#include "spaceship_steering.h"
+using namespace Ogre;
+
+SpaceshipSteering::SpaceshipSteering(float maxSpeedForward, float
+maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float
+maxSpeedLoopRightLeft) {
+  moveForward_ = 0;
+  brake_ = 0;
+  rotateUp_ = 0;
+  rotateDown_ = 0;
+  rotateRight_ = 0;
+  rotateLeft_ = 0;
+  loopRight_ = 0;
+  loopLeft_ = 0;
+  speedForward_ = 0;
+  speedRotateUpDown_ = 0;
+  speedRotateRightLeft_ = 0;
+  speedLoopRightLeft_ = 0;
+  maxSpeedForward_ = maxSpeedForward;
+  maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+  maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+  maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+  accelerationForward_ = 0;
+  accelerationRotateUpDown_ = 0;
+  accelerationRotateRightLeft_ = 0;
+  accelerationLoopRightLeft_ = 0;
+}
+
+void SpaceshipSteering::tick(float time) {
+
+  if(moveForward_ > 0) {
+    accelerationForward_ = moveForward_;
+    if(speedForward_ < maxSpeedForward_)
+      speedForward_ += accelerationForward_;
+    if(speedForward_ > maxSpeedForward_)
+      speedForward_ = maxSpeedForward_;
+  }
+  else {
+    accelerationForward_ = brake_;
+    if(speedForward_ > 0)
+      speedForward_ -= accelerationForward_;
+    if(speedForward_ < 0)
+      speedForward_ = 0;
+  }
+
+  if(rotateUp_ > 0) {
+    accelerationRotateUpDown_ = rotateUp_;
+    if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
+      speedRotateUpDown_ += accelerationRotateUpDown_;
+    if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
+      speedRotateUpDown_ = maxSpeedRotateUpDown_;
+  }
+  else if(rotateDown_ > 0) {
+    accelerationRotateUpDown_ = rotateDown_;
+    if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
+      speedRotateUpDown_ -= accelerationRotateUpDown_;
+    if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
+      speedRotateUpDown_ = -maxSpeedRotateUpDown_;
+  }
+  else {
+    if(speedRotateUpDown_ > 0)
+      speedRotateUpDown_ -= accelerationRotateUpDown_;
+    if(speedRotateUpDown_ < 0)
+      speedRotateUpDown_ += accelerationRotateUpDown_;
+  }
+
+  if(rotateRight_ > 0) {
+    accelerationRotateRightLeft_ = rotateRight_;
+    if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
+      speedRotateRightLeft_ -= accelerationRotateRightLeft_;
+    if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
+      speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
+  }
+  else if(rotateLeft_ > 0) {
+    accelerationRotateRightLeft_ = rotateLeft_;
+    if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
+      speedRotateRightLeft_ += accelerationRotateRightLeft_;
+    if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
+      speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
+  }
+  else {
+    if(speedRotateRightLeft_ > 0)
+      speedRotateRightLeft_ -= accelerationRotateRightLeft_;
+    if(speedRotateRightLeft_ < 0)
+      speedRotateRightLeft_ += accelerationRotateRightLeft_;
+  }
+
+  if(loopRight_ > 0) {
+    accelerationLoopRightLeft_ = loopRight_;
+    if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
+      speedLoopRightLeft_ += accelerationLoopRightLeft_;
+    if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
+      speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
+  }
+  else if(loopLeft_ > 0) {
+    accelerationLoopRightLeft_ = loopLeft_;
+    if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
+      speedLoopRightLeft_ -= accelerationLoopRightLeft_;
+    if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
+      speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
+  }
+  else {
+    if(speedLoopRightLeft_ > 0)
+      speedLoopRightLeft_ -= accelerationLoopRightLeft_;
+    if(speedLoopRightLeft_ < 0)
+      speedLoopRightLeft_ += accelerationLoopRightLeft_;
+  }
+
+  Vector3 transVector = Vector3::ZERO;
+  transVector.z = 1;
+  steeringNode_->translate(transVector*speedForward_*time,
+  Node::TS_LOCAL);
+  steeringNode_->pitch(Degree(speedRotateUpDown_*time),
+  Node::TS_LOCAL);
+  steeringNode_->yaw(Degree(speedRotateRightLeft_*time),
+  Node::TS_LOCAL);
+  steeringNode_->roll(Degree(speedLoopRightLeft_*time),
+  Node::TS_LOCAL);
+
+}
+
+void SpaceshipSteering::moveForward(float moveForward) {
+  moveForward_ = moveForward;
+}
+
+void SpaceshipSteering::brake(float brake) {
+  brake_ = brake;
+}
+
+void SpaceshipSteering::rotateUp(float rotateUp) {
+  rotateUp_ = rotateUp;
+}
+
+void SpaceshipSteering::rotateDown(float rotateDown) {
+  rotateDown_ = rotateDown;
+}
+
+void SpaceshipSteering::rotateLeft(float rotateLeft) {
+  rotateLeft_ = rotateLeft;
+}
+
+void SpaceshipSteering::rotateRight(float rotateRight) {
+  rotateRight_ = rotateRight;
+}
+
+void SpaceshipSteering::loopLeft(float loopLeft) {
+  loopLeft_ = loopLeft;
+}
+
+void SpaceshipSteering::loopRight(float loopRight) {
+  loopRight_ = loopRight;
+}
+
+void SpaceshipSteering::maxSpeedForward(float maxSpeedForward) {
+  maxSpeedForward_ = maxSpeedForward;
+}
+
+void SpaceshipSteering::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
+  maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+}
+
+void SpaceshipSteering::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
+  maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+}
+
+void SpaceshipSteering::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
+  maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+}
+
+void SpaceshipSteering::addNode(Ogre::SceneNode *steeringNode) {
+  steeringNode_ = steeringNode;
+}
Index: code/branches/steering/src/spaceship_steering.h
===================================================================
--- code/branches/steering/src/spaceship_steering.h	(revision 209)
+++ code/branches/steering/src/spaceship_steering.h	(revision 209)
@@ -0,0 +1,56 @@
+#ifndef SPACESHIP_STEERING_H
+#define SPACESHIP_STEERING_H
+
+#include "OgrePrerequisites.h"
+
+class SpaceshipSteering
+{
+  public:
+    SpaceshipSteering(float maxSpeedForward, float maxSpeedRotateUpDown,
+    float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft);
+    void tick(float time);
+    void moveForward(float moveForward);
+    void brake(float brake);
+    void rotateUp(float rotateUp);
+    void rotateDown(float rotateDown);
+    void rotateRight(float rotateRight);
+    void rotateLeft(float rotateLeft);
+    void loopRight(float loopRight);
+    void loopLeft(float loopLeft);
+    void maxSpeedForward(float maxSpeedForward);
+    void maxSpeedRotateUpDown(float maxSpeedRotateUpDown);
+    void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft);
+    void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft);
+    void addNode(Ogre::SceneNode *steeringNode);
+
+  protected:
+    Ogre::SceneNode *steeringNode_;
+
+  private:
+    float moveForward_;
+    float brake_;
+    float rotateUp_;
+    float rotateDown_;
+    float rotateRight_;
+    float rotateLeft_;
+    float loopRight_;
+    float loopLeft_;
+
+    float speedForward_;
+    float speedRotateUpDown_;
+    float speedRotateRightLeft_;
+    float speedLoopRightLeft_;
+
+    float maxSpeedForward_;
+    float maxSpeedRotateUpDown_;
+    float maxSpeedRotateRightLeft_;
+    float maxSpeedLoopRightLeft_;
+
+    float accelerationForward_;
+    float accelerationRotateUpDown_;
+    float accelerationRotateRightLeft_;
+    float accelerationLoopRightLeft_;
+
+};
+
+#endif
