Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2013, 2:58:25 PM (11 years ago)
Author:
wroennin
Message:

added variables, XMLProts for new Overlay elements for the 3D map

Location:
code/branches/radarDreiD/src/modules/overlays/hud
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc

    r9835 r9847  
    7070        this->setDetectionLimit( 10000.0f );
    7171        this->owner_ = 0;
     72
     73        this->map3DFront_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
     74                .createOverlayElement("Panel", "HUDRadar_mapDreiDFront_" + getUniqueNumberString()));
     75        this->map3DFront_->setMaterialName("Orxonox/Radar3DFront");
     76        this->overlay_->add2D(this->map3DFront_);
     77        //this->map3DFront_->_setDimensions(0.17f, 0.17f);
     78        //this->map3DFront_->_setPosition(1.0, 1.0);
     79        //this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 10);
     80        this->map3DFront_->hide();
     81
     82        this->map3DBack_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
     83                .createOverlayElement("Panel", "HUDRadar_mapDreiDBack_" + getUniqueNumberString()));
     84        this->map3DBack_->setMaterialName("Orxonox/Radar3DBack");
     85        this->overlay_->add2D(this->map3DBack_);
     86        //this->map3DBack_->_setDimensions(0.17f, 0.17f);
     87        //this->map3DBack_->_setPosition(1.0, 1.0);
     88        //this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 10);
     89        this->map3DBack_->hide();
     90
    7291    }
    7392
     
    7796        {
    7897            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->marker_);
     98            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->map3DFront_);
     99            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->map3DBack_);
     100
    79101            for (std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it = this->radarObjects_.begin();
    80102                it != this->radarObjects_.end(); ++it)
     
    100122        XMLPortParam(HUDRadar, "maximumDotSize", setMaximumDotSize, getMaximumDotSize, xmlelement, mode);
    101123        XMLPortParam(HUDRadar, "maximumDotSize3D", setMaximumDotSize3D, getMaximumDotSize3D, xmlelement, mode);
    102         XMLPortParam(HUDRadar, "Material2D", set2DMaterial, get2DMaterial, xmlelement, mode);
    103         XMLPortParam(HUDRadar, "Material3Dmiddle", set3DMaterial, get3DMaterial, xmlelement, mode);
     124        XMLPortParam(HUDRadar, "material2D", set2DMaterial, get2DMaterial, xmlelement, mode);
     125        XMLPortParam(HUDRadar, "material3DMiddle", set3DMaterial, get3DMaterial, xmlelement, mode);
     126        XMLPortParam(HUDRadar, "material3DFront", set3DMaterialFront, get3DMaterialFront, xmlelement, mode);
     127        XMLPortParam(HUDRadar, "material3DBack", set3DMaterialBack, get3DMaterialBack, xmlelement, mode);
    104128        XMLPortParam(HUDRadar, "mapAngle3D", setMapAngle, getMapAngle, xmlelement, mode);
     129
    105130
    106131
     
    174199        {
    175200                this->setBackgroundMaterial(material3D_);
    176                 //this->radar3Dback_->show();
    177                 //this
    178 
    179 
     201                this->map3DFront_->show();
     202                this->map3DBack_->show();
    180203        }
    181204        else
    182205                this->setBackgroundMaterial(material2D_);
    183 
     206                this->map3DFront_->hide();
     207                this->map3DBack_->hide();
    184208
    185209
  • code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.h

    r9835 r9847  
    7676        void set3DMaterial(std::string material3D) { this->material3D_ = material3D; }
    7777
     78        std::string get3DMaterialFront() const {return this->material3DFront_; }
     79        void set3DMaterialFront(std::string material3DFront) { this->material3DFront_ = material3DFront; }
     80
     81        std::string get3DMaterialBack() const {return this->material3DBack_; }
     82        void set3DMaterialBack(std::string material3DBack) { this->material3DBack_ = material3DBack; }
     83
    7884        float getRadarSensitivity() const { return this->sensitivity_; }
    7985        // used also by RadarListener interface!
     
    107113        float mapAngle_;
    108114
    109         std::string material2D_;
    110         std::string material3D_;
     115        std::string material2D_;                //Material name for 2D map
     116        std::string material3D_;                //Material names For the 3D minimap
     117        std::string material3DFront_;
     118        std::string material3DBack_;
     119
     120        Ogre::PanelOverlayElement* map3DFront_; //Overlayelements for the 3D minimap to be able to draw the points in a semi 3D matter
     121        Ogre::PanelOverlayElement* map3DBack_;
    111122
    112123        float sensitivity_;
Note: See TracChangeset for help on using the changeset viewer.