HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_Rest.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_Rest.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_Rest__
12 #define __GAS_Rest__
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  GET_DATA_FUNC_S(GAS_NAME_FIELD, FieldName);
31 
32  GET_DATA_FUNC_B("extrapolate", EnableRestExtrapolation);
33 
34  bool shouldMultiThread(SIM_RawField *field) const
35  { return field->field()->numTiles() > 1; }
36 
37 protected:
38  explicit GAS_Rest(const SIM_DataFactory *factory);
39  virtual ~GAS_Rest();
40 
41  /// Builds a rest field consisting of the locations at
42  /// each voxel.
43  virtual bool solveGasSubclass(SIM_Engine &engine,
44  SIM_Object *obj,
45  SIM_Time time,
46  SIM_Time timestep);
47 
48  /// Builds the actual rest field.
49  THREADED_METHOD3_CONST(GAS_Rest, shouldMultiThread(dst),
50  buildRest,
51  SIM_RawField *, dst,
52  const UT_DMatrix4 &, xform,
53  int, axis);
54  void buildRestPartial(SIM_RawField *field,
55  const UT_DMatrix4 &xform,
56  int axis,
57  const UT_JobInfo &info) const;
58 
59 private:
60  static const SIM_DopDescription *getDopDescription();
61 
65  "Gas Rest",
66  getDopDescription());
67 };
68 
69 #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
#define GAS_NAME_FIELD
Definition: GAS_Utils.h:25
int numTiles() const
bool shouldMultiThread(SIM_RawField *field) const
Definition: GAS_Rest.h:34
GLenum GLenum dst
Definition: glcorearb.h:1792
#define GET_DATA_FUNC_B(DataName, FuncName)
#define THREADED_METHOD3_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
#define GET_DATA_FUNC_S(DataName, FuncName)
UT_VoxelArrayF UT_VoxelArrayF & field