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

offset_handlers.hpp « bparticles « simulations « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bc64f252b6dd8d094fa109b53663eb67118ce509 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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