HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_ParticleCount.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_ParticleCount.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_ParticleCount__
12 #define __GAS_ParticleCount__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
19 
21 
22 class SIM_RawField;
23 
25 {
26 public:
27  GET_DATA_FUNC_S(GAS_NAME_FIELDDEST, FieldDestName);
28  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
29 
30 protected:
31  explicit GAS_ParticleCount(const SIM_DataFactory *factory);
32  ~GAS_ParticleCount() override;
33 
34  /// Constructs a signed distance field by skinning the set
35  /// of particles.
36  bool solveGasSubclass(SIM_Engine &engine,
37  SIM_Object *obj,
38  SIM_Time time,
39  SIM_Time timestep) override;
40 
41  void countParticles(const GU_Detail *gdp,
42  SIM_RawField *dst);
43 
45  dst->shouldMultiThread(),
46  countParticles,
47  SIM_RawField *, dst,
48  const openvdb::tools::PointIndexGrid *, grid)
49  void countParticlesPartial(
50  SIM_RawField *dst,
52  const UT_JobInfo &info);
53 
54 private:
55  static const SIM_DopDescription *getDopDescription();
56 
60  "Gas Particle Count",
61  getDopDescription());
62 };
63 
64 
65 #endif
66 
#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
bool shouldMultiThread() const
Returns true if this should be multithreaded.
Definition: SIM_RawField.h:151
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define THREADED_METHOD2(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
#define GAS_NAME_FIELDDEST
Definition: GAS_Utils.h:28
GLenum GLenum dst
Definition: glcorearb.h:1793
Grid< PointIndexTree > PointIndexGrid
Point index grid.
Space-partitioning acceleration structure for points. Partitions the points into voxels to accelerate...
#define GET_DATA_FUNC_S(DataName, FuncName)