[Orxonox-commit 3322] r8011 - in code/branches/tutorial: data/levels src/orxonox/controllers src/orxonox/worldentities

dafrick at orxonox.net dafrick at orxonox.net
Thu Mar 3 15:16:56 CET 2011


Author: dafrick
Date: 2011-03-03 15:16:55 +0100 (Thu, 03 Mar 2011)
New Revision: 8011

Added:
   code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.cc
   code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.h
   code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.cc
   code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.h
Modified:
   code/branches/tutorial/data/levels/tutorial.oxw
Log:

Adding tutorial stuff to (coding-)tutorial level.


Modified: code/branches/tutorial/data/levels/tutorial.oxw
===================================================================
--- code/branches/tutorial/data/levels/tutorial.oxw	2011-03-03 13:47:44 UTC (rev 8010)
+++ code/branches/tutorial/data/levels/tutorial.oxw	2011-03-03 14:16:55 UTC (rev 8011)
@@ -12,8 +12,8 @@
 ?>
 
 <Level
- name         = "Presentation"
- description  = "A simple testlevel"
+ name         = "Coding Tutorial"
+ description  = "Level for the coding tutorial."
 >
   <templates>
     <Template link=lodtemplate_default />
@@ -24,90 +24,15 @@
    skybox       = "Orxonox/skypanoramagen1"
   >
 
-
-
-
-<Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
-  <attached>
-    <Model scale="1" mesh="drone.mesh"/>
-  </attached>
-  <collisionShapes>
-    <BoxCollisionShape position="0,0,0"      halfExtents="10, 10, 10" />
-  </collisionShapes>
-</Drone>
-
-    <Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
-      <attached>
-        <Model scale="1" mesh="rocket.mesh"/>
-      </attached>
-      <collisionShapes>
-        <BoxCollisionShape position="0,0,0"      halfExtents="10, 10, 10" />
-      </collisionShapes>
-    </Drone>
-
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
 
-    <Model mesh="hs-w01.mesh" scale=10 position="0,0,-100" />
-    <Model mesh="hs-w01s.mesh" scale=10 position="0,0,-100" />
-
     <?lua
       for i = 1, 10, 1 do
     ?>
       <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     <?lua end ?>
+    
+    <!-- TODO: Insert drone here. -->
 
-    <GlobalShader compositor="Bloom" visible=false>
-      <events>
-        <visibility>
-          <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />
-        </visibility>
-      </events>
-    </GlobalShader>
-    <Model position="0,0,0" scale=8 mesh="ast1.mesh" />
-    <StaticEntity position="0,0,0" collisionType=static>
-      <collisionShapes>
-        <SphereCollisionShape radius="20" />
-      </collisionShapes>
-    </StaticEntity>
-
-<!--
-    <?lua
-      for i = 1, 70, 1 do
-    ?>
-      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 1000 + 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
-        <attached>
-          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
-        </attached>
-      </MovableEntity>
-      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * -1000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
-        <attached>
-          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
-        </attached>
-      </MovableEntity>
-
-      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 1000 + 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
-        <attached>
-          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
-        </attached>
-      </MovableEntity>
-      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * -1000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
-        <attached>
-          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
-        </attached>
-      </MovableEntity>
-
-      <MovableEntity position="<?lua print(math.random() * 1000 + 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
-        <attached>
-          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
-        </attached>
-      </MovableEntity>
-      <MovableEntity position="<?lua print(math.random() * -1000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
-        <attached>
-          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
-        </attached>
-      </MovableEntity>
-    <?lua end ?>
--->
-
   </Scene>
 </Level>

