Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 713 was 708, checked in by rgrieder, 17 years ago
  • added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files (each of them contains #include <string> … typedef std::string String , etc.)
  • please use String from now on by including <misc/String.h"
  • removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
  • adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
  • moved usleep hack to misc/Sleep.h
  • relative include paths for files from other root directories (like misc, network, etc.) (but it stills writes "../Orxonox.h" when in folder orxonox/objects)
  • "OgreSceneManager.h" —> <OgreSceneManager.h>
  • included OrxonoxPrereqs in every file in folder orxonox
  • moved HUD and ParticleInterface to namespace orxonox
  • removed some using namespace Ogre/std when appropriate
  • I hope I haven't forgotten important points..
File size: 2.1 KB
Line 
1#ifndef _ParticleInterface_H__
2#define _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#include "../OrxonoxPrereqs.h"
14
15#include "misc/Vector3.h"
16#include "misc/String.h"
17#include "misc/ColourValue.h"
18
19
20namespace orxonox
21{
22
23  class ParticleInterface
24  {
25  public:
26
27    ParticleInterface( Ogre::SceneManager *sceneManager, String name, String templateName );
28    ~ParticleInterface( void );
29
30    void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
31    void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
32
33    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
34    void newEmitter ( void );
35
36    Vector3 getPositionOfEmitter ( int emitterNr );
37    inline void setPositionOfEmitter ( int emitterNr, Vector3 position ) { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
38
39    inline Vector3 getDirection ( void ) { return particleSystem_->getEmitter(0)->getDirection(); };
40    void setDirection ( Vector3 direction );
41
42    inline Real getVelocity() {return velocity_; };
43    void setVelocity( Real v );
44
45    inline int getRate() { return rate_; };
46    void setRate( int r );
47
48    inline Real getDistance() { return distance_; };
49    void setDistance( Real d );
50
51    inline ColourValue getColour( void ) {return colour_;};
52    void setColour( ColourValue colour );
53
54    void switchEnable();
55
56    inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
57
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_;
67
68    void standardizeEmitters();
69  };
70
71}
72
73#endif /* _ParticleInterface_H__ */
Note: See TracBrowser for help on using the repository browser.