Index: code/branches/tetris/src/modules/pong/Pong.h
===================================================================
--- code/branches/tetris/src/modules/pong/Pong.h	(revision 8104)
+++ code/branches/tetris/src/modules/pong/Pong.h	(revision 8105)
@@ -48,6 +48,7 @@
     @brief
         Implements a Pong minigame.
-
-        //TODO: Add details to different classes used and how.
+        It connects the different entities present in a game of Pong.
+        
+        //TODO: List and add details to different classes used and how.
         PongBall, is the ball, PongBats are the things that can be moved by the players (ControllableEntities), PongCenterpoint is the playing field. (x-z area)
 
Index: code/branches/tetris/src/modules/pong/PongBall.cc
===================================================================
--- code/branches/tetris/src/modules/pong/PongBall.cc	(revision 8104)
+++ code/branches/tetris/src/modules/pong/PongBall.cc	(revision 8105)
@@ -101,5 +101,5 @@
     @brief
         Is called every tick.
-        //TODO: Explain in detail what happens here.
+        Handles the movement of the ball and its interaction with the boundaries and bats.
     @param dt
         The time since the last tick.
@@ -226,9 +226,11 @@
     /**
     @brief
-        Set the 
+        Set the bats for the ball.
+    @param bats
+        An array (of size 2) of weak pointers, to be set as the new bats.
     */
     void PongBall::setBats(WeakPtr<PongBat>* bats)
     {
-        if (this->bDeleteBats_)
+        if (this->bDeleteBats_) // If there are already some bats, delete them.
         {
             delete[] this->bat_;
@@ -237,11 +239,17 @@
 
         this->bat_ = bats;
+        // Also store their object IDs, for synchronization.
         this->batID_[0] = this->bat_[0]->getObjectID();
         this->batID_[1] = this->bat_[1]->getObjectID();
     }
 
+    /**
+    @brief
+        Get the bats over the network.
+    */
     void PongBall::applyBats()
     {
-        if (!this->bat_)
+        // Make space for the bats, if they don't exist, yet.
+        if (this->bat_ == NULL)
         {
             this->bat_ = new WeakPtr<PongBat>[2];
Index: code/branches/tetris/src/modules/pong/PongBall.h
===================================================================
--- code/branches/tetris/src/modules/pong/PongBall.h	(revision 8104)
+++ code/branches/tetris/src/modules/pong/PongBall.h	(revision 8105)
@@ -47,8 +47,7 @@
     /**
     @brief
-        This class manages the ball for Pong.
+        This class manages the ball for @ref orxonox::Pong "Pong".
 
-        //TODO: Describe what it's responnsibilities are.
-        Only moves in x-z area.
+        It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::PongCenterpoint "PongCenterpoint") and the @ref orxonox::PongBat "PongBats". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
 
     @author
@@ -65,28 +64,62 @@
             virtual void tick(float dt);
 
+            /**
+            @brief Set the dimensions of the playing field.
+            @param width The width of the playing field.
+            @param height The height of the playing field.
+            */
             void setFieldDimension(float width, float height)
                 { this->fieldWidth_ = width; this->fieldHeight_ = height; }
+            /**
+            @brief Get the dimensions of the playing field.
+            @param dimension A vector with the width as the first and height as the second component.
+            */
             void setFieldDimension(const Vector2& dimension)
                 { this->setFieldDimension(dimension.x, dimension.y); }
+            /**
+            @brief Get the dimensions of the playing field.
+            @return Returns a vector with the width as the first and height as the second component.
+            */
             Vector2 getFieldDimension() const
                 { return Vector2(this->fieldWidth_, this->fieldHeight_); }
 
-            void setSpeed(float speed);
+            void setSpeed(float speed); //!< Set the speed of the ball (in x-direction).
+            /**
+            @brief Get the speed of the ball (in x-direction).
+            @return Returns the speed of the ball (in x-direction).
+            */
             float getSpeed() const
                 { return this->speed_; }
 
+            /**
+            @brief Set the acceleration factor of the ball.
+            @param factor The factor the acceleration of the ball is set to.
+            */
             void setAccelerationFactor(float factor)
                 { this->accelerationFactor_ = factor; }
+            /**
+            @brief Get the acceleration factor of the ball.
+            @return Returns the acceleration factor of the ball.
+            */
             float getAccelerationFactor() const
                 { return this->accelerationFactor_; }
 
+            /**
+            @brief Set the length of the bats.
+            @param batlength The length of the bats (in z-direction) as percentage of the height of the playing field.
+            */
             void setBatLength(float batlength)
                 { this->batlength_ = batlength; }
+            /**
+            @brief Get the length of the bats.
+            @return Returns the length of the bats (in z-direction) as percentage of the height of the playing field.
+            */
             float getBatLength() const
                 { return this->batlength_; }
 
-            void setBats(WeakPtr<PongBat>* bats);
-            void applyBats();
+            void setBats(WeakPtr<PongBat>* bats); //!< Set the bats for the ball.
+            void applyBats(); //!< Get the bats over the network.
 
+            // TODO: What is this exactly?
             static const float MAX_REL_Z_VELOCITY;
 
@@ -94,13 +127,13 @@
             void registerVariables();
 
-            float fieldWidth_;
-            float fieldHeight_;
-            float speed_;
-            float accelerationFactor_;
-            float batlength_;
-            WeakPtr<PongBat>* bat_;
-            bool bDeleteBats_;
-            unsigned int* batID_;
-            float relMercyOffset_;
+            float fieldWidth_; //!< The width of the playing field.
+            float fieldHeight_; //!< The height of the playing field.
+            float speed_; //!< The speed (in x-direction) of the ball.
+            float accelerationFactor_; //!< The acceleration factor of the ball.
+            float batlength_; //!< The length of the bats (in z-direction) as percentage of the height of the playing field.
+            WeakPtr<PongBat>* bat_; //!< An array with the two bats.
+            bool bDeleteBats_; //!< Bool, to keep track, of whether bat_ exists or not.
+            unsigned int* batID_; //!< The object IDs of the bats, to be able to synchronize them over the network.
+            float relMercyOffset_; //!< Offset, that makes the player not loose, when, in all fairness, he would have.
     };
 }
Index: code/branches/tetris/src/modules/pong/PongBat.cc
===================================================================
--- code/branches/tetris/src/modules/pong/PongBat.cc	(revision 8104)
+++ code/branches/tetris/src/modules/pong/PongBat.cc	(revision 8105)
@@ -27,4 +27,9 @@
  */
 
+/**
+    @file PongBat.cc
+    @brief Implementation of the PongBat class.
+*/
+
 #include "PongBat.h"
 
@@ -36,4 +41,8 @@
     CreateFactory(PongBat);
 
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
     PongBat::PongBat(BaseObject* creator) : ControllableEntity(creator)
     {
@@ -50,4 +59,8 @@
     }
 
+    /**
+    @brief
+        Registers variables to be synchronized over the network.
+    */
     void PongBat::registerVariables()
     {
@@ -57,12 +70,22 @@
     }
 
+    /**
+    @brief
+        Is called each tick.
+        //TODO detailed
+    @param dt
+        The time since last tick.
+    */
     void PongBat::tick(float dt)
     {
+        // If the bat is controlled (but not over the network).
         if (this->hasLocalController())
         {
             if (this->movement_ != 0)
             {
+                // The absolute value of the movement is restricted to be lesser or equal than the speed of the bat.
                 this->movement_ = clamp(this->movement_, -1.0f, 1.0f) * this->speed_;
 
+                //TODO What does this?
                 if (this->bMoveLocal_)
                     this->setVelocity(this->getOrientation() * Vector3(this->movement_, 0, 0));
@@ -84,4 +107,5 @@
         SUPER(PongBat, tick, dt);
 
+        // Restrict the position of the bats, for them to always be between the upper and lower delimiters. i.e. the bats stall if they reach the upper or lower boundary.
         Vector3 position = this->getPosition();
         if (position.z > this->fieldHeight_ / 2 - this->fieldHeight_ * this->length_ / 2)
@@ -96,4 +120,10 @@
     }
 
+    /**
+    @brief
+        Overloaded the function to steer the bat up and down.
+    @param value
+        A vector whose first component is the inverse direction in which we want to steer the bat.
+    */
     void PongBat::moveFrontBack(const Vector2& value)
     {
@@ -102,4 +132,10 @@
     }
 
+    /**
+    @brief
+        Overloaded the function to steer the bat up and down.
+    @param value
+        A vector whose first component is the direction in which we wnat to steer the bat.
+    */
     void PongBat::moveRightLeft(const Vector2& value)
     {
@@ -108,4 +144,8 @@
     }
 
+    /**
+    @brief
+        Is called when the player changed.
+    */
     void PongBat::changedPlayer()
     {
Index: code/branches/tetris/src/modules/pong/PongBat.h
===================================================================
--- code/branches/tetris/src/modules/pong/PongBat.h	(revision 8104)
+++ code/branches/tetris/src/modules/pong/PongBat.h	(revision 8105)
@@ -27,49 +27,92 @@
  */
 
+/**
+    @file PongBat.h
+    @brief Declaration of the PongBat class.
+    @ingroup Pong
+*/
+
 #ifndef _PongBat_H__
 #define _PongBat_H__
 
 #include "pong/PongPrereqs.h"
+
 #include "worldentities/ControllableEntity.h"
 
 namespace orxonox
 {
+
+    /**
+    @brief
+        The PongBat class manages the bats for @ref orxonox::Pong "Pong", which are the elements controlled by the player.
+        
+        It is responsible for the movement (controlled by the players) of the bat.
+        
+    @author
+        Fabian 'x3n' Landau
+        
+    @ingroup Pong
+    */
     class _PongExport PongBat : public ControllableEntity
     {
         public:
-            PongBat(BaseObject* creator);
+            PongBat(BaseObject* creator); //!< Constructor. Registers and initializes the object.
             virtual ~PongBat() {}
 
             virtual void tick(float dt);
 
-            virtual void moveFrontBack(const Vector2& value);
-            virtual void moveRightLeft(const Vector2& value);
+            virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
+            virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
 
-            virtual void changedPlayer();
+            virtual void changedPlayer(); //!< Is called when the player changed.
 
+            /**
+            @brief Set the speed of the bat.
+            @param speed The speed to be set.
+            */
             void setSpeed(float speed)
                 { this->speed_ = speed; }
+            /**
+            @brief Get the speed of the bat.
+            @return Returns the speed of the bat.
+            */
             float getSpeed() const
                 { return this->speed_; }
 
+            /**
+            @brief Set the height of the playing field.
+            @param height The height of the playing field.
+            */
             void setFieldHeight(float height)
                 { this->fieldHeight_ = height; }
+            /**
+            @brief Get the height of the playing field.
+            @return Returns the height of the playing field.
+            */
             float getFieldHeight() const
                 { return this->fieldHeight_; }
 
+            /**
+            @brief Set the length of the bat.
+            @param length The length of the bat (in z-direction) as percentage of the height of the playing field.
+            */
             void setLength(float length)
                 { this->length_ = length; }
+            /**
+            @brief get the length of the bat.
+            @return Returns the length of the bat (in z-direction) as percentage of the height of the playing field.
+            */
             float getLength() const
                 { return this->length_; }
 
         private:
-            void registerVariables();
+            void registerVariables(); //!< Registers variables to be synchronized over the network.
 
-            float movement_;
-            bool bMoveLocal_;
-            float speed_;
-            float length_;
-            float fieldHeight_;
-            bool bSteadiedPosition_;
+            float movement_; //!< The amount (and direction), in z-direction, of movement of the bat.
+            bool bMoveLocal_; //TODO ???
+            float speed_; //!< The movementspeed of the bat.
+            float length_; //!< The length of the bat (in z-direction) as percentage of the height of the playing field.
+            float fieldHeight_; //!< The height of the playing field.
+            bool bSteadiedPosition_; //TODO: ???
     };
 }
Index: code/branches/tetris/src/modules/pong/PongCenterpoint.cc
===================================================================
--- code/branches/tetris/src/modules/pong/PongCenterpoint.cc	(revision 8104)
+++ code/branches/tetris/src/modules/pong/PongCenterpoint.cc	(revision 8105)
@@ -27,8 +27,14 @@
  */
 
+/**
+    @file PongCenterpoint.cc
+    @brief Implementation of the PongCenterpoint class.
+*/
+
 #include "PongCenterpoint.h"
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+
 #include "Pong.h"
 
@@ -37,4 +43,8 @@
     CreateFactory(PongCenterpoint);
 
+    /**
+    @brief
+        Constructor. Registers and initializes the object and checks whether the gametype is actually Pong.
+    */
     PongCenterpoint::PongCenterpoint(BaseObject* creator) : StaticEntity(creator)
     {
@@ -51,4 +61,8 @@
     }
 
+    /**
+    @brief
+        Method to create a PongCenterpoint through XML.
+    */
     void PongCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
@@ -64,17 +78,26 @@
     }
 
+    /**
+    @brief
+        Is called when the gametype has changed.
+    */
     void PongCenterpoint::changedGametype()
     {
         SUPER(PongCenterpoint, changedGametype);
 
+        // Check, whether it's still Pong.
         this->checkGametype();
     }
 
+    /**
+    @brief
+        Checks whether the gametype is Pong and if it is, sets its centerpoint.
+    */
     void PongCenterpoint::checkGametype()
     {
-        if (this->getGametype() && this->getGametype()->isA(Class(Pong)))
+        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong)))
         {
-            Pong* pong_gametype = orxonox_cast<Pong*>(this->getGametype().get());
-            pong_gametype->setCenterpoint(this);
+            Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype().get());
+            pongGametype->setCenterpoint(this);
         }
     }