Added: code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.cc
===================================================================
--- code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.cc	                        (rev 0)
+++ code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.cc	2011-03-03 14:16:55 UTC (rev 8011)
@@ -0,0 +1,82 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#include "AutonomousDroneController.h"
+
+#include "worldentities/AutonomousDrone.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Constructor.
+    @param creator
+        The creator of this object.
+    */
+    AutonomousDroneController::AutonomousDroneController(BaseObject* creator) : Controller(creator)
+    {
+        //TODO: Place your code here:
+        // Make sure to register the object in the factory.
+        // Do some kind of initialisation.
+
+        // This checks that our creator really is a drone
+        // and saves the pointer to the drone for the controlling commands
+        AutonomousDrone* drone = dynamic_cast<AutonomousDrone*>(creator);
+        assert(drone != NULL);
+        this->setControllableEntity(drone);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    AutonomousDroneController::~AutonomousDroneController()
+    {
+
+    }
+
+    /**
+    @brief
+        The controlling happens here. This method defines what the controller has to do each tick.
+    @param dt
+        The duration of the tick.
+    */
+    void AutonomousDroneController::tick(float dt)
+    {
+        AutonomousDrone *myDrone = static_cast<AutonomousDrone*>(this->getControllableEntity());
+        //TODO: Place your code here:
+        // Steering commands
+        // You can use the following commands for steering
+        // - moveFrontBack, moveRightLeft, moveUpDown
+        // - rotatePitch, rotateYaw, rotateRoll
+        // Apply the to myDrone (e.g. myDrone->rotateYaw(..) )
+
+    }
+}

Added: code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.h
===================================================================
--- code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.h	                        (rev 0)
+++ code/branches/tutorial/src/orxonox/controllers/AutonomousDroneController.h	2011-03-03 14:16:55 UTC (rev 8011)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#ifndef _AutonomousDroneController_H__
+#define _AutonomousDroneController_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "Controller.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Controller for the AutonomousDrone of the PPS tutorial.
+    @author
+        Oli Scheuss
+    */
+    class _OrxonoxExport AutonomousDroneController : public Controller, public Tickable
+    {
+        public:
+            AutonomousDroneController(BaseObject* creator);
+            virtual ~AutonomousDroneController();
+
+            virtual void tick(float dt); //!< The controlling happens here. This method defines what the controller has to do each tick.
+
+        protected:
+
+        private:
+    };
+}
+
+#endif /* _AutonomousDroneController_H__ */
\ No newline at end of file

