[Orxonox-commit 6923] r11544 - in code/branches/CampaignMap_HS17: data/levels data/overlays src/modules/overlays/hud

fanconic at orxonox.net fanconic at orxonox.net
Mon Nov 6 16:35:07 CET 2017


Author: fanconic
Date: 2017-11-06 16:35:06 +0100 (Mon, 06 Nov 2017)
New Revision: 11544

Added:
   code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel
   code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw
Modified:
   code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw
   code/branches/CampaignMap_HS17/data/overlays/StoryModeHUD2.oxo
   code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc
   code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.h
Log:
Story Mode Hud was edited, and a level file was added

Added: code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel
===================================================================
Added: code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw
===================================================================
--- code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw	                        (rev 0)
+++ code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw	2017-11-06 15:35:06 UTC (rev 11544)
@@ -0,0 +1,78 @@
+<LevelInfo
+ name = "Nikola's StoryMode"
+ description = "A level in which the Campaign Menu is defined, which opens other levels."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("StoryModeHUD2.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/StoryMode.oxt")
+
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/endurancetest_template.oxt")
+?>
+
+<Level>
+
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+  <SpawnPoint position="000.000, 000.000, 1000.000" orientation="0, 0, 0, -1" pawndesign= StoryMode />
+    
+
+  <StaticEntity position="0,0,0" direction="0,0,0" >
+  <attached>
+
+    <Model position="600,370,0" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="600,370,-80"  material="Flares/lensflare" scale=4.5 />
+  
+    <Model position="100,350,-250" mesh="planets/moon.mesh" scale=100  />
+    <Billboard colour="1,1,0.05" position="100,350,-330"  material="Flares/lensflare" scale=4.5 />
+
+    <Model position="-600,250,-500" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="-600,250,-580"  material="Flares/lensflare" scale=5 />
+
+    <Model position="-1000,50,-750" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="-1000,50,-830"  material="Flares/lensflare" scale=5 />
+
+    <Model position="-900,-400,-1000" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="-900,-400,-1080"  material="Flares/lensflare" scale=5 />
+
+    <Model position="-500,-700,-1250" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="-500,-700,-1330"  material="Flares/lensflare" scale=5 />
+
+    <Model position="0,-900,-1500" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="0,-900,-1580" material="Flares/lensflare" scale=5 />
+
+    <Model position="700,-1100,-1750" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="700,-1100,-1830"  material="Flares/lensflare" scale=5 />
+
+    <Model position="1500,-1300,-2000" mesh="planets/moon.mesh" scale=100 />
+    <Billboard colour="1,1,0.05" position="1500,-1300,-2080"  material="Flares/lensflare" scale=5 />
+
+  </attached>
+</StaticEntity>
+
+<MovableEntity>
+    
+
+    <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"/>
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+</MovableEntity>
+
+    
+  </Scene>
+</Level>
+

Modified: code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw	2017-11-06 15:18:11 UTC (rev 11543)
+++ code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw	2017-11-06 15:35:06 UTC (rev 11544)
@@ -7,7 +7,7 @@
 
 <?lua
   include("stats.oxo")
-  include("StoryModeHUD2.oxo")
+  include("HUDTemplates3.oxo")
   include("templates/lodInformation.oxt")
 ?>
 
@@ -27,6 +27,10 @@
     skybox       = "Orxonox/Starbox"
   >
 
+
+  <SpawnPoint position="0,-100,0" lookat="0,0,0" roll=180 spawnclass=SpaceShip pawndesign=spaceshipassff />
+
+
   <StaticEntity position="0,0,0" direction="0,0,0" >
   <attached>
 
@@ -66,6 +70,8 @@
     <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"/>
     <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
 
+</MovableEntity>
+
     
   </Scene>
 </Level>

