Changeset 13041 for OpenSceneGraph/trunk/include/osgParticle/ParticleEffect
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgParticle/ParticleEffect
r5980 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 */ … … 24 24 { 25 25 public: 26 26 27 27 explicit ParticleEffect(bool automaticSetup=true): 28 28 _automaticSetup(automaticSetup), … … 34 34 _wind(0.0f,0.0f,0.0f) 35 35 {} 36 36 37 37 ParticleEffect(const ParticleEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); 38 38 … … 63 63 void setIntensity(float intensity); 64 64 float getIntensity() const { return _intensity; } 65 65 66 66 void setStartTime(double startTime); 67 67 double getStartTime() const { return _startTime; } … … 76 76 const osg::Vec3& getWind() const { return _wind; } 77 77 78 /// Get whether all particles are dead 78 /// Get whether all particles are dead 79 79 bool areAllParticlesDead() const { return _particleSystem.valid()?_particleSystem->areAllParticlesDead():true; } 80 80 … … 84 84 virtual Program* getProgram() = 0; 85 85 virtual const Program* getProgram() const = 0; 86 86 87 87 void setParticleSystem(ParticleSystem* ps); 88 88 inline ParticleSystem* getParticleSystem() { return _particleSystem.get(); } … … 96 96 97 97 protected: 98 98 99 99 virtual ~ParticleEffect() {} 100 100 101 101 bool _automaticSetup; 102 102 103 103 osg::ref_ptr<ParticleSystem> _particleSystem; 104 104 105 bool _useLocalParticleSystem; 105 bool _useLocalParticleSystem; 106 106 std::string _textureFileName; 107 107 Particle _defaultParticleTemplate;
