Changeset 2662 for code/trunk/src/orxonox/objects/worldentities/Backlight.h
- Timestamp:
- Feb 14, 2009, 10:17:35 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/worldentities/Backlight.h
- Property svn:mergeinfo changed
r2261 r2662 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "PositionableEntity.h" 35 #include "tools/BillboardSet.h" 33 #include "FadingBillboard.h" 34 #include "gamestates/GSRoot.h" 36 35 37 36 namespace orxonox 38 37 { 39 class _OrxonoxExport Backlight : public PositionableEntity38 class _OrxonoxExport Backlight : public FadingBillboard, public TimeFactorListener 40 39 { 41 40 public: 42 Backlight( float maxspeed = 1.0, float brakingtime = 1.0, float scale = 1.0);41 Backlight(BaseObject* creator); 43 42 virtual ~Backlight(); 44 43 45 void setConfigValues();46 44 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 45 void registerVariables(); 46 47 47 virtual void tick(float dt); 48 48 virtual void changedVisibility(); 49 virtual bool create();50 49 51 void setColour(const ColourValue& colour); 52 void setTimeFactor(float factor); 50 inline void setWidth(float width) 51 { this->width_ = width; this->update_width(); } 52 inline float getWidth() const 53 { return this->width_; } 54 55 inline void setLifetime(float lifetime) 56 { this->lifetime_ = lifetime; this->update_lifetime(); } 57 inline float getLifetime() const 58 { return this->lifetime_; } 59 60 inline void setLength(float length) 61 { this->length_ = length; this->update_length(); } 62 inline float getLength() const 63 { return this->length_; } 64 65 inline void setMaxElements(size_t maxelements) 66 { this->maxelements_ = maxelements; this->update_maxelements(); } 67 inline size_t getMaxElements() const 68 { return this->maxelements_; } 69 70 inline void setTrailMaterial(const std::string& material) 71 { this->trailmaterial_ = material; this->update_trailmaterial(); } 72 inline const std::string& getTrailMaterial() const 73 { return this->trailmaterial_; } 74 75 virtual void changedScale(); 76 77 protected: 78 virtual void changedTimeFactor(float factor_new, float factor_old); 53 79 54 80 private: 55 void configure(float maxspeed, float brakingtime, float scale = 1); 56 void updateColourChange(); 81 virtual void startturnonoff(); 82 virtual void stopturnonoff(); 83 virtual void poststopturnonoff(); 84 virtual void changedColour(); 85 void update_width(); 86 void update_lifetime(); 87 void update_length(); 88 void update_maxelements(); 89 void update_trailmaterial(); 57 90 58 static float timeFactor_s; 59 BillboardSet billboard_; 91 Ogre::RibbonTrail* ribbonTrail_; 60 92 Ogre::SceneNode* ribbonTrailNode_; 61 Ogre::RibbonTrail* ribbonTrail_;62 63 float maxLifeTime_;64 float trailSegmentLength_;65 93 float width_; 66 67 float brakefactor_; 68 69 float maxTraillength_; 70 float traillength_; 71 72 size_t maxTrailsegments_; 94 float length_; 95 float lifetime_; 96 size_t maxelements_; 97 std::string trailmaterial_; 98 char tickcount_; 73 99 }; 74 100 }
Note: See TracChangeset
for help on using the changeset viewer.