Modified: code/branches/CampaignMap_HS17/data/overlays/StoryModeHUD2.oxo
===================================================================
--- code/branches/CampaignMap_HS17/data/overlays/StoryModeHUD2.oxo	2017-11-06 15:18:11 UTC (rev 11543)
+++ code/branches/CampaignMap_HS17/data/overlays/StoryModeHUD2.oxo	2017-11-06 15:35:06 UTC (rev 11544)
@@ -30,6 +30,7 @@
   <OverlayGroup name = "spaceshiphud" scale = "1, 1">
     <Map />
 
+    <!--
     <HUDNavigation
      name          = "Navigation"
      correctaspect = true
@@ -38,7 +39,16 @@
      navMarkerSize = 0.00
      aimMarkerSize = 0.00
     />
+  -->
 
+    <!-- This is the storymode HUD we implemented, to give names to planet objects, rather than using the HUDnavigation-->
+    <StoryModeHUD
+     name           = "StoryMode"
+     correctaspect  = true
+     font           = "Verdana"
+     textSize       = 0.05
+    />
+
     <GUIOverlay
       name = "QuestGUI"
       guiname = "QuestGUI"

Modified: code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc	2017-11-06 15:18:11 UTC (rev 11543)
+++ code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc	2017-11-06 15:35:06 UTC (rev 11544)
@@ -19,17 +19,21 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
+ *   
+ *   This HUD is used for the implementation of the campaign map.
+ *   So far it can only be used to give names to an object planet.
+ *
  *   Author:
- *      Felix Schulthess
+ *      Nikola Bolt
  *   Co-authors:
- *      Reto Grieder
- *      Oliver Scheuss
- *      Matthias Spalinger
- *
+ *      Claudio Fanconi
  */
 
-#include "HUDNavigation.h"
 
+// Header file of this cc file
+#include "StoryModeHUD.h"
+
+// Ogre stuff
 #include <OgreCamera.h>
 #include <OgreFontManager.h>
 #include <OgreOverlayManager.h>
@@ -36,6 +40,7 @@
 #include <OgreTextAreaOverlayElement.h>
 #include <OgrePanelOverlayElement.h>
 
+// Other stuff
 #include <typeinfo>
 
 #include "util/Math.h"
@@ -56,67 +61,43 @@
 
 namespace orxonox
 {
+    RegisterClass ( StoryModeHUD );
 
-    SetConsoleCommand("HUDNavigation","selectClosest", &HUDNavigation::selectClosestTarget).addShortcut().keybindMode(KeybindMode::OnPress);
-    SetConsoleCommand("HUDNavigation","selectNext", &HUDNavigation::selectNextTarget).addShortcut().keybindMode(KeybindMode::OnPress);
-
-    static bool compareDistance(std::pair<RadarViewable*, unsigned int> a,
-            std::pair<RadarViewable*, unsigned int> b)
+    // Constructor of the StoryMode HUD
+    StoryModeHUD::StoryModeHUD(Context* context) : OrxonoxOverlay(context)
     {
-        return a.second < b.second;
-    }
-    RegisterClass ( HUDNavigation );
-
-    HUDNavigation* HUDNavigation::localHUD_s = nullptr;
-
-    HUDNavigation::HUDNavigation(Context* context) :
-        OrxonoxOverlay(context)
-    {
-        RegisterObject(HUDNavigation);
-        this->setConfigValues();
-
+        RegisterObject(StoryModeHUD);
+ 
         // Set default values
         this->setFont("Monofur");
         this->setTextSize(0.5f);
-
-        this->setDetectionLimit(10000.0f);
-        this->currentMunitionSpeed_ = 750.0f;
-
-        this->closestTarget_ = true;
-        this->nextTarget_ = false;
-        HUDNavigation::localHUD_s = this;
     }
 
-    HUDNavigation::~HUDNavigation()
+    // TODO:
+    // Destructor of the StoryMode HUD
+    StoryModeHUD::~StoryModeHUD()
     {
-        if (this->isInitialized())
-        {
-            for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end();)
-            removeObject((it++)->first);
-        }
-        this->sortedObjectList_.clear();
-    }
 
-     void HUDNavigation::setConfigValues()
-    {
-        SetConfigValue(markerLimit_, 100);
-        SetConfigValue(showDistance_, false);
     }
 