Added: code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.cc
===================================================================
--- code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.cc	                        (rev 0)
+++ code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.cc	2011-03-03 14:16:55 UTC (rev 8011)
@@ -0,0 +1,182 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#include "AutonomousDrone.h"
+
+#include "core/CoreIncludes.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+namespace orxonox
+{
+    //TODO: Put your code in here:
+    // Create the factory for the drone.
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes some default values.
+    @param creator
+        The creator of this object.
+    */
+    AutonomousDrone::AutonomousDrone(BaseObject* creator) : ControllableEntity(creator)
+    {
+        //TODO: Put your code in here:
+        // Register the drone class to the core.
+
+        this->myController_ = NULL;
+
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
+        this->primaryThrust_  = 100;
+        this->auxiliaryThrust_ = 100;
+        this->rotationThrust_ = 10;
+
+        this->setCollisionType(WorldEntity::Dynamic);
+
+        this->myController_ = new AutonomousDroneController(this); // Creates a new controller and passes our this pointer to it as creator.
+    }
+
+    /**
+    @brief
+        Destructor. Destroys controller, if present.
+    */
+    AutonomousDrone::~AutonomousDrone()
+    {
+        // Deletes the controller if the object was initialized and the pointer to the controller is not NULL.
+        if( this->isInitialized() && this->myController_ != NULL )
+            delete this->myController_;
+    }
+
+    /**
+    @brief
+        Method for creating a AutonomousDrone through XML.
+    */
+    void AutonomousDrone::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        // This calls the XMLPort function of the parent class
+        SUPER(AutonomousDrone, XMLPort, xmlelement, mode);
+
+        XMLPortParam(AutonomousDrone, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
+        //TODO: Put your code in here:
+        // Make sure you add the variables auxiliaryThrust_ and rotationThrust_ to XMLPort.
+        // Make sure that the set- and get-functions exist.
+        // Variables can be added by the following command
+        // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunction, getFunction, xmlelement, mode)
+
+    }
+
+    /**
+    @brief
+        Defines which actions the AutonomousDrone has to take in each tick.
+    @param dt
+        The length of the tick.
+    */
+    void AutonomousDrone::tick(float dt)
+    {
+        SUPER(AutonomousDrone, tick, dt);
+
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxiliaryThrust_);
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxiliaryThrust_);
+        if (this->localLinearAcceleration_.z() > 0)
+            this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxiliaryThrust_);
+        else
+            this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
+        this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+
+        this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
+        this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
+    }
+
+    /**
+    @brief
+        Moves the AutonomousDrone in the negative z-direction (Front/Back) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void AutonomousDrone::moveFrontBack(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
+    }
+
+    /**
+    @brief
+        Moves the AutonomousDrone in the x-direction (Right/Left) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void AutonomousDrone::moveRightLeft(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Moves the AutonomousDrone in the y-direction (Up/Down) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void AutonomousDrone::moveUpDown(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the AutonomousDrone around the y-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void AutonomousDrone::rotateYaw(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x);
+    }
+
+    /**
+    @brief
+        Rotates the AutonomousDrone around the x-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void AutonomousDrone::rotatePitch(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the AutonomousDrone around the z-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void AutonomousDrone::rotateRoll(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
+    }
+
+}

Added: code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.h
===================================================================
--- code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.h	                        (rev 0)
+++ code/branches/tutorial/src/orxonox/worldentities/AutonomousDrone.h	2011-03-03 14:16:55 UTC (rev 8011)
@@ -0,0 +1,133 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#ifndef _AutonomousDrone_H__
+#define _AutonomousDrone_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/XMLPort.h"
+#include "controllers/AutonomousDroneController.h"
+
+#include "ControllableEntity.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        Drone, that is made to move upon a specified pattern.
+        This class was constructed for the PPS tutorial.
+    @author
+        Oli Scheuss
+    */
+    class _OrxonoxExport AutonomousDrone : public ControllableEntity
+    {
+        public:
+            AutonomousDrone(BaseObject* creator);
+            virtual ~AutonomousDrone();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating an AutonomousDrone through XML.
+            virtual void tick(float dt); //!< Defines which actions the AutonomousDrone has to take in each tick.
+
+            virtual void moveFrontBack(const Vector2& value);
+            virtual void moveRightLeft(const Vector2& value);
+            virtual void moveUpDown(const Vector2& value);
+
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+
+            /**
+            @brief Moves the Drone in the Front/Back-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+            inline void moveFrontBack(float value)
+            { this->moveFrontBack(Vector2(value, 0)); }
+            /**
+            @brief Moves the Drone in the Right/Left-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+            inline void moveRightLeft(float value)
+            { this->moveRightLeft(Vector2(value, 0)); }
+            /**
+            @brief Moves the Drone in the Up/Down-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+            inline void moveUpDown(float value)
+            { this->moveUpDown(Vector2(value, 0)); }
+
+            /**
+            @brief Rotates the Drone around the y-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotateYaw(float value)
+            { this->rotateYaw(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Drone around the x-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotatePitch(float value)
+            { this->rotatePitch(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Drone around the z-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotateRoll(float value)
+            { this->rotateRoll(Vector2(value, 0)); }
+
+            /**
+            @brief Sets the primary thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setPrimaryThrust( float thrust )
+                { this->primaryThrust_ = thrust; }
+            //TODO: Place your set-functions here.
+            // - hint: auxiliary thrust, rotation thrust.
+
+            /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getPrimaryThrust()
+                { return this->primaryThrust_; }
+            //TODO: Place your get-functions here.
+
+        private:
+            AutonomousDroneController *myController_; //!< The controller of the AutonomousDrone.
+
+            btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the AutonomousDrone the next tick.
+            btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the AutonomousDrone the next tick.
+            float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward.
+            float auxiliaryThrust_; //!< The amount of auxiliary thrust. Used for all other movements (except for rotations).
+            float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only.s
+        
+    };
+
+}
+
+#endif // _AutonomousDrone_H__




More information about the Orxonox-commit mailing list