Changeset 9847
- Timestamp:
- Dec 2, 2013, 2:58:25 PM (11 years ago)
- Location:
- code/branches/radarDreiD
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/radarDreiD/data/overlays/HUDTemplates3.oxo
r9835 r9847 129 129 background = "Orxonox/Radar3D" 130 130 material2D = "Orxonox/Radar" 131 material3Dmiddle = "Orxonox/Radar3D" 131 material3DMiddle = "Orxonox/Radar3D" 132 material3DFront = "Orxonox/Radar3DFront" 133 material3DBack = "Orxonox/Radar3DBack" 132 134 correctaspect = true 133 135 size = "0.17, 0.17" -
code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc
r9835 r9847 70 70 this->setDetectionLimit( 10000.0f ); 71 71 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 72 91 } 73 92 … … 77 96 { 78 97 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->marker_); 98 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->map3DFront_); 99 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->map3DBack_); 100 79 101 for (std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it = this->radarObjects_.begin(); 80 102 it != this->radarObjects_.end(); ++it) … … 100 122 XMLPortParam(HUDRadar, "maximumDotSize", setMaximumDotSize, getMaximumDotSize, xmlelement, mode); 101 123 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); 104 128 XMLPortParam(HUDRadar, "mapAngle3D", setMapAngle, getMapAngle, xmlelement, mode); 129 105 130 106 131 … … 174 199 { 175 200 this->setBackgroundMaterial(material3D_); 176 //this->radar3Dback_->show(); 177 //this 178 179 201 this->map3DFront_->show(); 202 this->map3DBack_->show(); 180 203 } 181 204 else 182 205 this->setBackgroundMaterial(material2D_); 183 206 this->map3DFront_->hide(); 207 this->map3DBack_->hide(); 184 208 185 209 -
code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.h
r9835 r9847 76 76 void set3DMaterial(std::string material3D) { this->material3D_ = material3D; } 77 77 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 78 84 float getRadarSensitivity() const { return this->sensitivity_; } 79 85 // used also by RadarListener interface! … … 107 113 float mapAngle_; 108 114 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_; 111 122 112 123 float sensitivity_;
Note: See TracChangeset
for help on using the changeset viewer.