+    // Functions of the StoryMode HUD
 
-        void HUDNavigation::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    // XML Port for Level construction.
+    void StoryModeHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
-        SUPER(HUDNavigation, XMLPort, xmlelement, mode);
+        SUPER(StoryModeHUD, XMLPort, xmlelement, mode);
 
-        XMLPortParam(HUDNavigation, "font", setFont, getFont, xmlelement, mode);
-        XMLPortParam(HUDNavigation, "textSize", setTextSize, getTextSize, xmlelement, mode);
+        XMLPortParam(StoryModeHUD, "font", setFont, getFont, xmlelement, mode);
+        XMLPortParam(StoryModeHUD, "textSize", setTextSize, getTextSize, xmlelement, mode);
     }
-    void HUDNavigation::setFont(const std::string& font)
+
+    // Set the Font size of the Text.
+    void StoryModeHUD::setFont(const std::string& font)
     {
         const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName(font);
         if (fontPtr.isNull())
         {
-            orxout(internal_warning) << "HUDNavigation: Font '" << font << "' not found" << endl;
+            orxout(internal_warning) << "StoryModeHUD: Font '" << font << "' not found" << endl;
             return;
         }
         this->fontName_ = font;
@@ -126,17 +107,19 @@
                 mapEntry.second.text_->setFontName(this->fontName_);
         }
     }
-
-    const std::string& HUDNavigation::getFont() const
+   
+    // Gets the Font of the Text    
+    const std::string& StoryModeHUD::getFont() const
     {
         return this->fontName_;
     }
 
-    void HUDNavigation::setTextSize(float size)
+    // Set the size of the Text
+    void StoryModeHUD::setTextSize(float size)
     {
         if (size <= 0.0f)
         {
-            orxout(internal_warning) << "HUDNavigation: Negative font size not allowed" << endl;
+            orxout(internal_warning) << "StoryModeHUD: Negative font size not allowed" << endl;
             return;
         }
         this->textSize_ = size;
@@ -147,210 +130,62 @@
         }
     }
 
-    float HUDNavigation::getTextSize() const
+    // returns the Size of the Text
+    float StoryModeHUD::getTextSize() const
     {
         return this->textSize_;
     }
 
