[Orxonox-commit 5777] r10437 - in code/trunk/src: modules/jump orxonox/worldentities orxonox/worldentities/pawns

fvultier at orxonox.net fvultier at orxonox.net
Fri May 8 00:17:04 CEST 2015


Author: fvultier
Date: 2015-05-08 00:17:03 +0200 (Fri, 08 May 2015)
New Revision: 10437

Modified:
   code/trunk/src/modules/jump/JumpScore.cc
   code/trunk/src/orxonox/worldentities/ControllableEntity.h
   code/trunk/src/orxonox/worldentities/MobileEntity.h
   code/trunk/src/orxonox/worldentities/StaticEntity.h
   code/trunk/src/orxonox/worldentities/pawns/Pawn.h
   code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
Log:
Removed unnecessary output to console in kump minigame. Added a small description to some classes often used by PPS students: Pawn, StaticEntity, MobileEntity, ControllableEntity.

Modified: code/trunk/src/modules/jump/JumpScore.cc
===================================================================
--- code/trunk/src/modules/jump/JumpScore.cc	2015-05-07 20:45:20 UTC (rev 10436)
+++ code/trunk/src/modules/jump/JumpScore.cc	2015-05-07 22:17:03 UTC (rev 10437)
@@ -90,7 +90,6 @@
                     else if (showFuel_ == true)
                     {
                         float fuel = owner_->getFuel();
-                        orxout() <<  fuel << endl;
                         std::string str;
 
                         if (fuel <= 0.0)

Modified: code/trunk/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/ControllableEntity.h	2015-05-07 20:45:20 UTC (rev 10436)
+++ code/trunk/src/orxonox/worldentities/ControllableEntity.h	2015-05-07 22:17:03 UTC (rev 10437)
@@ -38,6 +38,13 @@
 
 namespace orxonox
 {
+    /**
+    @brief
+        The ControllableEntity is derived from the @ref orxonox::MobileEntity. ControllableEntities can be controlled by @ref orxonox::Controller Controllers.
+        A Controller will call (based on user input, AI decision, ...) for example the function @see moveFrontBack or the function @see rotateYaw to
+        move the ControllableEntity through space. A Controller could also call the @see boost function to tell the ControllableEntity that he wants it to boost.
+    */
+
     class _OrxonoxExport ControllableEntity : public MobileEntity
     {
         friend class PlayerInfo; // PlayerInfo uses setPlayer and removePlayer

Modified: code/trunk/src/orxonox/worldentities/MobileEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/MobileEntity.h	2015-05-07 20:45:20 UTC (rev 10436)
+++ code/trunk/src/orxonox/worldentities/MobileEntity.h	2015-05-07 22:17:03 UTC (rev 10437)
@@ -37,6 +37,17 @@
 
 namespace orxonox
 {
+    /**
+    @brief
+        The MobileEntity is a derived class from @ref orxonox::WorldEntity and @ref orxonox::Tickable. It is supposed to be the base class of 
+        @ref orxonox::MovableEntity and @ref orxonox::ControllableEntity. You will never need to instanciate a MobileEntity directly.
+        Use only its derivatives.
+        In addition to the functionalities of the @ref orxonox::WorldEntity this class has a linear and angular velocity and a linear and angular acceleration.
+        Every time the @see tick function is called the linear acceleration is multiplied by the time since the last call of tick and then added to the
+        linear velocity. Then the linear velocity is multiplied by the time since the last call of tick and then added to the position. The same happens with
+        the angular acceleration and velocity. With this procedure MobileEntities can change their position and orientation with time.
+    */
+
     class _OrxonoxExport MobileEntity : public WorldEntity, public Tickable
     {
         public:

Modified: code/trunk/src/orxonox/worldentities/StaticEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/StaticEntity.h	2015-05-07 20:45:20 UTC (rev 10436)
+++ code/trunk/src/orxonox/worldentities/StaticEntity.h	2015-05-07 22:17:03 UTC (rev 10437)
@@ -35,6 +35,16 @@
 
 namespace orxonox
 {
+    /**
+    @brief
+        The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have
+        a position in space, a mass, a scale, a frication, ... because every StaticEntity is a WorldEntity. You can attach StaticEntities to eachother ike @ref orxonox::WorldEntity WorldEntities.
+
+        In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
+        it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
+        function @see setPosition to changee it.
+    */
+
     class _OrxonoxExport StaticEntity : public WorldEntity
     {
         public:

Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h	2015-05-07 20:45:20 UTC (rev 10436)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h	2015-05-07 22:17:03 UTC (rev 10437)
@@ -38,7 +38,19 @@
 
 
 namespace orxonox // tolua_export
-{ // tolua_export
+{
+    /**
+    @brief
+        Everything in Orxonoy that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
+        its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at
+        or below zero. If it is, the pawn gets killed.
+
+        Pawns can carry pickups and fire weapons. The can also have shields.
+
+        Notice that every Pawn is a ControllableEntity.
+    */
+
+    // tolua_export
     class _OrxonoxExport Pawn // tolua_export
         : public ControllableEntity, public RadarViewable, public PickupCarrier
     { // tolua_export

Modified: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	2015-05-07 20:45:20 UTC (rev 10436)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	2015-05-07 22:17:03 UTC (rev 10437)
@@ -46,6 +46,7 @@
     /**
     @brief
         The SpaceShip is the principal entity through which the player interacts with the game. Its main function is to fly, however many things, such as @ref orxonox::Engine Engines or @ref orxonox::Weapon Weapons, can be attached to it.
+        The feature that you can add @ref orxonox::Engine Engines is new in this class. However adding @ref orxonox::Weapon Weapons is possible because every Spaceship is a Pawn (due to inheritance) and every Pawn can carry @ref orxonox::Weapon Weapons.
 
         There are several parameters that define the behavior of the SpaceShip>
         - The <b>rotationThrust</b>, specifies the force with which the SpaceShip rotates.




More information about the Orxonox-commit mailing list