Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/particle/ParticleInterface.h @ 1117

Last change on this file since 1117 was 1056, checked in by landauf, 17 years ago

don't panic, no codechanges!
added a link to www.orxonox.net

File size: 3.1 KB
RevLine 
[1039]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
[1056]3 *                    > www.orxonox.net <
[1039]4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      ...
26 *
27 */
28
[673]29#ifndef _ParticleInterface_H__
30#define _ParticleInterface_H__
[535]31
[1039]32#include "OrxonoxPrereqs.h"
33
[715]34#include <string>
35
[535]36// #include "ParticleInterface.h"
[618]37// #include <Ogre.h>
38// #include <OIS/OIS.h>
[535]39// #include <CEGUI/CEGUI.h>
40// #include <CEGUIRenderer.h>
[618]41#include <OgreParticleSystem.h>
42#include <OgreParticleEmitter.h>
43#include <OgreSceneManager.h>
[535]44
[742]45#include "util/Math.h"
[535]46
[708]47
48namespace orxonox
[535]49{
50
[729]51  class _OrxonoxExport ParticleInterface
[708]52  {
53  public:
[658]54
[715]55    ParticleInterface( Ogre::SceneManager *sceneManager, std::string name, std::string templateName );
[708]56    ~ParticleInterface( void );
[658]57
[728]58    inline void addToSceneNode( Ogre::SceneNode* sceneNode )
59        { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
60    inline void detachFromSceneNode( void )
61        { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
[658]62
[708]63    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
64    void newEmitter ( void );
[658]65
[708]66    Vector3 getPositionOfEmitter ( int emitterNr );
[728]67    inline void setPositionOfEmitter ( int emitterNr, Vector3 position )
68        { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
[658]69
[728]70    inline Vector3 getDirection ( void )
71        { return particleSystem_->getEmitter(0)->getDirection(); };
[708]72    void setDirection ( Vector3 direction );
[658]73
[728]74    inline Real getVelocity()
75        {return velocity_; };
[708]76    void setVelocity( Real v );
[658]77
[1037]78    inline float getRate()
[728]79      { return rate_; };
[1037]80    void setRate( float r );
[658]81
[728]82    inline Real getDistance()
83        { return distance_; };
[708]84    void setDistance( Real d );
[658]85
[728]86    inline ColourValue getColour( void )
87        {return colour_;};
[708]88    void setColour( ColourValue colour );
[535]89
[708]90    void switchEnable();
[621]91
[728]92    inline Ogre::ParticleSystem* getParticleSystem()
93        { return this->particleSystem_; };
[535]94
[708]95  private:
96    Ogre::SceneNode *sceneNode_;
97    Ogre::SceneManager *sceneManager_;
98    Ogre::ParticleSystem *particleSystem_;
99    Real distance_;
100    Real velocity_;
[1037]101    float rate_;
[708]102    ColourValue colour_;
103    int numberOfEmitters_;
[535]104
[708]105    void standardizeEmitters();
106  };
107
[535]108}
[708]109
[673]110#endif /* _ParticleInterface_H__ */
Note: See TracBrowser for help on using the repository browser.