Index: orxonox/trunk/src/Makefile.am
===================================================================
--- orxonox/trunk/src/Makefile.am	(revision 2036)
+++ orxonox/trunk/src/Makefile.am	(revision 2043)
@@ -6,5 +6,5 @@
 
 bin_PROGRAMS=orxonox
-orxonox_SOURCES=orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc
+orxonox_SOURCES=orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc vector.cc ability.cc
 
 #  uncomment the following if bencoder requires the math library
Index: orxonox/trunk/src/Makefile.in
===================================================================
--- orxonox/trunk/src/Makefile.in	(revision 2036)
+++ orxonox/trunk/src/Makefile.in	(revision 2043)
@@ -117,5 +117,5 @@
 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
 bin_PROGRAMS = orxonox
-orxonox_SOURCES = orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc
+orxonox_SOURCES = orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc vector.cc ability.cc
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -130,5 +130,6 @@
 	input_output.$(OBJEXT) data_tank.$(OBJEXT) ai.$(OBJEXT) \
 	shoot_laser.$(OBJEXT) shoot_rocket.$(OBJEXT) \
-	world_entity.$(OBJEXT) synchronisable.$(OBJEXT) list.$(OBJEXT)
+	world_entity.$(OBJEXT) synchronisable.$(OBJEXT) list.$(OBJEXT) \
+	vector.$(OBJEXT) ability.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -139,12 +140,12 @@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ai.Po ./$(DEPDIR)/data_tank.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/environment.Po \
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ability.Po ./$(DEPDIR)/ai.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/environment.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/input_output.Po ./$(DEPDIR)/list.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/npc.Po ./$(DEPDIR)/orxonox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/shoot_laser.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/shoot_rocket.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/synchronisable.Po ./$(DEPDIR)/world.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/world_entity.Po
+@AMDEP_TRUE@	./$(DEPDIR)/synchronisable.Po ./$(DEPDIR)/vector.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -199,4 +200,5 @@
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ability.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ai.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@
@@ -210,4 +212,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shoot_rocket.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synchronisable.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world_entity.Po@am__quote@
Index: orxonox/trunk/src/ability.cc
===================================================================
--- orxonox/trunk/src/ability.cc	(revision 2043)
+++ orxonox/trunk/src/ability.cc	(revision 2043)
@@ -0,0 +1,32 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+
+#include "ability.h"
+
+
+using namespace std;
+
+
+
+Ability::Ability () {}
+
+
+
+Ability::~Ability () {}
+
+
Index: orxonox/trunk/src/ability.h
===================================================================
--- orxonox/trunk/src/ability.h	(revision 2043)
+++ orxonox/trunk/src/ability.h	(revision 2043)
@@ -0,0 +1,16 @@
+
+#ifndef ABILITY_H
+#define ABILITY_H
+
+#include "data_tank.h"
+
+
+class Ability {
+
+ public:
+  Ability ();
+  ~Ability ();
+
+};
+
+#endif
Index: orxonox/trunk/src/vector.cc
===================================================================
--- orxonox/trunk/src/vector.cc	(revision 2043)
+++ orxonox/trunk/src/vector.cc	(revision 2043)
@@ -0,0 +1,401 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Christian Meyer
+   co-programmer: ...
+*/
+
+
+#include "vector.h"
+
+
+using namespace std;
+
+/**
+   \brief add two vectors
+   \param v: the other vector
+   \return the sum of both vectors
+*/
+Vector Vector::operator+ (const Vector& v) const
+{
+  Vector r;
+  
+  r.x = x + v.x;
+  r.y = y + v.y;
+  r.z = z + v.z;
+  
+  return r;
+}
+
+/**
+   \brief subtract a vector from another
+   \param v: the other vector
+   \return the difference between the vectors
+*/
+Vector Vector::operator- (const Vector& v) const
+{
+  Vector r;
+  
+  r.x = x - v.x;
+  r.y = y - v.y;
+  r.z = z - v.z;
+  
+  return r;
+}
+
+/**
+   \brief calculate the dot product of two vectors
+   \param v: the other vector
+   \return the dot product of the vectors
+*/
+float Vector::operator* (const Vector& v) const
+{
+  return x*v.x+y*v.y+z*v.z;
+}
+
+/**
+   \brief multiply a vector with a float
+   \param f: the factor
+   \return the vector multipied by f
+*/
+Vector Vector::operator* (float f) const
+{  
+  Vector r;
+  
+  r.x = x * f;
+  r.y = y * f;
+  r.z = z * f;
+  
+  return r;
+}
+
+/**
+   \brief divide a vector with a float
+   \param f: the divisor
+   \return the vector divided by f   
+*/
+Vector Vector::operator/ (float f) const
+{
+  Vector r;
+  
+  if( f == 0.0)
+  {
+    // Prevent divide by zero
+    return Vector (0,0,0);
+  }
+  
+  r.x = x / f;
+  r.y = y / f;
+  r.z = z / f;
+  
+  return r;
+}
+
+/**
+   \brief calculate the dot product of two vectors
+   \param v: the other vector
+   \return the dot product of the vectors
+*/
+float Vector::dot (const Vector& v) const
+{
+  return x*v.x+y*v.y+z*v.z;
+}
+
+/**
+  \brief calculate the cross product of two vectors
+  \param v: the other vector
+	\return the cross product of the vectors
+*/
+Vector Vector::cross (const Vector& v) const
+{
+  Vector r;
+  
+  r.x = y * v.z - z * v.y;
+  r.y = z * v.x - x * v.z;
+  r.z = x * v.y - y * v.x;
+  
+  return r;
+}
+  
+/**
+   \brief normalizes the vector to lenght 1.0
+*/
+void Vector::normalize ()
+{
+  float l = len();
+  
+  if( l == 0.0)
+  {
+    // Prevent divide by zero
+    return;
+  }
+  
+  x = x / l;
+  y = y / l;
+  z = z / l;
+}
+ 
+/**
+   \brief calculates the lenght of the vector
+   \return the lenght of the vector
+*/
+float Vector::len () const
+{
+  return sqrt (x*x+y*y+z*z);
+}
+
+/**
+   \brief calculate the angle between two vectors in radiances
+   \param v1: a vector
+   \param v2: another vector
+   \return the angle between the vectors in radians
+*/
+float angle_rad (const Vector& v1, const Vector& v2)
+{
+  return acos( v1 * v2 / (v1.len() * v2.len()));
+}
+
+/**
+   \brief calculate the angle between two vectors in degrees
+   \param v1: a vector
+   \param v2: another vector
+   \return the angle between the vectors in degrees
+*/
+float angle_deg (const Vector& v1, const Vector& v2)
+{
+  float f;
+  f = acos( v1 * v2 / (v1.len() * v2.len()));
+  return f * 180 / PI;
+}
+
+/**
+   \brief create a rotation from a vector
+   \param v: a vector
+*/
+Rotation::Rotation (const Vector& v)
+{
+  Vector x = Vector( 1, 0, 0);
+  Vector axis = x.cross( v);
+  axis.normalize();
+  float angle = angle_rad( x, v);
+  float ca = cos(angle);
+  float sa = sin(angle);
+  m[0] = 1.0f+(1.0f-ca)*(axis.x*axis.x-1.0f);
+  m[1] = -axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[2] = axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[3] = axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[4] = 1.0f+(1.0f-ca)*(axis.y*axis.y-1.0f);
+  m[5] = -axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[6] = -axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[7] = axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[8] = 1.0f+(1.0f-ca)*(axis.z*axis.z-1.0f);
+}
+
+/**
+   \brief creates a rotation from an axis and an angle (radians!)
+   \param axis: the rotational axis
+   \param angle: the angle in radians
+*/
+Rotation::Rotation (const Vector& axis, float angle)
+{
+  float ca, sa;
+  ca = cos(angle);
+  sa = sin(angle);
+  m[0] = 1.0f+(1.0f-ca)*(axis.x*axis.x-1.0f);
+  m[1] = -axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[2] = axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[3] = axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[4] = 1.0f+(1.0f-ca)*(axis.y*axis.y-1.0f);
+  m[5] = -axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[6] = -axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[7] = axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[8] = 1.0f+(1.0f-ca)*(axis.z*axis.z-1.0f);
+}
+
+/**
+   \brief creates a rotation from euler angles (pitch/yaw/roll)
+   \param pitch: rotation around z (in radians)
+   \param yaw: rotation around y (in radians)
+   \param roll: rotation around x (in radians)
+*/
+Rotation::Rotation ( float pitch, float yaw, float roll)
+{
+  float cy, sy, cr, sr, cp, sp;
+  cy = cos(yaw);
+  sy = sin(yaw);
+  cr = cos(roll);
+  sr = sin(roll);
+  cp = cos(pitch);
+  sp = sin(pitch);
+  m[0] = cy*cr;
+  m[1] = -cy*sr;
+  m[2] = sy;
+  m[3] = cp*sr+sp*sy*cr;
+  m[4] = cp*cr-sp*sr*sy;
+  m[5] = -sp*cy;
+  m[6] = sp*sr-cp*sy*cr;
+  m[7] = sp*cr+cp*sy*sr;
+  m[8] = cp*cy;
+}
+
+/**
+   \brief creates a nullrotation (an identity rotation)
+*/
+Rotation::Rotation ()
+{
+  m[0] = 1.0f;
+  m[1] = 0.0f;
+  m[2] = 0.0f;
+  m[3] = 0.0f;
+  m[4] = 1.0f;
+  m[5] = 0.0f;
+  m[6] = 0.0f;
+  m[7] = 0.0f;
+  m[8] = 1.0f;
+}
+
+/**
+   \brief rotates the vector by the given rotation
+   \param v: a vector
+   \param r: a rotation
+   \return the rotated vector
+*/
+Vector rotate_vector( const Vector& v, const Rotation& r)
+{
+  Vector t;
+  
+  t.x = v.x * r.m[0] + v.y * r.m[1] + v.z * r.m[2];
+  t.y = v.x * r.m[3] + v.y * r.m[4] + v.z * r.m[5];
+  t.z = v.x * r.m[6] + v.y * r.m[7] + v.z * r.m[8];
+
+  return t;
+}
+
+/**
+   \brief calculate the distance between two lines
+   \param l: the other line
+   \return the distance between the lines
+*/
+float Line::distance (const Line& l) const
+{
+  float q, d;
+  Vector n = a.cross(l.a);
+  q = n.dot(r-l.r);
+  d = n.len();
+  if( d == 0.0) return 0.0;
+  return q/d;
+}
+
+/**
+   \brief calculate the distance between a line and a point
+   \param v: the point
+   \return the distance between the Line and the point
+*/
+float Line::distance_point (const Vector& v) const
+{
+  Vector d = v-r;
+  Vector u = a * d.dot( a);
+  return (d - u).len();
+}
+
+/**
+   \brief calculate the two points of minimal distance of two lines
+   \param l: the other line
+   \return a Vector[2] (!has to be deleted after use!) containing the two points of minimal distance
+*/
+Vector* Line::footpoints (const Line& l) const
+{
+  Vector* fp = new Vector[2];
+  Plane p = Plane (r + a.cross(l.a), r, r + a);
+  fp[1] = p.intersect_line (l);
+  p = Plane (fp[1], l.a);
+  fp[0] = p.intersect_line (*this);
+  return fp;
+}
+
+/**
+  \brief calculate the length of a line
+  \return the lenght of the line 
+*/
+float Line::len() const
+{
+  return a.len();
+}
+
+/**
+   \brief rotate the line by given rotation
+   \param rot: a rotation
+*/
+void Line::rotate (const Rotation& rot)
+{
+  Vector t = a + r;
+  t = rotate_vector( t, rot);
+  r = rotate_vector( r, rot),
+  a = t - r;
+}
+
+/**
+   \brief create a plane from three points
+   \param a: first point
+   \param b: second point
+   \param c: third point
+*/
+Plane::Plane (Vector a, Vector b, Vector c)
+{
+  n = (a-b).cross(c-b);
+  k = -(n.x*b.x+n.y*b.y+n.z*b.z);
+}
+
+/**
+   \brief create a plane from anchor point and normal
+   \param n: normal vector
+   \param p: anchor point
+*/
+Plane::Plane (Vector norm, Vector p)
+{
+  n = norm;
+  k = -(n.x*p.x+n.y*p.y+n.z*p.z);
+}
+
+/**
+   \brief returns the intersection point between the plane and a line
+   \param l: a line
+*/
+Vector Plane::intersect_line (const Line& l) const
+{
+  if (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z == 0.0) return Vector(0,0,0);
+  float t = (n.x*l.r.x+n.y*l.r.y+n.z*l.r.z+k) / (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z);
+  return l.r + (l.a * t);
+}
+
+/**
+   \brief returns the distance between the plane and a point
+   \param p: a Point
+   \return the distance between the plane and the point (can be negative)
+*/
+float Plane::distance_point (const Vector& p) const
+{
+  float l = n.len();
+  if( l == 0.0) return 0.0;
+  return (n.dot(p) + k) / n.len();
+}
+
+/**
+   \brief returns the side a point is located relative to a Plane
+   \param p: a Point
+   \return 0 if the point is contained within the Plane, positive(negative) if the point is in the positive(negative) semi-space of the Plane
+*/
+float Plane::locate_point (const Vector& p) const
+{
+  return (n.dot(p) + k);
+}
Index: orxonox/trunk/src/vector.h
===================================================================
--- orxonox/trunk/src/vector.h	(revision 2043)
+++ orxonox/trunk/src/vector.h	(revision 2043)
@@ -0,0 +1,114 @@
+/*! 
+    \file vector.h
+    \brief A basic 3D math framework
+    
+    Contains classes to handle vectors, lines, rotations and planes
+*/ 
+
+#ifndef VECTOR_H
+#define VECTOR_H
+
+#include <math.h>
+#define PI 3.14159265359f
+
+//! 3D vector
+/**
+  Class for 3-dimensional vector calculation
+  
+  Supports all common vector operations (dot, cross, lenght and so on)
+*/
+class Vector {
+
+  public:
+ 
+  float x, y, z;
+
+  Vector (float x, float y, float z) : x(x), y(y), z(z) {}  //!< assignment constructor
+  Vector () : x(0), y(0), z(0) {}
+  ~Vector () {}
+
+  Vector operator+ (const Vector& v) const;
+  Vector operator- (const Vector& v) const;
+  float operator* (const Vector& v) const;
+  Vector operator* (float f) const;
+  Vector operator/ (float f) const;
+  float dot (const Vector& v) const;
+  Vector cross (const Vector& v) const;
+  float len() const;
+  void normalize();
+};
+
+float angle_deg (const Vector& v1, const Vector& v2);
+float angle_rad (const Vector& v1, const Vector& v2);
+
+//! 3D rotation
+/**
+  Class to handle 3-dimensional rotations.
+  Can create a rotation from several inputs, currently stores rotation using a 3x3 Matrix
+*/
+class Rotation {
+  public:
+  
+  float m[9]; //!< 3x3 Rotation Matrix
+  
+  Rotation ( const Vector& v);
+  Rotation ( const Vector& axis, float angle);
+  Rotation ( float pitch, float yaw, float roll);
+  Rotation ();
+  ~Rotation () {}
+  
+};
+
+//!< Apply a rotation to a vector
+Vector rotate_vector( const Vector& v, const Rotation& r);
+
+//! 3D line
+/**
+  Class to store Lines in 3-dimensional space
+
+  Supports line-to-line distance measurements and rotation
+*/
+class Line
+{
+  public:
+  
+  Vector r;   //!< Offset
+  Vector a;   //!< Direction
+  
+  Line ( Vector r, Vector a) : r(r), a(a) {}  //!< assignment constructor
+  Line () : r(Vector(0,0,0)), a(Vector (1,1,1)) {}
+  ~Line () {}
+  
+  float distance (const Line& l) const;
+  float distance_point (const Vector& v) const;
+  Vector* footpoints (const Line& l) const;
+  float len () const;
+  
+  void rotate(const Rotation& rot);
+};
+
+//! 3D plane
+/**
+  Class to handle planes in 3-dimensional space
+  
+  Critical for polygon-based collision detection
+*/
+class Plane
+{
+  public:
+  
+  Vector n;   //!< Normal vector
+  float k;    //!< Offset constant
+  
+  Plane (Vector a, Vector b, Vector c);
+  Plane (Vector norm, Vector p);
+  Plane (Vector n, float k) : n(n), k(k) {} //!< assignment constructor
+  Plane () : n(Vector(1,1,1)), k(0) {}
+  ~Plane () {}
+  
+  Vector intersect_line (const Line& l) const;
+  float distance_point (const Vector& p) const;
+  float locate_point (const Vector& p) const;
+};
+
+#endif
Index: orxonox/trunk/src/world_entity.cc
===================================================================
--- orxonox/trunk/src/world_entity.cc	(revision 2036)
+++ orxonox/trunk/src/world_entity.cc	(revision 2043)
@@ -20,7 +20,21 @@
 #include "world_entity.h"
 
