HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_ParticleToSDF.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_ParticleToSDF.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_ParticleToSDF__
12 #define __GAS_ParticleToSDF__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
18 
19 #include <SIM/SIM_RawIndexField.h>
20 
21 class SIM_RawField;
22 class SIM_RawIndexField;
23 
25 {
26 public:
27  GET_DATA_FUNC_S(GAS_NAME_SURFACE, SurfaceName);
28  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
29 
30  GET_DATA_FUNC_F("bandwidth", Bandwidth);
31  GET_DATA_FUNC_B("usemaxspeed", UseMaxSpeed);
32  GET_DATA_FUNC_F("maxspeedscale", MaxSpeedScale);
33 
34  GET_DATA_FUNC_F("scalemultiplier", ScaleMultiplier);
35  GET_DATA_FUNC_I("method", Method);
36  GET_DATA_FUNC_B("rebuildsdf", RebuildSDF);
37 
38 protected:
39  explicit GAS_ParticleToSDF(const SIM_DataFactory *factory);
40  virtual ~GAS_ParticleToSDF();
41 
42  /// Constructs a signed distance field by skinning the set
43  /// of particles.
44  virtual bool solveGasSubclass(SIM_Engine &engine,
45  SIM_Object *obj,
46  SIM_Time time,
47  SIM_Time timestep);
48 
49  void particleToSDF(SIM_Object *obj,
50  SIM_RawField *destfield,
51  SIM_RawIndexField *indexfield,
52  const GU_Detail *particles,
53  const GA_PointGroup *ptgrp,
54  const UT_DMatrix4 &xform,
55  SIM_Time timestep,
56  fpreal bandwidth
57  );
58 
59 
61  {
62  public:
64  const GU_Detail *gdp;
70  int method;
73  };
74 
75  THREADED_METHOD1(GAS_ParticleToSDF, parms.destfield->shouldMultiThread(),
76  applyParticleToSDF,
77  applyParticleParms &, parms)
78  void applyParticleToSDFPartial(applyParticleParms &parms,
79  const UT_JobInfo &info);
80 
81 private:
82  static const SIM_DopDescription *getDopDescription();
83 
87  "Gas Particle To SDF",
88  getDopDescription());
89 };
90 
91 #endif
92 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:28
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
THREADED_METHOD1(GAS_SubSolver, parms.mask->shouldMultiThread(), buildRelationshipFieldInternal, const RelationshipParms &, parms) void buildRelationshipFieldInternalPartial(const RelationshipParms &parms
Builds a relationship field after most stuff has been setup.
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
const openvdb::tools::PointIndexGrid * ptgridvdb
#define GET_DATA_FUNC_I(DataName, FuncName)
double fpreal
Definition: SYS_Types.h:270
Grid< PointIndexTree > PointIndexGrid
Point index grid.
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_F(DataName, FuncName)
#define GAS_NAME_SURFACE
Definition: GAS_Utils.h:36
#define GET_DATA_FUNC_S(DataName, FuncName)