16 #ifndef SURGSIM_PARTICLES_EMITTER_H 17 #define SURGSIM_PARTICLES_EMITTER_H 23 #include "SurgSim/Framework/ObjectFactory.h" 24 #include "SurgSim/Framework/Behavior.h" 26 #include "SurgSim/Particles/RandomPointGenerator.h" 58 SURGSIM_STATIC_REGISTRATION(Emitter);
66 explicit Emitter(
const std::string& name);
73 void update(
double dt)
override;
75 int getTargetManagerType()
const override;
79 void setTarget(
const std::shared_ptr<SurgSim::Framework::Component> target);
83 const std::shared_ptr<SurgSim::Framework::Component> getTarget();
87 void setShape(std::shared_ptr<SurgSim::Math::Shape> shape);
91 std::shared_ptr<SurgSim::Math::Shape> getShape()
const;
95 void setMode(
int mode);
103 void setRate(
double rate);
107 double getRate()
const;
112 void setLifetimeRange(
const std::pair<double, double>& range);
116 std::pair<double, double> getLifetimeRange()
const;
121 void setVelocityRange(
const std::pair<SurgSim::Math::Vector3d, SurgSim::Math::Vector3d>& range);
124 const std::pair<SurgSim::Math::Vector3d, SurgSim::Math::Vector3d>& getVelocityRange()
const;
139 bool doInitialize()
override;
140 bool doWakeUp()
override;
152 std::pair<double, double> m_lifetimeRange;
155 std::pair<SurgSim::Math::Vector3d, SurgSim::Math::Vector3d> m_velocityRange;
158 double m_particlesNotAdded;
162 std::mt19937 m_generator;
163 std::uniform_real_distribution<double> m_zeroOneDistribution;
167 std::shared_ptr<SurgSim::Math::Shape> m_shape;
170 std::shared_ptr<SurgSim::Particles::Representation> m_target;
176 std::shared_ptr<SurgSim::Framework::Logger> m_logger;
182 #endif // SURGSIM_PARTICLES_EMITTER_H RandomPointGenerator will generate points based on the shape passed.
Definition: RandomPointGenerator.h:35
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Emitter emits particles into a ParticleSystem.
Definition: Emitter.h:61
Definitions of small fixed-size vector types.
Behaviors perform actions.
Definition: Behavior.h:40