Changeset 9500 for code/branches/shaders/src/orxonox/graphics/LensFlare.h
- Timestamp:
- Dec 10, 2012, 3:26:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders/src/orxonox/graphics/LensFlare.h
r9466 r9500 46 46 47 47 namespace orxonox 48 { 48 { 49 49 /** 50 50 @brief … … 61 61 class _OrxonoxExport LensFlare : public StaticEntity, public Tickable 62 62 { 63 /** 64 @brief 65 This is a nested Class used to easily set properties of the different sublenses of a LensFlare effect 66 */ 67 class Lens 68 { 69 public: 70 std::string* material_;//!< Which material should the Lens use, current choices include burst, bursthalo, halo1, halo2, halo3 71 float alpha_;//!< Which base alpha value should the Lens use 72 float scale_;//!< Which base scale should the Lens Flare have 73 float position_;//!< This defines how far along the view direction the flare should be positioned, e.g. 0.5 would position the flare halfway between the viewer and the base burst, 0 at the camera, 1 at the burst 74 Lens(std::string* material, float alpha, float scale, float position) 75 { 76 this->material_=material; 77 this->alpha_=alpha; 78 this->scale_=scale; 79 this->position_=position; 80 } 81 }; 82 63 83 public: 64 84 LensFlare(BaseObject* creator); … … 69 89 inline float getScale() const 70 90 { return this->scale_; } 91 92 /** 93 @brief 94 This sets the base colour of the billboards 95 @param colour 96 Vector3 containing r,g,b values 97 */ 98 inline void setColour(const ColourValue& colour) 99 { 100 this->colour_->r=colour.r; 101 this->colour_->g=colour.g; 102 this->colour_->b=colour.b; 103 } 104 /** 105 @brief 106 This returns the current base colour of the billboards 107 @return a Vector3 containing r,g,b values 108 */ 109 inline const ColourValue& getColour() const 110 { return *(new ColourValue(this->colour_->r,this->colour_->g,this->colour_->b)); } 71 111 72 112 /** … … 141 181 unsigned int getPointCount(float dimension) const; 142 182 183 std::vector<Lens*>* lensConfiguration_;//!< this stores the lensConfiguration 143 184 Billboard* occlusionBillboard_;//!< this is a transparent billboard used solely for the Hardware Occlusion Query 144 185 float cameraDistance_;//!< current distance of the lensflare center from the camera … … 147 188 unsigned int fadeResolution_;//!< how many points should be sampled per axis for the screen border fade. High number => smooth fade, but uses more processing power 148 189 float fadeExponent_;//!< this determines how fast the flare fades away as it gets obstructed 149 //TODO: add XML port for colour manipulation150 190 ColourValue* colour_;//!< this stores the base colour of the light 151 191 };
Note: See TracChangeset
for help on using the changeset viewer.