17 #ifndef SDF_PARTICLE_EMITTER_HH_
18 #define SDF_PARTICLE_EMITTER_HH_
23 #include <ignition/math/Pose3.hh>
24 #include <ignition/math/Vector3.hh>
34 inline namespace SDF_VERSION_NAMESPACE {
36 struct PoseRelativeToGraph;
77 public: std::string
Name()
const;
83 public:
void SetName(
const std::string &_name);
101 public:
bool SetType(
const std::string &_typeStr);
190 public: ignition::math::Vector3d
Size()
const;
197 public:
void SetSize(
const ignition::math::Vector3d &_size);
273 public:
const ignition::math::Pose3d &
RawPose()
const;
278 public:
void SetRawPose(
const ignition::math::Pose3d &_pose);
330 private:
void SetXmlParentName(
const std::string &_xmlParentName);
336 private:
void SetPoseRelativeToGraph(
345 IGN_UTILS_IMPL_PTR(dataPtr)
This class contains visual material properties.
Definition: Material.hh:46
A description of a particle emitter, which can be attached to a link.
Definition: ParticleEmitter.hh:61
double Rate() const
Get the number of particles per second that should be emitted.
ignition::math::Vector3d ParticleSize() const
Get the size of a particle in meters.
const std::string & FilePath() const
The path to the file where this element was loaded from.
void SetScatterRatio(float _ratio)
Set the particle scatter ratio.
void SetColorRangeImage(const std::string &_image)
Set the path to the color image used as an affector.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this particle emitter.
void SetMaxVelocity(double _vel)
Set the maximum velocity for each particle.
Errors Load(ElementPtr _sdf)
Load the particle emitter based on an element pointer.
double Duration() const
Get the number of seconds the emitter is active.
void SetMinVelocity(double _vel)
Set the minimum velocity for each particle.
void SetColorEnd(const ignition::math::Color &_colorEnd)
Set the end color for all particles emitted.
double MaxVelocity() const
Get the maximum velocity for each particle.
void SetColorStart(const ignition::math::Color &_colorStart)
Set the starting color for all particles emitted.
void SetType(const ParticleEmitterType _type)
Set the type of the particle emitter.
const ignition::math::Pose3d & RawPose() const
Get the pose of the particle emitter.
void SetFilePath(const std::string &_filePath)
Set the path to the file where this element was loaded from.
void SetMaterial(const sdf::Material &_material)
Set the emitter's material.
bool SetType(const std::string &_typeStr)
Set the type of the particle emitter.
sdf::SemanticPose SemanticPose() const
Get SemanticPose object of this object to aid in resolving poses.
ignition::math::Color ColorStart() const
Gets the starting color for all particles emitted.
void SetRate(double _rate)
Set the number of particles per second that should be emitted.
void SetPoseRelativeTo(const std::string &_frame)
Set the name of the coordinate frame relative to which this emitter's pose is expressed.
void SetName(const std::string &_name)
Set the name of the particle emitter.
std::string Name() const
Get the name of the particle emitter.
void SetScaleRate(double _scaleRate)
Set the amount by which to scale the particles in both x and y direction per second.
const std::string & PoseRelativeTo() const
Get the name of the coordinate frame relative to which this emitter's pose is expressed.
void SetDuration(double _duration)
Set the number of seconds the emitter is active.
std::string ColorRangeImage() const
Get the path to the color image used as an affector.
ignition::math::Color ColorEnd() const
Get the end color for all particles emitted.
double Lifetime() const
Get the number of seconds each particle will 'live' for before being destroyed.
double ScaleRate() const
Get the amount by which to scale the particles in both x and y direction per second.
void SetEmitting(bool _emitting)
Set whether the particle emitter is running, emitting particles.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
bool Emitting() const
Get whether the particle emitter should run (emit particles).
double MinVelocity() const
Get the minimum velocity for each particle.
std::string Topic() const
Get the topic used to update the particle emitter properties.
void SetLifetime(double _duration)
Set the number of seconds each particle will 'live' for.
float ScatterRatio() const
Get the particle scatter ratio.
const sdf::Material * Material() const
Get a pointer to the emitter's material properties.
ParticleEmitter()
Default constructor.
void SetRawPose(const ignition::math::Pose3d &_pose)
Set the pose of the particle emitter object.
ParticleEmitterType Type() const
Get the type of the particle emitter.
void SetParticleSize(const ignition::math::Vector3d &_size)
Set the size of a particle in meters.
ignition::math::Vector3d Size() const
Get the size of the emitter where the particles are sampled.
void SetTopic(const std::string &_topic)
Set the topic used to update the particle emitter properties.
std::string TypeStr() const
Get the particle emitter type as a string.
void SetSize(const ignition::math::Vector3d &_size)
Set the size of the emitter where the particles are sampled.
Definition: Collision.hh:39
SemanticPose is a data structure that can be used by different DOM objects to resolve poses on a Pose...
Definition: SemanticPose.hh:55
ParticleEmitterType
The set of particle emitter types.
Definition: ParticleEmitter.hh:43
@ ELLIPSOID
An ellipsoid emitter.
@ CYLINDER
A cylinder emitter.
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:106
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:54
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25