18 #ifndef GZ_RENDERING_BASE_BASEPARTICLEEMITTER_HH_
19 #define GZ_RENDERING_BASE_BASEPARTICLEEMITTER_HH_
30 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
48 public:
virtual void Init()
override;
51 public:
virtual void PreRender()
override;
54 public:
virtual void Reset();
60 public:
virtual void SetType(
const EmitterType _type)
override;
66 public:
virtual void SetEmitterSize(
70 public:
virtual double Rate()
const override;
73 public:
virtual void SetRate(
double _rate)
override;
76 public:
virtual double Duration()
const override;
79 public:
virtual void SetDuration(
double _duration)
override;
82 public:
virtual bool Emitting()
const override;
85 public:
virtual void SetEmitting(
bool _enable)
override;
91 public:
virtual void SetParticleSize(
95 public:
virtual double Lifetime()
const override;
98 public:
virtual void SetLifetime(
double _lifetime)
override;
104 public:
virtual void SetMaterial(
const MaterialPtr &_material)
override;
107 public:
virtual double MinVelocity()
const override;
110 public:
virtual double MaxVelocity()
const override;
113 public:
virtual void SetVelocityRange(
double _minVelocity,
114 double _maxVelocity)
override;
123 public:
virtual void SetColorRange(
128 public:
virtual double ScaleRate()
const override;
131 public:
virtual void SetScaleRate(
double _scaleRate)
override;
134 public:
virtual std::string ColorRangeImage()
const override;
137 public:
virtual void SetColorRangeImage(
141 public:
virtual float ParticleScatterRatio()
const override;
144 public:
virtual void SetParticleScatterRatio(
float _ratio)
override;
154 protected:
double rate = 10;
157 protected:
double duration = 0;
160 protected:
bool emitting =
false;
166 protected:
double lifetime = 5;
172 protected:
double minVelocity = 1;
175 protected:
double maxVelocity = 1;
186 protected:
double scaleRate = 1;
198 protected:
float particleScatterRatio = 0.65f;
253 return this->emitterSize;
261 this->emitterSize = _size;
282 return this->duration;
289 this->duration = _duration;
296 return this->emitting;
303 this->emitting = _enable;
310 return this->particleSize;
318 this->particleSize = _size;
325 return this->lifetime;
332 this->lifetime = _lifetime;
339 return this->material;
346 this->material = _material;
353 return this->minVelocity;
360 return this->maxVelocity;
368 this->minVelocity = _minVelocity;
369 this->maxVelocity = _maxVelocity;
376 return this->colorStart;
383 return this->colorEnd;
392 this->colorStart = _colorStart;
393 this->colorEnd = _colorEnd;
400 return this->scaleRate;
407 this->scaleRate = _scaleRate;
414 return this->colorRangeImage;
421 this->colorRangeImage = _image;
428 return this->particleScatterRatio;
436 this->particleScatterRatio = _ratio;