HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_FieldToParticle.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_FieldToParticle.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_FieldToParticle__
12 #define __GAS_FieldToParticle__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
18 
19 class SIM_RawField;
20 class GA_PointGroup;
21 
23 {
24 public:
25  GET_DATA_FUNC_S(GAS_NAME_FIELD, FieldName);
26  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
27  GET_DATA_FUNC_S(GAS_NAME_PTGROUP, PointGroupName);
28 
29  GET_DATA_FUNC_S("attrib", Attribute);
30 
31  GET_DATA_FUNC_B("createattrib", CreateAttrib);
32 
33  GET_DATA_FUNC_B("preserveaffine", PreserveAffine);
34  GET_DATA_FUNC_S("affine", Affine);
35 
36  GET_DATA_FUNC_I("calculationtype", CalculationType);
37  GET_DATA_FUNC_F("dstpreadd", DstPreAdd);
38  GET_DATA_FUNC_F("dstpremul", DstPreMul);
39  GET_DATA_FUNC_F("srcpreadd", SrcPreAdd);
40  GET_DATA_FUNC_F("srcpremul", SrcPreMul);
41  GET_DATA_FUNC_F("postadd", PostAdd);
42  GET_DATA_FUNC_F("postmul", PostMul);
43 
44  GET_DATA_FUNC_I("srctimescale", SrcTimeScale);
45  GET_DATA_FUNC_I("dsttimescale", DstTimeScale);
46  GET_DATA_FUNC_I("posttimescale", PostTimeScale);
47 
50 
51 protected:
52  explicit GAS_FieldToParticle(const SIM_DataFactory *factory);
53  ~GAS_FieldToParticle() override;
54 
55  /// Transfers the values of an attribute from the particle
56  /// geometry onto the field.
57  bool solveGasSubclass(SIM_Engine &engine,
58  SIM_Object *obj,
59  SIM_Time time,
60  SIM_Time timestep) override;
61 
62  THREADED_METHOD7(GAS_FieldToParticle, (particles->getNumPoints()>5000),
63  fieldToParticle,
64  const SIM_RawField *, srcfield,
65  GU_Detail *, particles,
66  const GA_PointGroup *, ptgrp,
67  fpreal, timestep,
68  const char *, attributename,
69  int, offset,
70  const UT_Matrix4D &, xform)
71  void fieldToParticlePartial(const SIM_RawField *srcfield,
72  GU_Detail *particles,
73  const GA_PointGroup *ptgrp,
74  fpreal timestep,
75  const char *attributename,
76  int offset,
77  const UT_Matrix4D &xform,
78  const UT_JobInfo &info);
79 
80  THREADED_METHOD8(GAS_FieldToParticle, (particles->getNumPoints()>5000),
81  fieldToParticleAffine,
82  const SIM_RawField *, srcfield,
83  GU_Detail *, particles,
84  const GA_PointGroup *, ptgrp,
85  fpreal, timestep,
86  const char *, attributename,
87  const char *, affinename,
88  int, offset,
89  const UT_Matrix4D &, xform)
90  void fieldToParticleAffinePartial(const SIM_RawField *srcfield,
91  GU_Detail *particles,
92  const GA_PointGroup *ptgrp,
93  fpreal timestep,
94  const char *attributename,
95  const char *affinename,
96  int offset,
97  const UT_Matrix4D &xform,
98  const UT_JobInfo &info);
99 
100 private:
101  static const SIM_DopDescription *getDopDescription();
102 
106  "Gas Field To Particle",
107  getDopDescription());
108 };
109 
110 #endif
111 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define THREADED_METHOD7(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6, PARMTYPE7, PARMNAME7)
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:30
#define THREADED_METHOD8(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6, PARMTYPE7, PARMNAME7, PARMTYPE8, PARMNAME8)
void
Definition: png.h:1083
GT_API const UT_StringHolder time
#define GAS_NAME_USETIMESTEP
Definition: GAS_Utils.h:39
#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 DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define GAS_NAME_FIELD
Definition: GAS_Utils.h:27
#define GET_DATA_FUNC_I(DataName, FuncName)
GLintptr offset
Definition: glcorearb.h:665
fpreal64 fpreal
Definition: SYS_Types.h:277
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_F(DataName, FuncName)
#define GAS_NAME_TIMESCALE
Definition: GAS_Utils.h:40
#define GAS_NAME_PTGROUP
Definition: GAS_Utils.h:34
#define GET_DATA_FUNC_S(DataName, FuncName)