HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_SeedParticles.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GAS_SeedParticles.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_SeedParticles__
12 #define __GAS_SeedParticles__
13 
14 #include "GAS_API.h"
15 
17 #include <GU/GU_Detail.h>
18 
19 #include "GAS_SubSolver.h"
20 #include "GAS_Utils.h"
21 
22 class GU_Detail;
23 class SIM_ScalarField;
24 
26 {
27 public:
28  GET_DATA_FUNC_S(GAS_NAME_SURFACE, SurfaceName);
29  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
30 
31  GETSET_DATA_FUNCS_I("particlepervoxel", ParticlePerVoxel);
32  GETSET_DATA_FUNCS_F("particlesize", ParticleSize);
33 
34 protected:
35  explicit GAS_SeedParticles(const SIM_DataFactory *factory);
36  ~GAS_SeedParticles() override;
37 
38  bool solveGasSubclass(SIM_Engine &engine,
39  SIM_Object *obj,
40  SIM_Time time,
41  SIM_Time timestep) override;
42 
43  /// Creates new particles inside the surface with random positions.
44  /// Ensures they are all at least the particle size away from the
45  /// surface. Note that particle size is scaled by the voxel
46  /// size
47  void seedParticles(GU_Detail *gdp,
48  const SIM_ScalarField *surface);
49 
50 private:
51  static const SIM_DopDescription *getDopDescription();
52 
56  "Gas Seed Particles",
57  getDopDescription());
58 };
59 
60 #endif
61 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:30
GT_API const UT_StringHolder time
#define GAS_API
Definition: GAS_API.h:10
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
#define GETSET_DATA_FUNCS_F(DataName, FuncName)
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
This class holds a three dimensional scalar field.
#define GAS_NAME_SURFACE
Definition: GAS_Utils.h:38
#define GET_DATA_FUNC_S(DataName, FuncName)