- Timestamp:
- Nov 12, 2008, 2:24:10 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.h
r2171 r2182 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "PositionableEntity.h" 35 #include "tools/BillboardSet.h" 33 #include "Billboard.h" 34 #include "objects/Tickable.h" 36 35 37 36 namespace orxonox 38 37 { 39 class _OrxonoxExport Backlight : public PositionableEntity38 class _OrxonoxExport Backlight : public Billboard, public Tickable 40 39 { 40 public: 41 Backlight(BaseObject* creator); 42 virtual ~Backlight(); 43 44 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 45 void registerVariables(); 46 47 virtual void tick(float dt); 48 virtual void changedActivity(); 49 virtual void changedVisibility(); 50 51 inline void setWidth(float width) 52 { this->width_ = width; this->update_width(); } 53 inline float getWidth() const 54 { return this->width_; } 55 56 inline void setLifetime(float lifetime) 57 { this->lifetime_ = lifetime; this->update_lifetime(); } 58 inline float getLifetime() const 59 { return this->lifetime_; } 60 61 inline void setLength(float length) 62 { this->length_ = length; this->update_length(); } 63 inline float getLength() const 64 { return this->length_; } 65 66 inline void setMaxElements(size_t maxelements) 67 { this->maxelements_ = maxelements; this->update_maxelements(); } 68 inline size_t getMaxElements() const 69 { return this->maxelements_; } 70 71 inline void setTrailMaterial(const std::string& material) 72 { this->trailmaterial_ = material; this->update_trailmaterial(); } 73 inline const std::string& getTrailMaterial() const 74 { return this->trailmaterial_; } 75 76 protected: 77 virtual void notifyAttached(); 78 79 private: 80 virtual void changedColour(); 81 void update_width(); 82 void update_lifetime(); 83 void update_length(); 84 void update_maxelements(); 85 void update_trailmaterial(); 86 87 Ogre::RibbonTrail* ribbonTrail_; 88 Ogre::SceneNode* ribbonTrailNode_; 89 float width_; 90 float length_; 91 float lifetime_; 92 size_t maxelements_; 93 std::string trailmaterial_; 94 }; 95 96 97 /* 41 98 public: 42 99 Backlight(float maxspeed = 1.0, float brakingtime = 1.0, float scale = 1.0); … … 49 106 virtual bool create(); 50 107 51 void setColour(const ColourValue& colour); 108 52 109 void setTimeFactor(float factor); 53 110 … … 60 117 Ogre::SceneNode* ribbonTrailNode_; 61 118 Ogre::RibbonTrail* ribbonTrail_; 119 62 120 63 121 float maxLifeTime_; … … 72 130 size_t maxTrailsegments_; 73 131 }; 132 */ 74 133 } 75 134
Note: See TracChangeset
for help on using the changeset viewer.