[Bf-blender-cvs] [a8eb1d28dbe] functions: start cleaning up core.hpp

Jacques Lucke noreply at git.blender.org
Mon Jul 1 12:12:31 CEST 2019


Commit: a8eb1d28dbe6773f5257a9274b775be00b394880
Author: Jacques Lucke
Date:   Mon Jul 1 11:24:22 2019 +0200
Branches: functions
https://developer.blender.org/rBa8eb1d28dbe6773f5257a9274b775be00b394880

start cleaning up core.hpp

===================================================================

M	source/blender/simulations/bparticles/actions.cpp
M	source/blender/simulations/bparticles/actions.hpp
M	source/blender/simulations/bparticles/core.cpp
M	source/blender/simulations/bparticles/core.hpp
M	source/blender/simulations/bparticles/emitters.hpp
M	source/blender/simulations/bparticles/events.cpp
M	source/blender/simulations/bparticles/events.hpp
M	source/blender/simulations/bparticles/forces.cpp
M	source/blender/simulations/bparticles/forces.hpp
M	source/blender/simulations/bparticles/simulate.cpp

===================================================================

diff --git a/source/blender/simulations/bparticles/actions.cpp b/source/blender/simulations/bparticles/actions.cpp
index b63049b81bb..5b48ef562f7 100644
--- a/source/blender/simulations/bparticles/actions.cpp
+++ b/source/blender/simulations/bparticles/actions.cpp
@@ -4,6 +4,10 @@
 
 namespace BParticles {
 
+Action::~Action()
+{
+}
+
 class KillAction : public Action {
   void execute(EventExecuteInterface &interface) override
   {
diff --git a/source/blender/simulations/bparticles/actions.hpp b/source/blender/simulations/bparticles/actions.hpp
index 568562f8630..92da0bf0f39 100644
--- a/source/blender/simulations/bparticles/actions.hpp
+++ b/source/blender/simulations/bparticles/actions.hpp
@@ -4,6 +4,13 @@
 
 namespace BParticles {
 
+class Action {
+ public:
+  virtual ~Action() = 0;
+
+  virtual void execute(EventExecuteInterface &interface) = 0;
+};
+
 Action *ACTION_kill();
 Action *ACTION_move(float3 offset);
 Action *ACTION_spawn();
diff --git a/source/blender/simulations/bparticles/core.cpp b/source/blender/simulations/bparticles/core.cpp
index c35356e35a4..f25eef3e64f 100644
--- a/source/blender/simulations/bparticles/core.cpp
+++ b/source/blender/simulations/bparticles/core.cpp
@@ -2,10 +2,6 @@
 
 namespace BParticles {
 
-Force::~Force()
-{
-}
-
 Emitter::~Emitter()
 {
 }
@@ -14,14 +10,6 @@ Integrator::~Integrator()
 {
 }
 
-Action::~Action()
-{
-}
-
-EventFilter::~EventFilter()
-{
-}
-
 Event::~Event()
 {
 }
diff --git a/source/blender/simulations/bparticles/core.hpp b/source/blender/simulations/bparticles/core.hpp
index 1ab0b1ec5e1..a61e4e21344 100644
--- a/source/blender/simulations/bparticles/core.hpp
+++ b/source/blender/simulations/bparticles/core.hpp
@@ -17,16 +17,6 @@
 
 namespace BParticles {
 
-using BLI::ArrayRef;
-using BLI::float3;
-using BLI::float4x4;
-using BLI::SmallMap;
-using BLI::SmallSetVector;
-using BLI::SmallVector;
-using BLI::StringRef;
-using BLI::VectorAdaptor;
-using std::unique_ptr;
-
 class ParticlesState {
  private:
   SmallMap<uint, ParticlesContainer *> m_container_by_id;
@@ -289,12 +279,6 @@ struct ParticleSet {
   }
 };
 
-class Force {
- public:
-  virtual ~Force();
-  virtual void add_force(ParticlesBlock &block, ArrayRef<float3> r_force) = 0;
-};
-
 class EventStorage {
  private:
   void *m_array;
@@ -386,13 +370,6 @@ class EventFilterInterface {
   }
 };
 
-class EventFilter {
- public:
-  virtual ~EventFilter();
-
-  virtual void filter(EventFilterInterface &interface) = 0;
-};
-
 class EventExecuteInterface {
  private:
   ParticleSet m_particles;
@@ -460,13 +437,6 @@ class EventExecuteInterface {
   }
 };
 
-class Action {
- public:
-  virtual ~Action();
-
-  virtual void execute(EventExecuteInterface &interface) = 0;
-};
-
 class Event {
  public:
   virtual ~Event();
diff --git a/source/blender/simulations/bparticles/emitters.hpp b/source/blender/simulations/bparticles/emitters.hpp
index 7a77daac899..d219bd7f064 100644
--- a/source/blender/simulations/bparticles/emitters.hpp
+++ b/source/blender/simulations/bparticles/emitters.hpp
@@ -7,6 +7,8 @@ struct Path;
 
 namespace BParticles {
 
+using BLI::float4x4;
+
 Emitter *EMITTER_point(float3 point);
 Emitter *EMITTER_mesh_surface(uint particle_type_id,
                               struct Mesh *mesh,
diff --git a/source/blender/simulations/bparticles/events.cpp b/source/blender/simulations/bparticles/events.cpp
index 89d83fe7c2c..456387fbeea 100644
--- a/source/blender/simulations/bparticles/events.cpp
+++ b/source/blender/simulations/bparticles/events.cpp
@@ -6,6 +6,10 @@
 
 namespace BParticles {
 
+EventFilter::~EventFilter()
+{
+}
+
 class AgeReachedEvent : public EventFilter {
  private:
   float m_age;
diff --git a/source/blender/simulations/bparticles/events.hpp b/source/blender/simulations/bparticles/events.hpp
index 109f0b8c6e5..423ca3ba37b 100644
--- a/source/blender/simulations/bparticles/events.hpp
+++ b/source/blender/simulations/bparticles/events.hpp
@@ -6,6 +6,15 @@ struct BVHTreeFromMesh;
 
 namespace BParticles {
 
+using BLI::float4x4;
+
+class EventFilter {
+ public:
+  virtual ~EventFilter() = 0;
+
+  virtual void filter(EventFilterInterface &interface) = 0;
+};
+
 EventFilter *EVENT_age_reached(float age);
 Event *EVENT_mesh_bounce(struct BVHTreeFromMesh *treedata, const float4x4 &transform);
 
diff --git a/source/blender/simulations/bparticles/forces.cpp b/source/blender/simulations/bparticles/forces.cpp
index 9cc7fc427cb..c0d60dd4868 100644
--- a/source/blender/simulations/bparticles/forces.cpp
+++ b/source/blender/simulations/bparticles/forces.cpp
@@ -4,6 +4,10 @@
 
 namespace BParticles {
 
+Force::~Force()
+{
+}
+
 class DirectionalForce : public Force {
  private:
   float3 m_force;
diff --git a/source/blender/simulations/bparticles/forces.hpp b/source/blender/simulations/bparticles/forces.hpp
index 9654a50b093..c3045e09b18 100644
--- a/source/blender/simulations/bparticles/forces.hpp
+++ b/source/blender/simulations/bparticles/forces.hpp
@@ -4,6 +4,12 @@
 
 namespace BParticles {
 
+class Force {
+ public:
+  virtual ~Force() = 0;
+  virtual void add_force(ParticlesBlock &block, ArrayRef<float3> r_force) = 0;
+};
+
 Force *FORCE_directional(float3 force);
 Force *FORCE_turbulence(float strength);
 
diff --git a/source/blender/simulations/bparticles/simulate.cpp b/source/blender/simulations/bparticles/simulate.cpp
index 6a02519bd80..2e22373084f 100644
--- a/source/blender/simulations/bparticles/simulate.cpp
+++ b/source/blender/simulations/bparticles/simulate.cpp
@@ -12,6 +12,8 @@
 
 namespace BParticles {
 
+using BLI::VectorAdaptor;
+
 /* Static Data
  **************************************************/



More information about the Bf-blender-cvs mailing list