HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_FieldVex.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_FieldVex.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_FieldVex__
12 #define __GAS_FieldVex__
13 
14 #include "SIMZ_API.h"
15 
16 #include <GU/GU_Detail.h>
17 
18 #include <SIM/SIM_RawField.h>
19 #include <SIM/SIM_RawIndexField.h>
20 #include <SIM/SIM_PhysicalParms.h>
21 
22 #include <CVEX/CVEX_Context.h>
23 #include <CVEX/CVEX_Value.h>
24 
25 #include <GAS/GAS_SubSolver.h>
26 
27 class SIM_ScalarField;
28 class SIM_VectorField;
29 class SIM_MatrixField;
30 class SIM_IndexField;
31 
32 class gas_BlockData;
33 class GU_VexGeoInputs;
34 
36 {
37 public:
39  const SIM_RawField *vlist[3][3];
40  SIM_RawField *outlist[3][3];
41 
42  // Since you can't have these in matrices, there's only one.
45 
46  UT_String dataname[3][3];
47  int dataidx_x[3][3];
48  int dataidx_y[3][3];
50  bool processed[3][3];
51 };
52 
54 {
59  int map;
60  int i, j;
61 };
62 
63 class OP_Caller;
64 
66 {
67  const SIM_RawField *vol;
69  int argc;
70  const char *const *argv;
82 };
83 
84 
86 {
87 public:
88  GETSET_DATA_FUNCS_B("vex_multithread", MultiThread);
89  GETSET_DATA_FUNCS_S("vexscript", VexScript);
90  GETSET_DATA_FUNCS_S("bindings", Bindings);
91  GETSET_DATA_FUNCS_B("autobind", Autobind);
92  GETSET_DATA_FUNCS_S("inputbindings", InputBindings);
93  GETSET_DATA_FUNCS_S("vex_cwdpath", VexCWD);
94  GETSET_DATA_FUNCS_S("vex_outputmask", VexOutputMask);
97 
98 protected:
99  explicit GAS_FieldVex(const SIM_DataFactory *factory);
100  virtual ~GAS_FieldVex();
101 
102  bool shouldMultiThread(SIM_RawField *field) const
103  { return field->field()->numTiles() > 1; }
104 
105  virtual bool solveGasSubclass(SIM_Engine &engine,
106  SIM_Object *obj,
107  SIM_Time time,
108  SIM_Time timestep);
109 
110  void processVexScript(
111  SIM_Object *obj,
112  UT_String &script,
113  UT_Array<gas_volumeMap> &volmap,
114  const GU_VexGeoInputs &geoinputs,
115  const UT_Array<UT_Matrix4D> &inputxform,
116  const UT_IntArray &inputxformid) const;
117  void executeVex(SIM_Object *obj, int argc,
118  const char *const*argv,
119  UT_Array<gas_volumeMap> &volmap,
120  OP_Caller &caller,
121  const GU_VexGeoInputs &geoinputs,
122  const UT_Array<UT_Matrix4D> &inputxform,
123  const UT_IntArray &inputxformid) const;
124 
125  THREADED_METHOD1_CONST(GAS_FieldVex, true, processVexVolume,
126  gas_volumeParms &, parms)
127  void processVexVolumePartial(gas_volumeParms &parms,
129 
130  bool processVexBlock(gas_BlockData &data,
131  CVEX_Context &context,
132  int argc, const char *const*argv,
133  const UT_Array<gas_volumeOutput> &outlist,
134  const SIM_RawField *vol,
135  const SIM_RawIndexField *idxvol,
136  const UT_Array<gas_volumeMap> &volmap,
137  int num, int *ix, int *iy, int *iz,
138  const UT_IntArray &completetilelist,
139  const UT_JobInfo &info) const;
140 private:
141  static const SIM_DopDescription *getDopDescription();
142 
143  fpreal myTime, mySopTime, myTimeInc, myFrame;
144  fpreal mySimTime, mySimFrame;
145 
149  "Gas Field Vex",
150  getDopDescription());
151 };
152 
153 #endif
UT_Lock myErrorLock
Definition: GAS_FieldVex.h:74
const UT_Array< UT_Matrix4D > * myInputXform
Definition: GAS_FieldVex.h:80
#define SIMZ_API
Definition: SIMZ_API.h:10
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
const SIM_RawField * vol
Definition: GAS_FieldVex.h:67
const GU_VexGeoInputs * myGeoInputs
Definition: GAS_FieldVex.h:79
#define GETSET_DATA_FUNCS_B(DataName, FuncName)
#define GAS_NAME_USETIMESTEP
Definition: GAS_Utils.h:37
#define GETSET_DATA_FUNCS_S(DataName, FuncName)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
const SIM_RawIndexField * idxvol
Definition: GAS_FieldVex.h:68
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
This class holds a three dimensional scalar field.
#define GETSET_DATA_FUNCS_F(DataName, FuncName)
png_uint_32 i
Definition: png.h:2877
const SIM_RawField * srcvol
Definition: GAS_FieldVex.h:55
Call VEX from C++.
Definition: CVEX_Context.h:147
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
int numTiles() const
UT_StringArray myErrors
Definition: GAS_FieldVex.h:75
UT_StringHolder name
Definition: GAS_FieldVex.h:38
SIM_RawIndexField ** idxoutfield
Definition: GAS_FieldVex.h:58
UT_String myOutputMask
Definition: GAS_FieldVex.h:78
UT_StringArray myWarnings
Definition: GAS_FieldVex.h:76
GLboolean * data
Definition: glcorearb.h:130
OP_Caller * opcaller
Definition: GAS_FieldVex.h:73
This class holds a three dimensional tensor field.
CVEX_Type
The CVEX_Type enum defines the VEX types available to CVEX.
Definition: CVEX_Value.h:23
UT_Array< gas_volumeMap > * volmap
Definition: GAS_FieldVex.h:71
SIM_RawField ** outfield
Definition: GAS_FieldVex.h:57
#define THREADED_METHOD1_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1)
double fpreal
Definition: SYS_Types.h:263
const char *const * argv
Definition: GAS_FieldVex.h:70
bool shouldMultiThread(SIM_RawField *field) const
Definition: GAS_FieldVex.h:102
SIM_RawIndexField * idxoutlist
Definition: GAS_FieldVex.h:44
CVEX_Type type
Definition: GAS_FieldVex.h:49
This class holds a three dimensional scalar field.
#define GAS_NAME_TIMESCALE
Definition: GAS_Utils.h:38
const SIM_RawIndexField * idxvlist
Definition: GAS_FieldVex.h:43
png_infop png_uint_32 int num
Definition: png.h:2158
const SIM_RawIndexField * srcidxvol
Definition: GAS_FieldVex.h:56
#define const
Definition: zconf.h:214
UT_Array< gas_volumeOutput > outputs
Definition: GAS_FieldVex.h:72
This class holds a three dimensional vector field.
UT_VoxelArrayF UT_VoxelArrayF & field
const UT_IntArray * myInputXformId
Definition: GAS_FieldVex.h:81