HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_Lookup.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_Lookup.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_Lookup__
12 #define __GAS_Lookup__
13 
14 #include "GAS_API.h"
15 
17 #include <UT/UT_VoxelArray.h>
18 #include <GU/GU_Detail.h>
19 
20 #include <SIM/SIM_RawField.h>
21 
22 #include "GAS_SubSolver.h"
23 #include "GAS_Utils.h"
24 
25 class GU_Detail;
26 
28 {
29 public:
30  bool shouldMultiThread(const UT_VoxelArrayF *field) const
31  { return field->numTiles() > 1; }
32 
33 protected:
34  explicit GAS_Lookup(const SIM_DataFactory *factory);
35  virtual ~GAS_Lookup();
36 
37  /// Lookups scalar fields by moving along curvature or performing
38  /// relaxation steps.
39  virtual bool solveGasSubclass(SIM_Engine &engine,
40  SIM_Object *obj,
41  SIM_Time time,
42  SIM_Time timestep);
43 
44  void doLookup(SIM_RawField *dstfield,
45  const SIM_VectorField *posfield,
46  const SIM_RawField *srcfield);
47 
48  THREADED_METHOD3_CONST(GAS_Lookup, shouldMultiThread(dstfield->field()),
49  lookup,
50  SIM_RawField *, dstfield,
51  const SIM_VectorField *, posfield,
52  const SIM_RawField *, srcfield);
53  void lookupPartial(SIM_RawField *dstfield,
54  const SIM_VectorField *posfield,
55  const SIM_RawField *srcfield,
56  const UT_JobInfo &jobinfo) const;
57 
58 private:
59  static const SIM_DopDescription *getDopDescription();
60 
64  "Gas Lookup",
65  getDopDescription());
66 };
67 
68 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#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:58
int numTiles() const
#define THREADED_METHOD3_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
This class holds a three dimensional vector field.
bool shouldMultiThread(const UT_VoxelArrayF *field) const
Definition: GAS_Lookup.h:30