| [673] | 1 | #ifndef _ParticleInterface_H__ | 
|---|
 | 2 | #define _ParticleInterface_H__ | 
|---|
| [535] | 3 |  | 
|---|
| [715] | 4 | #include <string> | 
|---|
 | 5 |  | 
|---|
| [535] | 6 | // #include "ParticleInterface.h" | 
|---|
| [618] | 7 | // #include <Ogre.h> | 
|---|
 | 8 | // #include <OIS/OIS.h> | 
|---|
| [535] | 9 | // #include <CEGUI/CEGUI.h> | 
|---|
 | 10 | // #include <CEGUIRenderer.h> | 
|---|
| [618] | 11 | #include <OgreParticleSystem.h> | 
|---|
 | 12 | #include <OgreParticleEmitter.h> | 
|---|
 | 13 | #include <OgreSceneManager.h> | 
|---|
| [535] | 14 |  | 
|---|
| [708] | 15 | #include "../OrxonoxPrereqs.h" | 
|---|
| [535] | 16 |  | 
|---|
| [742] | 17 | #include "util/Math.h" | 
|---|
| [535] | 18 |  | 
|---|
| [708] | 19 |  | 
|---|
 | 20 | namespace orxonox | 
|---|
| [535] | 21 | { | 
|---|
 | 22 |  | 
|---|
| [729] | 23 |   class _OrxonoxExport ParticleInterface | 
|---|
| [708] | 24 |   { | 
|---|
 | 25 |   public: | 
|---|
| [658] | 26 |  | 
|---|
| [715] | 27 |     ParticleInterface( Ogre::SceneManager *sceneManager, std::string name, std::string templateName ); | 
|---|
| [708] | 28 |     ~ParticleInterface( void ); | 
|---|
| [658] | 29 |  | 
|---|
| [728] | 30 |     inline void addToSceneNode( Ogre::SceneNode* sceneNode ) | 
|---|
 | 31 |         { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);}; | 
|---|
 | 32 |     inline void detachFromSceneNode( void ) | 
|---|
 | 33 |         { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;}; | 
|---|
| [658] | 34 |  | 
|---|
| [708] | 35 |     Ogre::ParticleEmitter* getEmitter ( int emitterNr ); | 
|---|
 | 36 |     void newEmitter ( void ); | 
|---|
| [658] | 37 |  | 
|---|
| [708] | 38 |     Vector3 getPositionOfEmitter ( int emitterNr ); | 
|---|
| [728] | 39 |     inline void setPositionOfEmitter ( int emitterNr, Vector3 position ) | 
|---|
 | 40 |         { particleSystem_->getEmitter(emitterNr)->setPosition(position); }; | 
|---|
| [658] | 41 |  | 
|---|
| [728] | 42 |     inline Vector3 getDirection ( void ) | 
|---|
 | 43 |         { return particleSystem_->getEmitter(0)->getDirection(); }; | 
|---|
| [708] | 44 |     void setDirection ( Vector3 direction ); | 
|---|
| [658] | 45 |  | 
|---|
| [728] | 46 |     inline Real getVelocity() | 
|---|
 | 47 |         {return velocity_; }; | 
|---|
| [708] | 48 |     void setVelocity( Real v ); | 
|---|
| [658] | 49 |  | 
|---|
| [728] | 50 |     inline int getRate() | 
|---|
 | 51 |       { return rate_; }; | 
|---|
| [708] | 52 |     void setRate( int r ); | 
|---|
| [658] | 53 |  | 
|---|
| [728] | 54 |     inline Real getDistance() | 
|---|
 | 55 |         { return distance_; }; | 
|---|
| [708] | 56 |     void setDistance( Real d ); | 
|---|
| [658] | 57 |  | 
|---|
| [728] | 58 |     inline ColourValue getColour( void ) | 
|---|
 | 59 |         {return colour_;}; | 
|---|
| [708] | 60 |     void setColour( ColourValue colour ); | 
|---|
| [535] | 61 |  | 
|---|
| [708] | 62 |     void switchEnable(); | 
|---|
| [621] | 63 |  | 
|---|
| [728] | 64 |     inline Ogre::ParticleSystem* getParticleSystem() | 
|---|
 | 65 |         { return this->particleSystem_; }; | 
|---|
| [535] | 66 |  | 
|---|
| [708] | 67 |   private: | 
|---|
 | 68 |     Ogre::SceneNode *sceneNode_; | 
|---|
 | 69 |     Ogre::SceneManager *sceneManager_; | 
|---|
 | 70 |     Ogre::ParticleSystem *particleSystem_; | 
|---|
 | 71 |     Real distance_; | 
|---|
 | 72 |     Real velocity_; | 
|---|
 | 73 |     int rate_; | 
|---|
 | 74 |     ColourValue colour_; | 
|---|
 | 75 |     int numberOfEmitters_; | 
|---|
| [535] | 76 |  | 
|---|
| [708] | 77 |     void standardizeEmitters(); | 
|---|
 | 78 |   }; | 
|---|
 | 79 |  | 
|---|
| [535] | 80 | } | 
|---|
| [708] | 81 |  | 
|---|
| [673] | 82 | #endif /* _ParticleInterface_H__ */ | 
|---|