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