Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 659 was 659, checked in by nicolasc, 16 years ago
  • a lot of inlining of getfunctions
  • set libaudio to shared (not sure, if related: audioplayer + ingame sound == crash!)
  • minor space cleanups
File size: 2.0 KB
Line 
1#ifndef MODULE_ParticleInterface_H
2#define MODULE_ParticleInterface_H
3
4// #include "ParticleInterface.h"
5// #include <Ogre.h>
6// #include <OIS/OIS.h>
7// #include <CEGUI/CEGUI.h>
8// #include <CEGUIRenderer.h>
9#include <OgreParticleSystem.h>
10#include <OgreParticleEmitter.h>
11#include <OgreSceneManager.h>
12
13
14namespace particle
15{
16
17class ParticleInterface
18{
19 public:
20
21  ParticleInterface( Ogre::SceneManager *sceneManager, Ogre::String name, Ogre::String templateName );
22  ~ParticleInterface( void );
23
24  void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
25  void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
26
27  Ogre::ParticleEmitter* getEmitter ( int emitterNr );
28  void newEmitter ( void );
29
30  Ogre::Vector3 getPositionOfEmitter ( int emitterNr );
31  inline void setPositionOfEmitter ( int emitterNr, Ogre::Vector3 position ) { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
32
33  inline Ogre::Vector3 getDirection ( void ) { return particleSystem_->getEmitter(0)->getDirection(); };
34  void setDirection ( Ogre::Vector3 direction );
35
36  inline Ogre::Real getVelocity() {return velocity_; };
37  void setVelocity( Ogre::Real v );
38
39  inline int getRate() { return rate_; };
40  void setRate( int r );
41
42  inline Ogre::Real getDistance() { return distance_; };
43  void setDistance( Ogre::Real d );
44
45  inline Ogre::ColourValue getColour( void ) {return colour_;};
46  void setColour( Ogre::ColourValue colour );
47
48  void switchEnable();
49
50  inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
51
52 private:
53  Ogre::SceneNode *sceneNode_;
54  Ogre::SceneManager *sceneManager_;
55  Ogre::ParticleSystem *particleSystem_;
56  Ogre::Real distance_;
57  Ogre::Real velocity_;
58  int rate_;
59  Ogre::ColourValue colour_;
60  int numberOfEmitters_;
61
62  void standardizeEmitters();
63};
64
65}
66#endif
Note: See TracBrowser for help on using the repository browser.