VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTacticalSmokeEffect.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <osg/CopyOp>
15 #include <osg/MatrixTransform>
16 #include <osg/Object>
17 #include <osg/Vec3d>
18 #include <osg/Vec4>
19 
20 #include <string>
21 
22 namespace osgParticle {
23  class Counter;
24  class ModularEmitter;
25  class Particle;
26  class ParticleSystem;
27  class Placer;
28  class Shooter;
29 }
30 
31 
32 namespace makVrv
33 {
34  class DtTacticalSmokeEmitter;
35  class DtTranslateOperator;
36 
51  class DT_DLL_VRVOSG DtTacticalSmokeEffect : public osg::MatrixTransform
52  {
53  public:
54 
57 
62  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
63 
64  META_Node(makVrv, DtTacticalSmokeEffect);
65 
68  osg::MatrixTransform* particleTransform();
69  const osg::MatrixTransform* particleTransform() const;
70 
73  DtTacticalSmokeEmitter* particleEmitter();
74  const DtTacticalSmokeEmitter* particleEmitter() const;
75 
78  osgParticle::Shooter* particleShooter();
79  const osgParticle::Shooter* particleShooter() const;
80 
83  osgParticle::Placer* particlePlacer();
84  const osgParticle::Placer* particlePlacer() const;
85 
88  osgParticle::Counter* particleCounter();
89  const osgParticle::Counter* particleCounter() const;
90 
93  osgParticle::ParticleSystem* particleSystem();
94  const osgParticle::ParticleSystem* particleSystem() const;
95 
98  osgParticle::Particle& particleTemplate();
99  const osgParticle::Particle& particleTemplate() const;
100 
103  DtTranslateOperator* particleOperator();
104  const DtTranslateOperator* particleOperator() const;
105 
115  void setParticleSpeed(double speed);
116 
126  void setParticleLifetime(double life);
127 
133  void setOneSigmaDistance(int puffIndex, const osg::Vec3d& dist);
134 
139  void setDensity(int puffIndex, double dens);
140 
144  void setPlacement(int puffIndex, const osg::Vec3d& pos);
145 
150  void setEmitterLifetime(double life);
151 
157  void setParticleSizeRange(double isz, double fsz);
158 
165  void setParticleRotationRange(double mn, double mx);
166 
172  void setParticleColorRange(const osg::Vec4& icl, const osg::Vec4& fcl);
173 
179  void setParticleAlphaMultiplier(double alpha);
180 
186  void setIntensityRange(double mn, double mx);
187 
191  void setWind(const osg::Vec3d& wnd);
192 
195  void setTexture(const std::string& txt);
196 
199  void start();
200 
203  void stop();
204 
207  void pause();
208 
211  void resume();
212 
214  void setDefaults();
215 
219  virtual void traverse(osg::NodeVisitor& nv);
220 
221  protected:
223  void initialize();
224 
226  virtual ~DtTacticalSmokeEffect();
227 
228  private:
229  osg::ref_ptr<osg::MatrixTransform> myParticleTransform;
230  osg::ref_ptr<osgParticle::ParticleSystem> myParticleSystem;
231  osg::ref_ptr<DtTacticalSmokeEmitter> myEmitter;
232  osg::ref_ptr<DtTranslateOperator> myWindOperator;
233 
235  std::string myTexture;
236  };
237 
238 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)