-    void HUDNavigation::tick(float dt)
+    // Tick: this is the most important function. It's recalled every frame and makes sure things happen on the screen.
+    void StoryModeHUD::tick(float dt)
     {
-        SUPER(HUDNavigation, tick, dt);
+        SUPER(StoryModeHUD, tick, dt);
 
+        // cam is the pointer which represents your camera
         Camera* cam = CameraManager::getInstance().getActiveCamera();
         if (cam == nullptr)
-        return;
+            return;
+
+        // camTransform is a Matrix, which converts 3D world of the game into 2D on your screen
         const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
 
-        for (std::pair<RadarViewable*, unsigned int>& pair : this->sortedObjectList_)
-        pair.second = (int)((pair.first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
 
-        this->sortedObjectList_.sort(compareDistance);
-
-        unsigned int markerCount = 0;
-        bool closeEnough = false; // only display objects that are close enough to be relevant for the player
-
-        // if the selected object doesn't exist any more or is now out of range select the closest object
-        std::map<RadarViewable*, ObjectInfo>::iterator selectedActiveObject = this->activeObjectList_.find(this->selectedTarget_);
-        if(selectedActiveObject == this->activeObjectList_.end())
-        {
-            this->closestTarget_ = true;
-        }
-        else if(this->detectionLimit_ < (this->selectedTarget_->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f)
-        {
-            this->closestTarget_ = true;
-            selectedActiveObject->second.selected_ = false;
-        }
-
-        bool nextHasToBeSelected = false;
-
-        for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt)
-        {
-
-            std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.find(listIt->first);
-            closeEnough = listIt->second < this->detectionLimit_;
-            // display radarviewables on HUD if the marker limit and max-distance is not exceeded
-            if (markerCount < this->markerLimit_ && (closeEnough || this->detectionLimit_ < 0))
-            {
-                float textLength = 0.0f;
-
-                {
                     //display name next to cursor
-                    it->second.text_->setCaption(it->first->getRadarName());
-                    textLength = it->first->getRadarName().size() * it->second.text_->getCharHeight() * 0.3f;
-                }
+                    //TODO: Planet.getName()
+                    text_->setCaption("Hello Muthafuckin' World!");
 
-
-
-
-
-
-                // Transform to screen coordinates
-                Vector3 pos = camTransform * it->first->getRVWorldPosition();
-                {
-                    // Object is in view
-
-                    // Change material only if outOfView changed
-                    if (it->second.wasOutOfView_)
-                    {
-                        //it->second.panel_->setMaterialName("Orxonox/NavTDC");
-                        it->second.panel_->setMaterialName(TextureGenerator::getMaterialName("tdc.png", it->first->getRadarObjectColour()));
-                        it->second.panel_->setDimensions(this->navMarkerSize_ * this->getActualSize().x, this->navMarkerSize_ * this->getActualSize().y);
-                        it->second.target_->setDimensions(this->aimMarkerSize_ * this->getActualSize().x, this->aimMarkerSize_ * this->getActualSize().y);
-                        it->second.wasOutOfView_ = false;
-                    }
-
-                    // Position marker
-                    it->second.panel_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
-                    it->second.panel_->setLeft((pos.x + 1.0f - it->second.panel_->getWidth()) * 0.5f);
-                    it->second.panel_->setTop((-pos.y + 1.0f - it->second.panel_->getHeight()) * 0.5f);
-
+                    // Transform to screen coordinates
+                    Vector3 pos = camTransform *  planet->getRVWorldPosition();
+       
                     // Position text
-                    it->second.text_->setLeft((pos.x + 1.0f + it->second.panel_->getWidth()) * 0.5f);
+                    text_->setLeft((pos.x + 1.0f + it->second.panel_->getWidth()) * 0.5f);
                     it->second.text_->setTop((-pos.y + 1.0f + it->second.panel_->getHeight()) * 0.5f);
 
                     // Make sure the overlays are shown
-                    it->second.panel_->show();
                     it->second.text_->show();
 
-                    // Target marker
-                    const Pawn* pawn = dynamic_cast<const Pawn*>(it->first->getWorldEntity());
-                    /* Pawn* humanPawn = HumanController::getLocalControllerEntityAsPawn();*/
-                    if(!it->second.selected_
-                            || it->first->getRVVelocity().squaredLength() == 0
-                            || pawn == nullptr
-                            /* TODO : improve getTeam in such a way that it works
-                             * || humanPawn == nullptr
-                             * || pawn->getTeam() == humanPawn->getTeam()*/)
-                    {
-                        // don't show marker for not selected enemies nor if the selected doesn't move
-                        it->second.target_->hide();
-                    }
-                    else // object is selected and moves
-                    {
-                        // get the aim position
-                        const Vector3& targetPos = this->toAimPosition(it->first);
-                        // Transform to screen coordinates
-                        Vector3 screenPos = camTransform * targetPos;
-                        // Check if the target marker is in view too
-                        if(screenPos.z > 1 || screenPos.x < -1.0 || screenPos.x > 1.0
-                                || screenPos.y < -1.0 || screenPos.y > 1.0)
-                        {
-                            it->second.target_->hide();
-                        }
-                        else
-                        {
-                            it->second.target_->setLeft((screenPos.x + 1.0f - it->second.target_->getWidth()) * 0.5f);
-                            it->second.target_->setTop((-screenPos.y + 1.0f - it->second.target_->getHeight()) * 0.5f);
-                            it->second.target_->show();
-                        }
-                    }
-
-                }
-            }
-        }
-
-        this->closestTarget_ = false;
-        this->nextTarget_ = false;
     }
 
-    void HUDNavigation::addObject(RadarViewable* object)
+    void StoryModeHUD::addObject()
     {
-        if (showObject(object) == false)
-        return;
-
-        if (this->activeObjectList_.size() >= this->markerLimit_)
-        if (object == nullptr)
-        return;
-
-        // Object hasn't been added yet (we know that)
-        assert(this->activeObjectList_.find(object) == this->activeObjectList_.end());
-
         // Scales used for dimensions and text size
         float xScale = this->getActualSize().x;
         float yScale = this->getActualSize().y;
 
-        // Create everything needed to display the object on the radar and add it to the map
-
-    
-        //panel->setMaterialName("Orxonox/NavTDC");
-        panel->setMaterialName(TextureGenerator::getMaterialName("tdc.png", object->getRadarObjectColour()));
-        panel->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
-        //panel->setColour(object->getRadarObjectColour());
-
         // Create text
         Ogre::TextAreaOverlayElement* text = static_cast<Ogre::TextAreaOverlayElement*>( Ogre::OverlayManager::getSingleton()
-                .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString()));
+                .createOverlayElement("TextArea", "StoryModeHUD_navText_" + getUniqueNumberString()));
         text->setFontName(this->fontName_);
         text->setCharHeight(this->textSize_ * yScale);
         text->setColour(object->getRadarObjectColour());
 
         text->hide();
-
-        ObjectInfo tempStruct =
-        {   health, healthLevel, panel, target, text, false, false, false};
-        this->activeObjectList_[object] = tempStruct;
         
         this->background_->addChild(text);
-
-        this->sortedObjectList_.push_front(std::make_pair(object, (unsigned int)0));
     }
 
