Changeset 2087 for code/trunk/src/orxonox/tools/ParticleInterface.h
- Timestamp:
- Nov 1, 2008, 7:04:09 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/tools/ParticleInterface.h
r1563 r2087 21 21 * 22 22 * Author: 23 * ...23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 25 * ... … … 45 45 namespace orxonox 46 46 { 47 class _OrxonoxExport ParticleInterface : public OrxonoxClass48 {49 public:50 ParticleInterface(const std::string& templateName, LODParticle::LOD detaillevel);51 ~ParticleInterface();47 class _OrxonoxExport ParticleInterface : public OrxonoxClass 48 { 49 public: 50 ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel); 51 virtual ~ParticleInterface(); 52 52 53 inline Ogre::ParticleSystem* getParticleSystem() const54 { return this->particleSystem_; }53 inline Ogre::ParticleSystem* getParticleSystem() const 54 { return this->particleSystem_; } 55 55 56 void addToSceneNode(Ogre::SceneNode* sceneNode);57 void detachFromSceneNode();56 void addToSceneNode(Ogre::SceneNode* sceneNode); 57 void detachFromSceneNode(); 58 58 59 Ogre::ParticleEmitter* createNewEmitter();60 Ogre::ParticleEmitter* getEmitter(unsigned int emitterNr) const;61 void removeEmitter(unsigned int emitterNr);62 void removeAllEmitters();63 unsigned int getNumEmitters() const;59 Ogre::ParticleEmitter* createNewEmitter(); 60 Ogre::ParticleEmitter* getEmitter(unsigned int emitterNr) const; 61 void removeEmitter(unsigned int emitterNr); 62 void removeAllEmitters(); 63 unsigned int getNumEmitters() const; 64 64 65 Ogre::ParticleAffector* addAffector(const std::string& name);66 Ogre::ParticleAffector* getAffector(unsigned int affectorNr) const;67 void removeAffector(unsigned int affectorNr);68 void removeAllAffectors();69 unsigned int getNumAffectors() const;65 Ogre::ParticleAffector* addAffector(const std::string& name); 66 Ogre::ParticleAffector* getAffector(unsigned int affectorNr) const; 67 void removeAffector(unsigned int affectorNr); 68 void removeAllAffectors(); 69 unsigned int getNumAffectors() const; 70 70 71 float getSpeedFactor() const;72 void setSpeedFactor(float factor);73 bool getKeepParticlesInLocalSpace() const;74 void setKeepParticlesInLocalSpace(bool keep);71 float getSpeedFactor() const; 72 void setSpeedFactor(float factor); 73 bool getKeepParticlesInLocalSpace() const; 74 void setKeepParticlesInLocalSpace(bool keep); 75 75 76 void setEnabled(bool enable); 77 void detailLevelChanged(unsigned int newlevel); 76 void setEnabled(bool enable); 77 inline bool isEnabled() const 78 { return this->bEnabled_; } 78 79 79 inline void storeThisAsCurrentParticleInterface() 80 { ParticleInterface::currentParticleInterface_s = this; } 81 inline static ParticleInterface* getCurrentParticleInterface() 82 { return ParticleInterface::currentParticleInterface_s; } 80 void setVisible(bool visible); 81 inline bool isVisible() const 82 { return this->bVisible_; } 83 83 84 private:85 void updateVisibility();84 void detailLevelChanged(unsigned int newlevel); 85 void setDetailLevel(unsigned int level); 86 86 87 static ParticleInterface* currentParticleInterface_s; 88 static unsigned int counter_s; 89 Ogre::SceneNode* sceneNode_; 90 Ogre::ParticleSystem* particleSystem_; 91 bool bVisible_; 92 bool bEnabled_; 93 unsigned int detaillevel_; //!< Detail level of this particle effect (0: off, 1: low, 2: normal, 3: high) 94 }; 87 inline void storeThisAsCurrentParticleInterface() 88 { ParticleInterface::currentParticleInterface_s = this; } 89 inline static ParticleInterface* getCurrentParticleInterface() 90 { return ParticleInterface::currentParticleInterface_s; } 91 92 private: 93 void updateVisibility(); 94 95 static ParticleInterface* currentParticleInterface_s; 96 static unsigned int counter_s; 97 98 Ogre::SceneNode* sceneNode_; 99 Ogre::ParticleSystem* particleSystem_; 100 bool bVisible_; 101 bool bEnabled_; 102 bool bAllowedByLOD_; 103 unsigned int detaillevel_; //!< Detail level of this particle effect (0: off, 1: low, 2: normal, 3: high) 104 Ogre::SceneManager* scenemanager_; 105 }; 95 106 } 96 107
Note: See TracChangeset
for help on using the changeset viewer.