Index: code/branches/tetris/src/modules/pong/PongCenterpoint.h
===================================================================
--- code/branches/tetris/src/modules/pong/PongCenterpoint.h	(revision 8104)
+++ code/branches/tetris/src/modules/pong/PongCenterpoint.h	(revision 8105)
@@ -27,4 +27,10 @@
  */
 
+/**
+    @file PongCenterpoint.h
+    @brief Declaration of the PongCenterpoint class.
+    @ingroup Pong
+*/
+
 #ifndef _PongCenterpoint_H__
 #define _PongCenterpoint_H__
@@ -33,67 +39,197 @@
 
 #include <string>
+
 #include <util/Math.h>
+
 #include "worldentities/StaticEntity.h"
 
 namespace orxonox
 {
+    
+    /**
+    @brief
+        The PongCenterpoint implements the playing field @ref orxonox::Pong "Pong" takes place in and allows for many parameters of the minigame to be set.
+        The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis.
+        
+        Various parameters can be set:
+        - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
+        - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::PongBall "PongBall", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+        - The <b>battemplate</b> is a template that is applied to the @ref orxonox::PongBall "PongBat", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+        - The <b>ballspeed</b> is the speed with wich the @ref orxonox::PongBall "PongBall" moves. The default is <em>100</em>.
+        - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::PongBall "PongBall". The default is <em>1.0</em>.
+        - The <b>batspeed</b> is the speed with which the @ref orxonox::PongBat "PongBats" move. The default is <em>60</em>.
+        - The <b>batlength</b> is the length of the @ref orxonox::PongBat "PongBats" as the percentage of the height of the playing field. The default is <em>0.25</em>.
+        
+        An example in XML of the PongCenterpoint would be:
+        
+        First the needed templates:
+        The template for the @ref orxonox::PongBall "PongBall".
+        @code
+        <Template name="pongball">
+          <PongBall>
+            <attached>
+              <Model mesh="sphere.mesh" scale="2" />
+              <ParticleSpawner name="hiteffect" position="0,0,0" source="Orxonox/sparks2" lifetime="0.01" autostart="0" mainstate="spawn" />
+            </attached>
+            <eventlisteners>
+              <EventTarget target="hiteffect" />
+            </eventlisteners>
+          </PongBall>
+        </Template>
+        @endcode
+        As can be seen, a sphere is attached as the @ref orxonox::Model "Model" for the @ref orxonox::PongBall "PongBall", and also an @ref orxonox::EventListener "EventListener" that triggers a @ref orxonox::ParticleSpawner "ParticleSpawner", whenever the ball hits the boundaries is attached.
+        
+        Additionally the template for the @ref orxonox::PongBat "PongBat".
+        @code
+        <Template name="pongbatcameras" defaults="0">
+          <PongBat>
+            <camerapositions>
+              <CameraPosition position="0,200,0" pitch="-90" absolute="true" />
+            </camerapositions>
+          </PongBat>
+        </Template>
+
+        <Template name="pongbat">
+          <PongBat camerapositiontemplate=pongbatcameras>
+            <attached>
+              <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
+            </attached>
+          </PongBat>
+        </Template>
+        @endcode
+        As can be seen, there are actually two templates. The first template is needed to set the camera for the @ref orxonox::PongBat "PongBat". The second template ist the actual template for the @ref orxonox::PongBat "PongBat", the template for the camera position is added and a @ref orxonox::Model "Model" for the @ref orxonox::PongBat "PongBat" is attached.
+        
+        Finally the PongCenterpoint is created.
+        @code
+        <PongCenterpoint name="pongcenter" dimension="200,120" balltemplate="pongball" battemplate="pongbat" ballspeed="200" ballaccfactor="1.0" batspeed="130" batlength="0.25">
+          <attached>
+            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
+            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
+          </attached>
+        </PongCenterpoint>
+        @endcode
+        All parameters are specified. And also two @ref orxonox::Model "Models" (for the upper and lower boundary) are attached.
+        
+        For a more elaborate example, have a look at the <code>pong.oxw</code> level file.
+    
+    @author
+        Fabian 'x3n' Landau
+        
+    @ingroup Pong
+    */
     class _PongExport PongCenterpoint : public StaticEntity
     {
         public:
-            PongCenterpoint(BaseObject* creator);
+            PongCenterpoint(BaseObject* creator); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Pong.
             virtual ~PongCenterpoint() {}
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            virtual void changedGametype();
-
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a PongCenterpoint through XML.
+
+            virtual void changedGametype(); //!< Is called when the gametype has changed.
+
+            /**
+            @brief Set the template for the ball. (e.g. to attach the model of the ball, but also to attach an EventListener to it to detect, when it hits the boundaries, and e.g. display some ParticleEffets, when it does.)
+            @param balltemplate The name of the template to be set.
+            */
             void setBalltemplate(const std::string& balltemplate)
                 { this->balltemplate_ = balltemplate; }
+            /**
+            @brief Get the template of the ball.
+            @return Returns the name of the template of the ball. 
+            */
             const std::string& getBalltemplate() const
                 { return this->balltemplate_; }
 
+            /**
+            @brief Set the template for the bats. (e.g. to attach the model of the bat, but also to attach CameraPositions to it, to be able to view the game from the bats perspective)
+            @param battemplate The name of the template to be set.
+            */
             void setBattemplate(const std::string& battemplate)
                 { this->battemplate_ = battemplate; }
+            /**
+            @brief Get the template of the bats.
+            @return Returns the name of the template of the bats.
+            */
             const std::string& getBattemplate() const
                 { return this->battemplate_; }
 
+            /**
+            @brief Set the dimensions of the playing field.
+            @param dimension A vector with the width of the playing field as first component and the height as second.
+            */
             void setFieldDimension(const Vector2& dimension)
                 { this->width_ = dimension.x; this->height_ = dimension.y; }
+            /**
+            @brief Get the dimensions of the playing field.
+            @return Returns a vector with the width of the playing field as first component and the height as second.
+            */
             Vector2 getFieldDimension() const
                 { return Vector2(this->width_, this->height_); }
 
+            /**
+            @brief Set the speed of the ball.
+            @param ballspeed The speed of the ball.
+            */
             void setBallSpeed(float ballspeed)
                 { this->ballspeed_ = ballspeed; }
+            /**
+            @brief Get the speed of the ball.
+            @return Returns the speed of the ball.
+            */
             float getBallSpeed() const
                 { return this->ballspeed_; }
 
+            /**
+            @brief Set the ball's acceleration factor.
+            @param ballaccfactor The ball's acceleration factor.
+            */
             void setBallAccelerationFactor(float ballaccfactor)
                 { this->ballaccfactor_ = ballaccfactor; }
+            /**
+            @brief Get the ball's acceleration factor
+            @return Returns the ball's acceleration factor.
+            */
             float getBallAccelerationFactor() const
                 { return this->ballaccfactor_; }
 
+            /**
+            @brief Set the speed of the bats.
+            @param batspeed The speed of the bats.
+            */
             void setBatSpeed(float batspeed)
                 { this->batspeed_ = batspeed; }
+            /**
+            @brief Get the speed of the bats.
+            @return Returns the speed of the bats.
+            */
             float getBatSpeed() const
                 { return this->batspeed_; }
 
+            /**
+            @brief Set the length of the bats.
+            @param batlength The length of the bats (in z-direction) as a percentage of the height of the playing field.
+            */
             void setBatLength(float batlength)
                 { this->batlength_ = batlength; }
+            /**
+            @brief Get the length of the bats.
+            @return Returns the length of the bats (in z-direction) as a percentage of the height of the playing field.
+            */
             float getBatLength() const
                 { return this->batlength_; }
 
         private:
-            void checkGametype();
-
-            std::string balltemplate_;
-            std::string battemplate_;
-
-            float ballspeed_;
-            float ballaccfactor_;
-            float batspeed_;
-            float batlength_;
-
-            float width_;
-            float height_;
+            void checkGametype(); //!< Checks whether the gametype is Pong and if it is, sets its centerpoint.
+
+            std::string balltemplate_; //!< The template for the ball.
+            std::string battemplate_; //!< The template for the batts.
+
+            float ballspeed_; //!< The speed of then ball.
+            float ballaccfactor_; //!< The acceleration factor of the ball.
+            float batspeed_; //!< The speed of the bat.
+            float batlength_; //!< The length of the bat (in z-direction) as a percentage of the height of the playing field.
+
+            float width_; //!< The height of the playing field.
+            float height_; //!< The width of the playing field.
     };
 }