-    void HUDNavigation::removeObject(RadarViewable* viewable)
+    void StoryModeHUD::removeObject(RadarViewable* viewable)
     {
-        std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.find(viewable);
-
-        if (this->activeObjectList_.find(viewable) != this->activeObjectList_.end())
-        {
-            // Detach overlays
-            this->background_->removeChild(it->second.text_->getName());
-            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.text_);
-            // Remove from the list
-            this->activeObjectList_.erase(viewable);
-        }
-
-        for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
-        {
-            if ((listIt->first) == viewable)
-            {
-                this->sortedObjectList_.erase(listIt);
-                break;
-            }
-        }
+        Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.text_);
     }
-
-    void HUDNavigation::objectChanged(RadarViewable* viewable)
-    {
-        // TODO: niceification neccessary ;)
-        removeObject(viewable);
-        addObject(viewable);
-    }
-
-    bool HUDNavigation::showObject(RadarViewable* rv)
-    {
-        if (rv == orxonox_cast<RadarViewable*>(this->getOwner()))
-        return false;
-        assert(rv->getWorldEntity());
-        if (rv->getWorldEntity()->isVisible() == false || rv->getRadarVisibility() == false)
-        return false;
-        return true;
-    }
\ No newline at end of file
+}
\ No newline at end of file

Modified: code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.h
===================================================================
--- code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.h	2017-11-06 15:18:11 UTC (rev 11543)
+++ code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.h	2017-11-06 15:35:06 UTC (rev 11544)
@@ -27,8 +27,8 @@
  *
  */
 
-#ifndef _HUDNavigation_H__
-#define _HUDNavigation_H__
+#ifndef _StoryModeHUD_H__
+#define _StoryModeHUD_H__
 
 #include "overlays/OverlaysPrereqs.h"
 
@@ -37,97 +37,23 @@
 
 #include "util/OgreForwardRefs.h"
 #include "tools/interfaces/Tickable.h"
