Gazebo Rendering

API Reference

7.4.2
gz/rendering/ParticleEmitter.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef GZ_RENDERING_PARTICLEEMITTER_HH_
18 #define GZ_RENDERING_PARTICLEEMITTER_HH_
19 
20 #include <string>
21 #include "gz/math/Color.hh"
22 #include "gz/math/Pose3.hh"
23 #include "gz/math/Vector3.hh"
24 #include "gz/rendering/config.hh"
25 #include "gz/rendering/Export.hh"
27 #include "gz/rendering/Visual.hh"
28 
29 namespace gz
30 {
31  namespace rendering
32  {
33  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
34  //
36  enum GZ_RENDERING_VISIBLE EmitterType
37  {
39  EM_POINT = 0,
40 
42  EM_BOX = 1,
43 
46 
49 
52  };
53 
56  //
58  class GZ_RENDERING_VISIBLE ParticleEmitter :
59  public virtual Visual
60  {
62  public: virtual ~ParticleEmitter();
63 
68  public: virtual EmitterType Type() const = 0;
69 
75  public: virtual void SetType(const EmitterType _type) = 0;
76 
81  public: virtual gz::math::Vector3d EmitterSize() const = 0;
82 
98  public: virtual void SetEmitterSize(
99  const gz::math::Vector3d &_size) = 0;
100 
104  public: virtual double Rate() const = 0;
105 
110  public: virtual void SetRate(double _rate) = 0;
111 
116  public: virtual double Duration() const = 0;
117 
123  public: virtual void SetDuration(double _duration) = 0;
124 
128  public: virtual bool Emitting() const = 0;
129 
134  public: virtual void SetEmitting(bool _enable) = 0;
135 
139  public: virtual gz::math::Vector3d ParticleSize() const = 0;
140 
145  public: virtual void SetParticleSize(
146  const gz::math::Vector3d &_size) = 0;
147 
152  public: virtual double Lifetime() const = 0;
153 
159  public: virtual void SetLifetime(double _lifetime) = 0;
160 
164  public: virtual MaterialPtr Material() const = 0;
165 
169  public: virtual void SetMaterial(const MaterialPtr &_material) = 0;
170 
175  public: virtual double MinVelocity() const = 0;
176 
181  public: virtual double MaxVelocity() const = 0;
182 
190  public: virtual void SetVelocityRange(double _minVelocity,
191  double _maxVelocity) = 0;
192 
197  public: virtual gz::math::Color ColorStart() const = 0;
198 
203  public: virtual gz::math::Color ColorEnd() const = 0;
204 
215  public: virtual void SetColorRange(
216  const gz::math::Color &_colorStart,
217  const gz::math::Color &_colorEnd) = 0;
218 
224  public: virtual double ScaleRate() const = 0;
225 
230  public: virtual void SetScaleRate(double _scaleRate) = 0;
231 
235  public: virtual std::string ColorRangeImage() const = 0;
236 
247  public: virtual void SetColorRangeImage(const std::string &_image) = 0;
248 
252  public: virtual float ParticleScatterRatio() const = 0;
253 
258  public: virtual void SetParticleScatterRatio(float _ratio) = 0;
259  };
260  }
261  }
262 }
263 #endif