OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConnectedParticleSystem.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGPARTICLE_CONNECTEDPARTICLESYSTEM
15 #define OSGPARTICLE_CONNECTEDPARTICLESYSTEM 1
16 
17 #include <osgParticle/ParticleSystem>
18 
19 namespace osgParticle
20 {
21 
27  {
28  public:
29 
32 
34 
36  virtual Particle* createParticle(const Particle* ptemplate);
37 
39  virtual void reuseParticle(int i);
40 
42  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
43 
46  {
47  return (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0;
48  }
49 
52  {
53  return (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0;
54  }
55 
57  void setMaxNumberOfParticlesToSkip(unsigned int maxNumberofParticlesToSkip){_maxNumberOfParticlesToSkip = maxNumberofParticlesToSkip;}
58 
60  unsigned int getMaxNumberOfParticlesToSkip(){ return _maxNumberOfParticlesToSkip;}
61 
62  protected:
63 
64  virtual ~ConnectedParticleSystem();
65 
67 
70 
72 
73  };
74 
75 
76 
77 }
78 
79 #endif
void setMaxNumberOfParticlesToSkip(unsigned int maxNumberofParticlesToSkip)
Set the maximum numbers of particles to be skipped during the predraw filtering.
const osgParticle::Particle * getStartParticle() const
Get the (const) particle from where the line or quadstrip starts to be drawn.
#define OSGPARTICLE_EXPORT
Definition: Export.h:40
#define META_Object(library, name)
Definition: Object.h:42
osgParticle::Particle * getStartParticle()
Get the particle from where the line or quadstrip starts to be drawn.
unsigned int getMaxNumberOfParticlesToSkip()
Get the maximum numbers of particles to be skipped during the predraw filtering.
ConnectedParticleSystem & operator=(const ConnectedParticleSystem &)