-#include "interfaces/RadarListener.h"
 #include "overlays/OrxonoxOverlay.h"
 
 namespace orxonox
 {
-    class _OverlaysExport StoryModeHUD : public OrxonoxOverlay, public Tickable, public RadarListener
+    class _OverlaysExport StoryModeHUD : public OrxonoxOverlay, public Tickable
     {
     public:
-            HUDNavigation(Context* context);
-            virtual ~HUDNavigation();
+            StoryModeHUD(Context* context);
+            virtual ~StoryModeHUD();
 
-            void setConfigValues();
-
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
             virtual void tick(float dt) override;
 
-            // RadarListener interface
-            virtual void addObject(RadarViewable* object) override;
-            virtual void removeObject(RadarViewable* viewable) override;
-            virtual void objectChanged(RadarViewable* viewable) override;
 
-            virtual void changedOwner() override;
-            virtual void sizeChanged() override;
-            virtual void angleChanged() override { }
-            virtual void positionChanged() override { }
-            virtual void radarTick(float dt) override {}
-
-            virtual inline float getRadarSensitivity() const override
-                { return 1.0f; }
-
-            inline unsigned int getMarkerLimit() const
-                { return this->markerLimit_; }
-
-            static void selectClosestTarget();
-            static void selectNextTarget();
-
         private:
-            struct ObjectInfo
-            {
-
-
-
-                Ogre::PanelOverlayElement* health_;
-                Ogre::PanelOverlayElement* healthLevel_;
-                Ogre::PanelOverlayElement* panel_;
-                Ogre::PanelOverlayElement* target_;
-                Ogre::TextAreaOverlayElement* text_;
-                bool outOfView_;
-                bool wasOutOfView_;
-                bool selected_;
-            };
-
-            bool showObject(RadarViewable* rv);
-
-            // XMLPort accessors
-            inline void setHealthMarkerSize(float size)
-                        {
-                            this->healthMarkerSize_ = size;
-                            this->sizeChanged();
-                        }
-            inline float getHealthMarkerSize() const
-                            { return healthMarkerSize_; }
-
-            inline void setHealthLevelMarkerSize(float size)
-                                    {
-                                        this->healthLevelMarkerSize_ = size;
-                                        this->sizeChanged();
-                                    }
-                        inline float getHealthLevelMarkerSize() const
-                                        { return healthLevelMarkerSize_; }
-
-            inline void setNavMarkerSize(float size)
-            {
-                this->navMarkerSize_ = size;
-                this->sizeChanged();
-            }
-            inline float getNavMarkerSize() const
-                { return navMarkerSize_; }
-            inline void setAimMarkerSize(float size)
-            {
-                this->aimMarkerSize_ = size;
-                this->sizeChanged();
-            }
-
-            inline float getAimMarkerSize() const
-                { return aimMarkerSize_; }
-            inline void setDetectionLimit(float limit)
-                { this->detectionLimit_ = limit; }
-            inline float getDetectionLimit() const
-                { return this->detectionLimit_; }
-
+            Ogre::TextAreaOverlayElement* text_;
+     
             void setTextSize(float size);
             float getTextSize() const;
 
@@ -134,35 +60,11 @@
             void setFont(const std::string& font);
             const std::string& getFont() const;
 
-            float getArrowSizeX(int dist) const;
-            float getArrowSizeY(int dist) const;
-
-            Vector3 toAimPosition(RadarViewable* target) const;
-
-            std::map<RadarViewable*, ObjectInfo> activeObjectList_;
-            std::list<std::pair<RadarViewable*, unsigned int>> sortedObjectList_;
-
-            float healthMarkerSize_;
-            float healthLevelMarkerSize_;
-            float navMarkerSize_;
-            float aimMarkerSize_;
+    
             std::string fontName_;
             float textSize_;
-            bool showDistance_;
-
-            RadarViewable* selectedTarget_;
-
-            bool closestTarget_;
-            bool nextTarget_;
-
-            static HUDNavigation* localHUD_s; //!< This is used as a filter. Only the local HUD should be influenced by the static Console Command functions.
-
-
-            float currentMunitionSpeed_;
-
-            unsigned int markerLimit_;
-            float detectionLimit_; //!< Objects that are more far away than detectionLimit_ are not displayed on the HUD. 10000.0f is the default value.
+   
     };
 }
 
-#endif /* _HUDNavigation_H__ */
+#endif /* _StoryModeHUD_H__ */



More information about the Orxonox-commit mailing list