Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2013, 2:06:55 PM (10 years ago)
Author:
wroennin
Message:

Math: New function to determine the ZOrder of the radarobjects; HUDTemplates: cleenup

File:
1 edited

Legend:

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

    r9852 r9877  
    193193        {
    194194                this->setBackgroundMaterial(material3D_);
    195                 this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 10);
    196                 this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 10);
     195                this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 250); // it seems that the ZOrder of overlayelements is 100 times the ZOrder of the overlay
     196                this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 250); // 250 a little bit buffer so that the two shels are displayed all in the front / in the back
    197197                this->map3DFront_->show();
    198198                this->map3DBack_->show();
     
    235235                bool overXZPlain = isObjectHigherThanShipOnMap(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), this->mapAngle_);
    236236
    237                 if(overXZPlain == false && (it->second->getZOrder() >  100 * this->overlay_->getZOrder())) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
    238                         it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 1);
    239                 if(overXZPlain == true && (it->second->getZOrder() <= 100 * this->overlay_->getZOrder()))
    240                         it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 1);
     237                if(overXZPlain == false /*&& (it->second->getZOrder() >  100 * this->overlay_->getZOrder())*/) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
     238                        it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_));
     239                if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/)
     240                        it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_));
    241241            }
    242242            else
Note: See TracChangeset for help on using the changeset viewer.