Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/simulations/bparticles/offset_handlers.hpp')
-rw-r--r--source/blender/simulations/bparticles/offset_handlers.hpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/source/blender/simulations/bparticles/offset_handlers.hpp b/source/blender/simulations/bparticles/offset_handlers.hpp
new file mode 100644
index 00000000000..bc64f252b6d
--- /dev/null
+++ b/source/blender/simulations/bparticles/offset_handlers.hpp
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "offset_handler_interface.hpp"
+#include "particle_function.hpp"
+
+namespace BParticles {
+
+class CreateTrailHandler : public OffsetHandler {
+ private:
+ ArrayRef<std::string> m_systems_to_emit;
+ const ParticleFunction &m_inputs_fn;
+ ParticleAction &m_on_birth_action;
+
+ public:
+ CreateTrailHandler(ArrayRef<std::string> systems_to_emit,
+ const ParticleFunction &inputs_fn,
+ ParticleAction &on_birth_action)
+ : m_systems_to_emit(systems_to_emit),
+ m_inputs_fn(inputs_fn),
+ m_on_birth_action(on_birth_action)
+ {
+ }
+
+ void execute(OffsetHandlerInterface &interface) override;
+};
+
+class SizeOverTimeHandler : public OffsetHandler {
+ private:
+ const ParticleFunction &m_inputs_fn;
+
+ public:
+ SizeOverTimeHandler(const ParticleFunction &inputs_fn) : m_inputs_fn(inputs_fn)
+ {
+ }
+
+ void execute(OffsetHandlerInterface &interface) override;
+};
+
+class AlwaysExecuteHandler : public OffsetHandler {
+ private:
+ ParticleAction &m_action;
+
+ public:
+ AlwaysExecuteHandler(ParticleAction &action) : m_action(action)
+ {
+ }
+
+ void execute(OffsetHandlerInterface &interface) override;
+};
+
+} // namespace BParticles