[Orxonox-commit 1119] r5840 - in code/branches/tutorial/src/orxonox: pickup worldentities

dafrick at orxonox.net dafrick at orxonox.net
Wed Sep 30 12:56:59 CEST 2009


Author: dafrick
Date: 2009-09-30 12:56:59 +0200 (Wed, 30 Sep 2009)
New Revision: 5840

Modified:
   code/branches/tutorial/src/orxonox/pickup/BaseItem.h
   code/branches/tutorial/src/orxonox/worldentities/Drone.h
Log:
And the last bunch of comments.

Modified: code/branches/tutorial/src/orxonox/pickup/BaseItem.h
===================================================================
--- code/branches/tutorial/src/orxonox/pickup/BaseItem.h	2009-09-30 10:42:28 UTC (rev 5839)
+++ code/branches/tutorial/src/orxonox/pickup/BaseItem.h	2009-09-30 10:56:59 UTC (rev 5840)
@@ -43,12 +43,12 @@
 namespace orxonox
 {
     /**
-        @brief
-            Base class for all items/pickups.
+    @brief
+        Base class for all items/pickups.
 
-            Provides common methods to be used in derived classes.
-        @author
-            Daniel 'Huty' Haggenmueller
+        Provides common methods to be used in derived classes.
+    @author
+        Daniel 'Huty' Haggenmueller
     */
     class _OrxonoxExport BaseItem : public BaseObject
     {
@@ -60,8 +60,8 @@
         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< XMLPort
 
         /**
-            @brief Checks how many instances of this item can be carried at a time.
-            @return How many of this item can be carried.
+        @brief Checks how many instances of this item can be carried at a time.
+        @return How many of this item can be carried.
         */
         virtual int getMaxCarryAmount() const
             { return 1; }
@@ -69,14 +69,14 @@
         bool addTo(Pawn* pawn);             //!< Add the item to a pawn.
         bool removeFrom(Pawn* pawn);        //!< Removes the item from a pawn.
         /**
-            @brief
-                Method invoked when the item gets picked up.
+        @brief
+            Method invoked when the item gets picked up.
 
-                Has to be overridden for an item to work,
-                should contain a call to addTo().
+            Has to be overridden for an item to work,
+            should contain a call to addTo().
 
-            @param pawn Pawn who picks up the item.
-            @return Returns whether the pawn was able to pick up the item.
+        @param pawn Pawn who picks up the item.
+        @return Returns whether the pawn was able to pick up the item.
         */
         virtual bool pickedUp(Pawn* pawn)
             { return false; }

Modified: code/branches/tutorial/src/orxonox/worldentities/Drone.h
===================================================================
--- code/branches/tutorial/src/orxonox/worldentities/Drone.h	2009-09-30 10:42:28 UTC (rev 5839)
+++ code/branches/tutorial/src/orxonox/worldentities/Drone.h	2009-09-30 10:56:59 UTC (rev 5840)
@@ -99,13 +99,27 @@
             inline void rotateRoll(float value)
             { this->rotateRoll(Vector2(value, 0)); }
             
-            void setPrimaryThrust( float thrust ){ this->primaryThrust_=thrust; }
-            void setAuxilaryThrust( float thrust ){ this->auxilaryThrust_=thrust; }
-            void setRotationThrust( float thrust ){ this->rotationThrust_=thrust; }
+            /**
+            @brief Sets the primary thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setPrimaryThrust( float thrust )
+                { this->primaryThrust_=thrust; }            
+            inline void setAuxilaryThrust( float thrust )
+                { this->auxilaryThrust_=thrust; }
+            inline void setRotationThrust( float thrust )
+                { this->rotationThrust_=thrust; }
             
-            float getPrimaryThrust(){ return this->primaryThrust_; }
-            float getAuxilaryThrust(){ return this->auxilaryThrust_; }
-            float getRotationThrust(){ return this->rotationThrust_; }
+            /**
+            @brief Gets the primary thrust to the input amount.
+            @preturn The amount of thrust.
+            */
+            inline float getPrimaryThrust()
+                { return this->primaryThrust_; }
+            inline float getAuxilaryThrust()
+                { return this->auxilaryThrust_; }
+            inline float getRotationThrust()
+                { return this->rotationThrust_; }
             
         private:
             DroneController *myController_; //!< The controller of the Drone.




More information about the Orxonox-commit mailing list