Gazebo Rendering

API Reference

9.0.0
Ogre2ParticleEmitter.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_OGRE2_OGRE2PARTICLEEMITTER_HH_
18#define GZ_RENDERING_OGRE2_OGRE2PARTICLEEMITTER_HH_
19
20#include <memory>
21#include <string>
24
25namespace gz
26{
27 namespace rendering
28 {
29 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
30 //
31 // Forward declaration
32 class Ogre2ParticleEmitterPrivate;
33
35 class GZ_RENDERING_OGRE2_VISIBLE Ogre2ParticleEmitter :
36 public BaseParticleEmitter<Ogre2Visual>
37 {
40
42 public: virtual ~Ogre2ParticleEmitter();
43
44 // Documentation inherited.
45 public: void Destroy() override;
46
47 // Documentation inherited.
48 public: virtual void SetType(const EmitterType _type) override;
49
50 // Documentation inherited.
51 public: virtual void SetEmitterSize(
52 const gz::math::Vector3d &_size) override;
53
54 // Documentation inherited.
55 public: virtual void SetRate(double _rate) override;
56
57 // Documentation inherited.
58 public: virtual void SetDuration(double _duration) override;
59
60 // Documentation inherited.
61 public: virtual void SetEmitting(bool _enable) override;
62
63 // Documentation inherited.
64 public: virtual void SetParticleSize(
65 const gz::math::Vector3d &_size) override;
66
67 // Documentation inherited.
68 public: virtual void SetLifetime(double _lifetime) override;
69
70 // Documentation inherited.
71 public: virtual void SetMaterial(MaterialPtr _material,
72 bool _unique = true) override;
73
74 // Documentation inherited.
75 public: virtual void SetVelocityRange(double _minVelocity,
76 double _maxVelocity) override;
77
78 // Documentation inherited.
79 public: virtual void SetColorRange(
80 const gz::math::Color &_colorStart,
81 const gz::math::Color &_colorEnd) override;
82
83 // Documentation inherited.
84 public: virtual void SetScaleRate(double _scaleRate) override;
85
86 // Documentation inherited.
87 public: virtual void SetColorRangeImage(const std::string &_image)
88 override;
89
90 // Documentation inherited.
91 public: virtual void PreRender() override;
92
94 public: static const uint32_t kParticleVisibilityFlags;
95
96 // Documentation inherited.
97 protected: virtual void Init() override;
98
100 private: void CreateParticleSystem();
101
103 private: friend class Ogre2Scene;
104
107 };
108 }
109 }
110}
111#endif