VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGaussShooter.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 
15 
16 #include <osgParticle/Shooter>
17 #include <osgParticle/range>
18 
19 #include <osg/CopyOp>
20 #include <osg/Object>
21 #include <osg/Vec3d>
22 
23 namespace osgParticle
24 {
25  class Particle;
26 }
27 
28 namespace makVrv
29 {
30 
74  class DT_DLL_VRVOSG DtGaussShooter: public osgParticle::Shooter
75  {
76  public:
80  NONE = 0,
81  SPEED = 1,
82  LIFE = 2,
83  };
84 
86  inline DtGaussShooter();
87 
89  inline DtGaussShooter(const DtGaussShooter& copy,
90  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
91 
92  META_Object(osgParticle, DtGaussShooter);
93 
97  inline void setDistributionType(DistributionType distType);
98 
102  inline DistributionType distributionType() const;
103 
108  inline void setOneSigmaDistance(const osg::Vec3d& dist);
109 
114  inline const osg::Vec3d& oneSigmaDistance() const;
115 
120  inline void setPhiRange(const osgParticle::rangef& range);
121 
126  inline void setPhiRange(float min, float max);
127 
131  inline const osgParticle::rangef& getPhiRange() const;
132 
137  inline void setThetaRange(const osgParticle::rangef& range);
138 
143  inline void setThetaRange(float min, float max);
144 
148  inline const osgParticle::rangef& getThetaRange() const;
149 
161  inline void setInitialSpeedRange(const osgParticle::rangef& range);
162 
167  inline void setInitialSpeedRange(float min, float max);
168 
172  inline const osgParticle::rangef& getInitialSpeedRange() const;
173 
178  inline void
179  setInitialRotationalSpeedRange(const osgParticle::rangev3& range);
180 
185  inline void setInitialRotationalSpeedRange(
186  const osg::Vec3d& min, const osg::Vec3d& max);
187 
191  inline const osgParticle::rangev3& getInitialRotationalSpeedRange() const;
192 
195  inline void shoot(osgParticle::Particle* particle) const;
196 
201  void setSeed(unsigned int seed);
202 
203  protected:
205  virtual ~DtGaussShooter() {}
206 
208  DtGaussShooter& operator=(const DtGaussShooter&) { return *this; }
209 
210  private:
213 
214  osgParticle::rangef myPhiRange;
215  osgParticle::rangef myThetaRange;
216  osgParticle::rangef mySpeedRange;
217  osgParticle::rangev3 myRotationRange;
218 
219  osg::Vec3d myOneSigmaDistance;
220  };
221 
222 }
223 
224 
225 #define DtGaussShooter_INL_
226 #include <vrvOsg/DtGaussShooter.inl>
227 #undef DtGaussShooter_INL_
Implementation independent random number generator with a normal (Gaussian) distribution.
Definition: DtGaussianDistributionGenerator.h:19
DtGaussianDistributionGenerator myGauss
Definition: DtGaussShooter.h:212
osgParticle::rangef mySpeedRange
Definition: DtGaussShooter.h:216
DistributionType
Definition: DtGaussShooter.h:79
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtGaussShooter & operator=(const DtGaussShooter &)
Protected copy operator.
Definition: DtGaussShooter.h:208
virtual ~DtGaussShooter()
protected virtual destructor
Definition: DtGaussShooter.h:205
A shooter class that shoots particles radially with a Gaussian distribution (selected for speed or li...
Definition: DtGaussShooter.h:74
DistributionType myDistributionType
Definition: DtGaussShooter.h:211
Definition: DtFxParticleSystem.h:98
osgParticle::rangef myThetaRange
Definition: DtGaussShooter.h:215
Contains the declaration for makVrv::DtGaussianDistributionGenerator.
osgParticle::rangev3 myRotationRange
Definition: DtGaussShooter.h:217
Contains DLL export macros.
osgParticle::rangef myPhiRange
Definition: DtGaussShooter.h:214
osg::Vec3d myOneSigmaDistance
Definition: DtGaussShooter.h:219

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)