HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_ResizeField.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_ResizeField.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_ResizeField__
12 #define __GAS_ResizeField__
13 
14 #include "GAS_API.h"
15 
17 #include <GU/GU_Detail.h>
18 
19 #include "GAS_SubSolver.h"
20 #include "GAS_Utils.h"
21 
22 class GU_Detail;
23 class SIM_RawField;
24 
26 {
27 public:
28  GET_DATA_FUNC_S("reffield", RefFieldName);
29  GET_DATA_FUNC_I("ignoreempty", IgnoreEmpty);
30  GET_DATA_FUNC_V3("minpad", MinPad);
31  GET_DATA_FUNC_V3("maxpad", MaxPad);
32  GET_DATA_FUNC_V3("voxelpad", VoxelPad);
33  GET_DATA_FUNC_S(GAS_NAME_FIELD, FieldName);
34  GET_DATA_FUNC_V3("size", Size);
35  GET_DATA_FUNC_V3("t", Center);
36  GET_DATA_FUNC_I("combinefixed", CombineWithFixed);
37  GET_DATA_FUNC_I("combineorig", CombineWithOrig);
38  GET_DATA_FUNC_B("keepdata", KeepData);
39  GET_DATA_FUNC_S(GAS_NAME_TRACKERADDR, TrackerAddress);
42  GET_DATA_FUNC_I("fulltiles", FullTileMode);
43 
44  // Reduce methods
46  {
47  COMBINE_REPLACE = 0,
50  NUM_COMBINE
51  };
52 
53  /// This function modifies center and size such that tile boundaries of the
54  /// given field do not change.
55  template<typename FIELDTYPE>
56  static void ensureTileBoundariesAreFixed(UT_Vector3& size,
58  const FIELDTYPE* field);
59 
60 protected:
61  explicit GAS_ResizeField(const SIM_DataFactory *factory);
62  ~GAS_ResizeField() override;
63 
64  // Moves & resizes the field keeping all data.
65  bool solveGasSubclass(SIM_Engine &engine,
66  SIM_Object *obj,
67  SIM_Time time,
68  SIM_Time timestep) override;
69 
70  /// Synchronizes with any distributed nodes our desired
71  /// box size, building the maximum of them all.
72  bool synchronizeBoxSizes(const char *dataname,
75  int slice,
76  int numslices);
77 
78 private:
79  static const SIM_DopDescription *getDopDescription();
80 
84  "Gas Resize Field",
85  getDopDescription());
86 };
87 
88 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define GET_DATA_FUNC_V3(DataName, FuncName)
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
#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)
#define GAS_NAME_TRACKERADDR
Definition: GAS_Utils.h:43
#define GAS_NAME_TRACKERPORT
Definition: GAS_Utils.h:44
GLsizeiptr size
Definition: glcorearb.h:664
#define GAS_NAME_JOBNAME
Definition: GAS_Utils.h:45
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_S(DataName, FuncName)