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/force_interface.hpp')
-rw-r--r--source/blender/simulations/bparticles/force_interface.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/source/blender/simulations/bparticles/force_interface.hpp b/source/blender/simulations/bparticles/force_interface.hpp
new file mode 100644
index 00000000000..e5c0ec91a35
--- /dev/null
+++ b/source/blender/simulations/bparticles/force_interface.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "BLI_index_mask.h"
+
+#include "block_step_data.hpp"
+
+namespace BParticles {
+
+using BLI::float3;
+using BLI::IndexMask;
+
+class ForceInterface : public BlockStepDataAccess {
+ private:
+ IndexMask m_mask;
+ MutableArrayRef<float3> m_destination;
+
+ public:
+ ForceInterface(BlockStepData &step_data, IndexMask mask, MutableArrayRef<float3> destination)
+ : BlockStepDataAccess(step_data), m_mask(mask), m_destination(destination)
+ {
+ }
+
+ IndexMask mask()
+ {
+ return m_mask;
+ }
+
+ MutableArrayRef<float3> combined_destination()
+ {
+ return m_destination;
+ }
+};
+
+} // namespace BParticles