Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 646 was 646, checked in by landauf, 16 years ago
  • added very bad collision detection (presentation hack :D)
  • added explosions
  • fixed bug in ParticleInterface (it tried to delete SceneManager)

AND:

  • fixed one of the most amazing bugs ever! (the game crashed when I deleted an object through a timer-function. because the timer-functions is called by an iterator, the iterator indirectly delted its object. by overloading the (it++) operator, i was able to solve this problem)
File size: 1.5 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        void addToSceneNode( Ogre::SceneNode* sceneNode );
24        void detachFromSceneNode( void );
25        Ogre::ParticleEmitter* getEmitter ( int emitterNr );
26        void newEmitter ( void );
27        void setPositionOfEmitter ( int emitterNr, Ogre::Vector3 position );
28        Ogre::Vector3 getPositionOfEmitter ( int emitterNr );
29        void setDirection ( Ogre::Vector3 direction );
30        Ogre::Vector3 getDirection ( void );
31        Ogre::Real getVelocity();
32        void setVelocity( Ogre::Real v );
33        int getRate();
34        void setRate( int r );
35        Ogre::Real getDistance();
36        void setDistance( Ogre::Real d );
37        Ogre::ColourValue getColour( void );
38        void setColour( Ogre::ColourValue colour );
39        void switchEnable( void );
40
41  Ogre::ParticleSystem* getParticleSystem() {return this->particleSystem_; };
42
43 private:
44        Ogre::SceneNode *sceneNode_;
45        Ogre::SceneManager *sceneManager_;
46  Ogre::ParticleSystem *particleSystem_;
47        Ogre::Real distance_;
48        Ogre::Real velocity_;
49        int rate_;
50        Ogre::ColourValue colour_;
51        int numberOfEmitters_;
52
53        void standardizeEmitters();
54};
55
56
57}
58#endif
Note: See TracBrowser for help on using the repository browser.