Index: code/branches/presentation/src/modules/objects/SpaceBoundaries.cc
===================================================================
--- code/branches/presentation/src/modules/objects/SpaceBoundaries.cc	(revision 8659)
+++ code/branches/presentation/src/modules/objects/SpaceBoundaries.cc	(revision 8660)
@@ -59,5 +59,5 @@
             this->pawnsIn_.clear();
         
-            for( std::vector<billboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
+            for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
             {
                 if( current->billy != NULL)
@@ -95,36 +95,31 @@
     }
     
-    void SpaceBoundaries::positionBillboard(const Vector3 position)
-    {
-        std::vector<billboardAdministration>::iterator current;
-        for( current = this->billboards_.begin(); current != this->billboards_.end(); current++)
-        {
-            if(!current->usedYet)
-            {
+    void SpaceBoundaries::positionBillboard(const Vector3& position, float alpha)
+    {
+        size_t current;
+        for (current = 0; current < this->billboards_.size(); ++current)
+            if (!this->billboards_[current].usedYet)
                 break;
-            }
-        }
-        if( current == this->billboards_.end() )
-        {
-            Billboard *tmp = new Billboard(this);
-            tmp->setPosition(position);
-            this->setBillboardOptions( tmp );
-            Vector3 normalisedVec = (position - this->getPosition()).normalisedCopy(); /* Vektor von Kugelmitte nach aussen */
-            tmp->setCommonDirection ( -1.0 * normalisedVec );
-            Vector3 upVector = Vector3(normalisedVec.z, normalisedVec.z, -(normalisedVec.x+normalisedVec.y));
-            upVector.normalise();
-            tmp->setCommonUpVector( upVector );
-            billboardAdministration tmp2 = { true, tmp };
-            this->billboards_.push_back( tmp2 );
-        } else {
-            current->billy->setPosition(position);
-            current->billy->setVisible(true);
-            current->usedYet = true;
-            Vector3 normalisedVec = (position - this->getPosition()).normalisedCopy(); /* Vektor von Kugelmitte nach aussen */
-            current->billy->setCommonDirection ( -1.0 * normalisedVec );
-            Vector3 upVector = Vector3(normalisedVec.z, normalisedVec.z, -(normalisedVec.x+normalisedVec.y));
-            upVector.normalise();
-            current->billy->setCommonUpVector( upVector );
-        }
+
+        if (current == this->billboards_.size())
+        {
+            Billboard* billboard = new Billboard(this);
+            billboard->setPosition(position);
+            this->setBillboardOptions(billboard);
+            BillboardAdministration ba = {true, billboard};
+            this->billboards_.push_back(ba);
+        }
+
+        this->billboards_[current].billy->setPosition(position);
+        this->billboards_[current].billy->setVisible(true);
+        this->billboards_[current].billy->setColour(ColourValue(1, 1, 1, alpha));
+        this->billboards_[current].usedYet = true;
+
+        Vector3 directionVector = (this->getPosition() - position).normalisedCopy(); // vector from the position of the billboard to the center of the sphere
+        this->billboards_[current].billy->setCommonDirection(directionVector);
+
+        Vector3 upVector = Vector3(directionVector.z, directionVector.z, -(directionVector.x + directionVector.y)); // vector perpendicular to the direction vector
+        upVector.normalise();
+        this->billboards_[current].billy->setCommonUpVector(upVector);
     }
     
@@ -142,5 +137,5 @@
     void SpaceBoundaries::removeAllBillboards()
     {
-        for( std::vector<billboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++ )
+        for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++ )
         {
             current->usedYet = false;
@@ -229,5 +224,5 @@
                 if(/* humanItem &&*/ abs(this->maxDistance_ - distance) < this->showDistance_ )
                 {
-                    this->displayBoundaries(currentPawn); // Show the boundary
+                    this->displayBoundaries(currentPawn, 1.0f - fabs(this->maxDistance_ - distance) / this->showDistance_); // Show the boundary
                 }
                 if(distance > this->maxDistance_ && (this->reaction_ == 1) )
@@ -268,5 +263,5 @@
     }
     
-    void SpaceBoundaries::displayBoundaries(Pawn *item)
+    void SpaceBoundaries::displayBoundaries(Pawn *item, float alpha)
     {
         
@@ -276,5 +271,5 @@
         Vector3 boundaryPosition = this->getPosition() + direction * this->maxDistance_;
         
-        this->positionBillboard(boundaryPosition);
+        this->positionBillboard(boundaryPosition, alpha);
     }
     
Index: code/branches/presentation/src/modules/objects/SpaceBoundaries.h
===================================================================
--- code/branches/presentation/src/modules/objects/SpaceBoundaries.h	(revision 8659)
+++ code/branches/presentation/src/modules/objects/SpaceBoundaries.h	(revision 8660)
@@ -100,10 +100,10 @@
 
         private:
-            struct billboardAdministration{ bool usedYet; Billboard* billy; };
+            struct BillboardAdministration{ bool usedYet; Billboard* billy; };
             
             // Variabeln::
             std::list<WeakPtr<Pawn> > pawnsIn_; //!< List of the pawns that this instance of SpaceBoundaries has to handle.
             
-            std::vector<billboardAdministration> billboards_;
+            std::vector<BillboardAdministration> billboards_;
         
             int reaction_; //!< Values: 0, 1, 2.
@@ -122,5 +122,5 @@
             float computeDistance(WorldEntity *item); //!< Compute distance to center point.
             void displayWarning(const std::string warnText); //!< TODO: Implement.
-            void displayBoundaries(Pawn *item);
+            void displayBoundaries(Pawn *item, float alpha);
             void conditionalBounceBack(Pawn *item, float currentDistance, float dt);
             void bounceBack(Pawn *item, Vector3 *normal, Vector3 *velocity);
@@ -129,5 +129,5 @@
             void checkWhoIsIn(); //!< Update the list 'pawnsIn_'.
             
-            void positionBillboard(const Vector3 position); //!< Display a Billboard at the position 'position'.
+            void positionBillboard(const Vector3& position, float alpha); //!< Display a Billboard at the position 'position'.
             void setBillboardOptions(Billboard *billy);
             void removeAllBillboards(); //!< Hide all elements of '*billboard_' and set their attribute 'usedYet' to 0.
