Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 670 was 659, checked in by nicolasc, 17 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
RevLine 
[535]1#ifndef MODULE_ParticleInterface_H
2#define MODULE_ParticleInterface_H
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
13
14namespace particle
15{
16
17class ParticleInterface
18{
19 public:
20
[659]21  ParticleInterface( Ogre::SceneManager *sceneManager, Ogre::String name, Ogre::String templateName );
22  ~ParticleInterface( void );
[658]23
24  void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
25  void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
26
[659]27  Ogre::ParticleEmitter* getEmitter ( int emitterNr );
28  void newEmitter ( void );
[658]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(); };
[659]34  void setDirection ( Ogre::Vector3 direction );
[658]35
[659]36  inline Ogre::Real getVelocity() {return velocity_; };
37  void setVelocity( Ogre::Real v );
[658]38
[659]39  inline int getRate() { return rate_; };
40  void setRate( int r );
[658]41
[659]42  inline Ogre::Real getDistance() { return distance_; };
43  void setDistance( Ogre::Real d );
[658]44
[659]45  inline Ogre::ColourValue getColour( void ) {return colour_;};
46  void setColour( Ogre::ColourValue colour );
[658]47
[659]48  void switchEnable();
[535]49
[659]50  inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
[621]51
[535]52 private:
[659]53  Ogre::SceneNode *sceneNode_;
54  Ogre::SceneManager *sceneManager_;
[621]55  Ogre::ParticleSystem *particleSystem_;
[659]56  Ogre::Real distance_;
57  Ogre::Real velocity_;
58  int rate_;
59  Ogre::ColourValue colour_;
60  int numberOfEmitters_;
[535]61
[659]62  void standardizeEmitters();
[535]63};
64
65}
66#endif
Note: See TracBrowser for help on using the repository browser.