- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgParticle/ConnectedParticleSystem
r6422 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 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 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 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 20 20 { 21 21 22 /** ConnectConnectedParticleSystem is a specialise ConnectedParticleSystem for effects 22 /** ConnectConnectedParticleSystem is a specialise ConnectedParticleSystem for effects 23 23 * like missle trails, where the individual particles are rendered as 24 * single ribbon. 24 * single ribbon. 25 25 */ 26 26 class OSGPARTICLE_EXPORT ConnectedParticleSystem: public osgParticle::ParticleSystem 27 27 { 28 28 public: 29 29 30 30 ConnectedParticleSystem(); 31 31 ConnectedParticleSystem(const ConnectedParticleSystem& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); 32 32 33 33 META_Object(osgParticle, ConnectedParticleSystem); 34 34 35 35 /// Create a new particle from the specified template (or the default one if <CODE>ptemplate</CODE> is null). 36 36 virtual Particle* createParticle(const Particle* ptemplate); 37 37 38 38 /// Reuse the i-th particle. 39 39 virtual void reuseParticle(int i); 40 40 41 41 /// Draw the connected particles as either a line or a quad strip, depending upon viewing distance. . 42 42 virtual void drawImplementation(osg::RenderInfo& renderInfo) const; 43 43 44 44 ///Get the (const) particle from where the line or quadstrip starts to be drawn 45 45 const osgParticle::Particle* getStartParticle() const … … 47 47 return (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0; 48 48 } 49 49 50 50 ///Get the particle from where the line or quadstrip starts to be drawn 51 51 osgParticle::Particle* getStartParticle() … … 53 53 return (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0; 54 54 } 55 55 56 56 ///Set the maximum numbers of particles to be skipped during the predraw filtering 57 57 void setMaxNumberOfParticlesToSkip(unsigned int maxNumberofParticlesToSkip){_maxNumberOfParticlesToSkip = maxNumberofParticlesToSkip;} 58 58 59 59 ///Get the maximum numbers of particles to be skipped during the predraw filtering 60 60 unsigned int getMaxNumberOfParticlesToSkip(){ return _maxNumberOfParticlesToSkip;} 61 61 62 62 protected: 63 63 … … 65 65 66 66 ConnectedParticleSystem& operator=(const ConnectedParticleSystem&) { return *this; } 67 67 68 68 int _lastParticleCreated; 69 69 unsigned int _maxNumberOfParticlesToSkip; 70 70 71 71 int _startParticle; 72 72 73 73 }; 74 74
