Changeset 9792 for code/branches/radarDreiD/src/modules
- Timestamp:
- Nov 18, 2013, 4:22:09 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc
r9787 r9792 166 166 // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda) 167 167 float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale(); 168 169 168 170 it->second->setDimensions(size, size); 169 171 … … 171 173 //Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition()); 172 174 Vector2 coord = get3DProjection(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), 0.6435011, detectionLimit_); 173 if(coord.y < 0) 174 { 175 orxonox::ColourValue color = it->second->getColour(); 176 color.a = 0.5f; 177 it->second->setColour(color); 178 } 175 176 // set zOrder on screen 177 bool overXZPlain = isObjectHigherThanShipOnMap(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), 0.6435011); 178 179 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 180 it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 1); 181 if(overXZPlain == true && (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())) 182 it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 1); 183 184 179 185 180 186 coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
Note: See TracChangeset
for help on using the changeset viewer.