+#include "vector.h"
+
 using namespace std;
 
 
+/**
+   \brief 
+   \param v:
+   \return 
+*/
+
+/**
+   \brief Constructor
+
+   This Constructor initializises the all WorldEntities. Everything, that is a part of the game-world is a child of WorldEntity. This class implements empty functions for all sort of operation a WorldEntity has to or can implement.
+This is some sort of standard interface to all WorldEntities...
+*/
 WorldEntity::WorldEntity () 
 {
@@ -32,11 +46,32 @@
 WorldEntity::~WorldEntity () {}
 
+/**
+   \brief sets the position of this entity
+   \param position: Vector, pointing (from 0,0,0) to the new position
+*/
+void WorldEntity::setPosition(Vector* position) {} 
 
-/*void WorldEntity::setPosition( Vector position ) {} */
-/* Vector*  void getPosition() {} */
+/**
+   \brief gets the postion of this entity
+   \return a Vector, pointing (from 0,0,0) to the new position
+*/
+Vector* getPosition() {}
 
-void WorldEntity::setOrientation(/* Vector orientation*/) {}
-/* Vector* */ void WorldEntity::getOrientation() {}
+/**
+   \brief sets orientation of this entity
+   \param orientation: vector specifying in which direction the entity looks
+*/
+void WorldEntity::setOrientation(Vector* orientation) {}
 
+/**
+   \brief gets orientation of this entity
+   \return vector specifying in which direction the entity looks
+*/
+Vector* WorldEntity::getOrientation() {}
+
+/**
+   \brief sets the speed of the entity, if any
+   \param speed: the speed in points (openGL points) per seconds
+*/
 void WorldEntity::setSpeed(float speed)
 {
@@ -44,4 +79,8 @@
 }
 
+/**
+   \brief gets the speed of the entity, if any
+   \return the speed in points (openGL points) per seconds
+*/
 float WorldEntity::getSpeed()
 {
@@ -49,4 +88,8 @@
 }
 
+/**
+   \brief sets the health of the entity
+   \param health: number for the life count, normaly {0..100}
+*/
 void WorldEntity::setHealth(float health)
 {
@@ -54,4 +97,8 @@
 }
 
+/**
+   \brief gets the health of the entity
+   \return number for the life count, normaly {0..100}
+*/
 float WorldEntity::getHealth()
 {
@@ -59,8 +106,18 @@
 }
 
+/**
+   \brief this method is called every tick
+   \param time: the time since start of the world
 
-void WorldEntity::tick(float dt) 
+   This function is called before every repaint of the world, to update every time dependent variable of the entity. If the entity moves, it has to calculate the new position every tick here in this function. Do not use this for animations.
+*/
+void WorldEntity::tick(float time) 
 {}
 
+/**
+   \brief the entity is painted to the screen with this function
+
+   This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
+*/
 void WorldEntity::paint() 
 {
@@ -69,10 +126,46 @@
 
 /* virtual void WorldEntity::actionEvent(Event* event); */
-void WorldEntity::collide(WorldEntity* we /*, Vector n */) 
-{}
+/**
+   \brief this function is called, when two entities collide
+   \param we: the world entity, with whom it collides
+   \param loc: place where the collision happens
+*/
+void WorldEntity::collide(WorldEntity* we, Vector loc) {}
 
-void WorldEntity::hurt() 
-{}
+/**
+   \brief this function is called, when the ship is hit by a waepon
+   \param weapon: the laser/rocket/shoot that hits.
+   \param loc: place where it is hit
 
-void WorldEntity::destroy() 
-{}
+   calculate the damage depending
+*/
+void WorldEntity::hit(WorldEntity* weapon, Vector loc) {}
+
+/**
+   \brief this function is called, if the entity is to be destroied
+   
+   This can be called, if eg. something realy bad happens :)
+*/
+void WorldEntity::destroy() {}
+
+/**
+   \brief this function is automatically called before the entity enters the world
+*/
+void WorldEntity::entityPreEnter() {}
+
+/**
+   \brief this function is automatically called after the entity enters the world
+
+*/
+void WorldEntity::entityPostEnter() {}
+
+/**
+   \brief this function is automatically called before the entity quits the world
+
+*/
+void WorldEntity::entityPreQuit() {}
+
+/**
+   \brief this function is automatically called after the entity quits the world
+*/
+void WorldEntity::entityPostQuit() {}
Index: orxonox/trunk/src/world_entity.h
===================================================================
--- orxonox/trunk/src/world_entity.h	(revision 2036)
+++ orxonox/trunk/src/world_entity.h	(revision 2043)
@@ -5,4 +5,6 @@
 #include "data_tank.h"
 
+class Vector;
+class Ability;
 
 class WorldEntity {
@@ -13,8 +15,9 @@
 
 
-  /*void setPosition( Vector position );*/
-  /* Vector*  void getPosition();*/
-  void setOrientation(/* Vector orientation*/);
-  /* Vector* */ void getOrientation();
+  void setPosition(Vector* position);
+  Vector* getPosition();
+  void setOrientation(Vector* orientation);
+  Vector* getOrientation();
+  void setSpawnPoint(Vector* place);
   void setSpeed(float speed);
   float getSpeed();
@@ -22,20 +25,30 @@
   float getHealth();
 
-  void addAbility();
-  void removeAbility();
+  void addAbility(Ability* ability);
+  void removeAbility(Ability* ability);
 
-  virtual void tick(float dt);
+  virtual void tick(float time);
   virtual void paint();
   /* virtual void actionEvent(Event* event); */
-  virtual void collide(WorldEntity* we /*, Vector n */);
-  virtual void hurt();
+  virtual void collide(WorldEntity* we, Vector loc);
+  virtual void hit(WorldEntity* weapon, Vector loc);
   virtual void destroy();
 
+  virtual void entityPreEnter();
+  virtual void entityPostEnter();
+  virtual void entityPreQuit();
+  virtual void entityPostQuit();
+
+ 
+
  private:
-  /* Vector* position; */
-  /* Vector* orientation; */
+  Vector* position;
+  Vector* orientation;
   /* List of abilities */ 
   float health;
   float speed;
+  /* entity can be in the air or at ground: */
+  int airGround;
+
   
 
