Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/particle/ParticleInterface.h @ 715

Last change on this file since 715 was 715, checked in by rgrieder, 16 years ago
  • the master has spoken…
  • misc/String.h is not anymore..
File size: 2.1 KB
Line 
1#ifndef _ParticleInterface_H__
2#define _ParticleInterface_H__
3
4#include <string>
5
6// #include "ParticleInterface.h"
7// #include <Ogre.h>
8// #include <OIS/OIS.h>
9// #include <CEGUI/CEGUI.h>
10// #include <CEGUIRenderer.h>
11#include <OgreParticleSystem.h>
12#include <OgreParticleEmitter.h>
13#include <OgreSceneManager.h>
14
15#include "../OrxonoxPrereqs.h"
16
17#include "misc/Vector3.h"
18#include "misc/ColourValue.h"
19
20
21namespace orxonox
22{
23
24  class ParticleInterface
25  {
26  public:
27
28    ParticleInterface( Ogre::SceneManager *sceneManager, std::string name, std::string templateName );
29    ~ParticleInterface( void );
30
31    void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
32    void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
33
34    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
35    void newEmitter ( void );
36
37    Vector3 getPositionOfEmitter ( int emitterNr );
38    inline void setPositionOfEmitter ( int emitterNr, Vector3 position ) { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
39
40    inline Vector3 getDirection ( void ) { return particleSystem_->getEmitter(0)->getDirection(); };
41    void setDirection ( Vector3 direction );
42
43    inline Real getVelocity() {return velocity_; };
44    void setVelocity( Real v );
45
46    inline int getRate() { return rate_; };
47    void setRate( int r );
48
49    inline Real getDistance() { return distance_; };
50    void setDistance( Real d );
51
52    inline ColourValue getColour( void ) {return colour_;};
53    void setColour( ColourValue colour );
54
55    void switchEnable();
56
57    inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
58
59  private:
60    Ogre::SceneNode *sceneNode_;
61    Ogre::SceneManager *sceneManager_;
62    Ogre::ParticleSystem *particleSystem_;
63    Real distance_;
64    Real velocity_;
65    int rate_;
66    ColourValue colour_;
67    int numberOfEmitters_;
68
69    void standardizeEmitters();
70  };
71
72}
73
74#endif /* _ParticleInterface_H__ */
Note: See TracBrowser for help on using the repository browser.