Changeset 11079 for code/branches/shaders_merge
- Timestamp:
- Jan 19, 2016, 11:05:02 PM (9 years ago)
- Location:
- code/branches/shaders_merge/src/orxonox/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders_merge/src/orxonox/graphics/LensFlare.cc
r11078 r11079 106 106 lensPart->setVisible(true); 107 107 this->attach(lensPart); 108 this->billboards_.push_back(lensPart); 108 109 } 109 110 } … … 125 126 126 127 int i = 0; 127 for (WorldEntity* attachedObject : this->getAttachedObjects()) 128 { 129 Billboard* billboard = orxonox_cast<Billboard*>(attachedObject); 130 if (billboard == this->occlusionBillboard_) 131 continue; 128 for (Billboard* billboard : this->billboards_) 129 { 132 130 const LensFlare::Lens& lens = lensConfiguration_.at(i); 133 131 billboard->setPosition(-viewDirection * (1.0f - lens.position_)); … … 149 147 150 148 int i = 0; 151 for (WorldEntity* attachedObject : this->getAttachedObjects()) 152 { 153 Billboard* billboard = orxonox_cast<Billboard*>(attachedObject); 154 if (billboard == this->occlusionBillboard_) 155 continue; 149 for (Billboard* billboard : this->billboards_) 150 { 156 151 cur.a = alpha * lensConfiguration_.at(i).alpha_; 157 152 billboard->setColour(cur); -
code/branches/shaders_merge/src/orxonox/graphics/LensFlare.h
r11078 r11079 178 178 std::vector<Lens> lensConfiguration_;//!< this stores the lensConfiguration 179 179 Billboard* occlusionBillboard_;//!< this is a transparent billboard used solely for the Hardware Occlusion Query 180 std::vector<Billboard*> billboards_; //!< The visible billboards 181 180 182 float scale_;//!< this factor is used to scale the billboard to the desired size 181 183 bool fadeOnViewBorder_;//!< should the effect fade out on the border of the view?
Note: See TracChangeset
for help on using the changeset viewer.