HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeResize.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_VolumeResizeEnums
24 {
25  enum class Combine
26  {
27  REPLACE = 0,
28  UNION,
29  INTERSECT
30  };
31 }
32 
33 
35 {
36 public:
37  static int version() { return 1; }
38 
40  {
41  myGroup = ""_UTsh;
42  myExtracttile = false;
43  myTilecount = UT_Vector3I(2,2,2);
44  myTilenum = 0;
45  myCombine = 0;
46  mySize = UT_Vector3D(1,1,1);
47  myT = UT_Vector3D(0,0,0);
48  myTileminpad = UT_Vector3I(0,0,0);
49  myTilemaxpad = UT_Vector3I(0,0,0);
50  myVoxelpad = UT_Vector3D(0,0,0);
51  myUsepoints = true;
52  myKeepdata = true;
53  myUseclipplane = false;
54  myClipcenter = UT_Vector3D(0,0,0);
55  myClipdir = UT_Vector3D(0,0,1);
56  myUsemaxres = true;
57  myMaxres = UT_Vector3I(512,512,512);
58  myDetect2d = true;
59 
60  }
61 
62  explicit SOP_VolumeResizeParms(const SOP_VolumeResizeParms &) = default;
64  SOP_VolumeResizeParms(SOP_VolumeResizeParms &&) noexcept = default;
65  SOP_VolumeResizeParms &operator=(SOP_VolumeResizeParms &&) noexcept = default;
66 
67  ~SOP_VolumeResizeParms() override {}
68 
70  {
71  if (myGroup != src.myGroup) return false;
72  if (myExtracttile != src.myExtracttile) return false;
73  if (myTilecount != src.myTilecount) return false;
74  if (myTilenum != src.myTilenum) return false;
75  if (myCombine != src.myCombine) return false;
76  if (mySize != src.mySize) return false;
77  if (myT != src.myT) return false;
78  if (myTileminpad != src.myTileminpad) return false;
79  if (myTilemaxpad != src.myTilemaxpad) return false;
80  if (myVoxelpad != src.myVoxelpad) return false;
81  if (myUsepoints != src.myUsepoints) return false;
82  if (myKeepdata != src.myKeepdata) return false;
83  if (myUseclipplane != src.myUseclipplane) return false;
84  if (myClipcenter != src.myClipcenter) return false;
85  if (myClipdir != src.myClipdir) return false;
86  if (myUsemaxres != src.myUsemaxres) return false;
87  if (myMaxres != src.myMaxres) return false;
88  if (myDetect2d != src.myDetect2d) return false;
89 
90  return true;
91  }
93  {
94  return !operator==(src);
95  }
97 
98 
99 
100  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
101  {
102  myGroup = ""_UTsh;
103  if (true)
104  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
105  myExtracttile = false;
106  if (true)
107  graph->evalOpParm(myExtracttile, nodeidx, "extracttile", time, 0);
108  myTilecount = UT_Vector3I(2,2,2);
109  if (true && ( (true&&!(((getExtracttile()==0)))) ) )
110  graph->evalOpParm(myTilecount, nodeidx, "tilecount", time, 0);
111  myTilenum = 0;
112  if (true && ( (true&&!(((getExtracttile()==0)))) ) )
113  graph->evalOpParm(myTilenum, nodeidx, "tilenum", time, 0);
114  myCombine = 0;
115  if (true && ( (true&&!(((getExtracttile()==1)))) ) )
116  graph->evalOpParm(myCombine, nodeidx, "combine", time, 0);
117  mySize = UT_Vector3D(1,1,1);
118  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((getExtracttile()==1)))) ) )
119  graph->evalOpParm(mySize, nodeidx, "size", time, 0);
120  myT = UT_Vector3D(0,0,0);
121  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((getExtracttile()==1)))) ) )
122  graph->evalOpParm(myT, nodeidx, "t", time, 0);
123  myTileminpad = UT_Vector3I(0,0,0);
124  if (true && ( (true&&!(((getExtracttile()==0)))) ) )
125  graph->evalOpParm(myTileminpad, nodeidx, "tileminpad", time, 0);
126  myTilemaxpad = UT_Vector3I(0,0,0);
127  if (true && ( (true&&!(((getExtracttile()==0)))) ) )
128  graph->evalOpParm(myTilemaxpad, nodeidx, "tilemaxpad", time, 0);
129  myVoxelpad = UT_Vector3D(0,0,0);
130  if (true)
131  graph->evalOpParm(myVoxelpad, nodeidx, "voxelpad", time, 0);
132  myUsepoints = true;
133  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==0))||((getExtracttile()==1)))) ) )
134  graph->evalOpParm(myUsepoints, nodeidx, "usepoints", time, 0);
135  myKeepdata = true;
136  if (true)
137  graph->evalOpParm(myKeepdata, nodeidx, "keepdata", time, 0);
138  myUseclipplane = false;
139  if (true && ( (true&&!(((getExtracttile()==1)))) ) )
140  graph->evalOpParm(myUseclipplane, nodeidx, "useclipplane", time, 0);
141  myClipcenter = UT_Vector3D(0,0,0);
142  if (true && ( (true&&!(((getUseclipplane()==0))||((getExtracttile()==1)))) ) )
143  graph->evalOpParm(myClipcenter, nodeidx, "clipcenter", time, 0);
144  myClipdir = UT_Vector3D(0,0,1);
145  if (true && ( (true&&!(((getUseclipplane()==0))||((getExtracttile()==1)))) ) )
146  graph->evalOpParm(myClipdir, nodeidx, "clipdir", time, 0);
147  myUsemaxres = true;
148  if (true && ( (true&&!(((getExtracttile()==1)))) ) )
149  graph->evalOpParm(myUsemaxres, nodeidx, "usemaxres", time, 0);
150  myMaxres = UT_Vector3I(512,512,512);
151  if (true && ( (true&&!(((getUsemaxres()==0))||((getExtracttile()==1)))) ) )
152  graph->evalOpParm(myMaxres, nodeidx, "maxres", time, 0);
153  myDetect2d = true;
154  if (true)
155  graph->evalOpParm(myDetect2d, nodeidx, "detect2d", time, 0);
156 
157  }
158 
159 
160  void loadFromOpSubclass(const LoadParms &loadparms) override
161  {
162  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
163  }
164 
165 
166  void copyFrom(const OP_NodeParms *src) override
167  {
168  *this = *((const SOP_VolumeResizeParms *)src);
169  }
170 
171  template <typename T>
172  void
173  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
174  {
175  if (idx.size() < 1)
176  return;
177  UT_ASSERT(idx.size() == instance.size()+1);
178  if (idx.size() != instance.size()+1)
179  return;
180  switch (idx[0])
181  {
182  case 0:
183  coerceValue(value, myGroup);
184  break;
185  case 1:
186  coerceValue(value, myExtracttile);
187  break;
188  case 2:
189  coerceValue(value, myTilecount);
190  break;
191  case 3:
192  coerceValue(value, myTilenum);
193  break;
194  case 4:
195  coerceValue(value, myCombine);
196  break;
197  case 5:
198  coerceValue(value, mySize);
199  break;
200  case 6:
201  coerceValue(value, myT);
202  break;
203  case 7:
204  coerceValue(value, myTileminpad);
205  break;
206  case 8:
207  coerceValue(value, myTilemaxpad);
208  break;
209  case 9:
210  coerceValue(value, myVoxelpad);
211  break;
212  case 10:
213  coerceValue(value, myUsepoints);
214  break;
215  case 11:
216  coerceValue(value, myKeepdata);
217  break;
218  case 12:
219  coerceValue(value, myUseclipplane);
220  break;
221  case 13:
222  coerceValue(value, myClipcenter);
223  break;
224  case 14:
225  coerceValue(value, myClipdir);
226  break;
227  case 15:
228  coerceValue(value, myUsemaxres);
229  break;
230  case 16:
231  coerceValue(value, myMaxres);
232  break;
233  case 17:
234  coerceValue(value, myDetect2d);
235  break;
236 
237  }
238  }
239 
240  bool isParmColorRamp(exint idx) const override
241  {
242  switch (idx)
243  {
244 
245  }
246  return false;
247  }
248 
249  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
270  { doGetParmValue(idx, instance, value); }
271 
272  template <typename T>
273  void
274  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
275  {
276  if (idx.size() < 1)
277  return;
278  UT_ASSERT(idx.size() == instance.size()+1);
279  if (idx.size() != instance.size()+1)
280  return;
281  switch (idx[0])
282  {
283  case 0:
284  coerceValue(myGroup, ( ( value ) ));
285  break;
286  case 1:
287  coerceValue(myExtracttile, ( ( value ) ));
288  break;
289  case 2:
290  coerceValue(myTilecount, clampMinValue(1, ( value ) ));
291  break;
292  case 3:
293  coerceValue(myTilenum, ( ( value ) ));
294  break;
295  case 4:
296  coerceValue(myCombine, clampMinValue(0, clampMaxValue(2, value ) ));
297  break;
298  case 5:
299  coerceValue(mySize, clampMinValue(0, ( value ) ));
300  break;
301  case 6:
302  coerceValue(myT, ( ( value ) ));
303  break;
304  case 7:
305  coerceValue(myTileminpad, ( ( value ) ));
306  break;
307  case 8:
308  coerceValue(myTilemaxpad, ( ( value ) ));
309  break;
310  case 9:
311  coerceValue(myVoxelpad, ( ( value ) ));
312  break;
313  case 10:
314  coerceValue(myUsepoints, ( ( value ) ));
315  break;
316  case 11:
317  coerceValue(myKeepdata, ( ( value ) ));
318  break;
319  case 12:
320  coerceValue(myUseclipplane, ( ( value ) ));
321  break;
322  case 13:
323  coerceValue(myClipcenter, ( ( value ) ));
324  break;
325  case 14:
326  coerceValue(myClipdir, ( ( value ) ));
327  break;
328  case 15:
329  coerceValue(myUsemaxres, ( ( value ) ));
330  break;
331  case 16:
332  coerceValue(myMaxres, ( ( value ) ));
333  break;
334  case 17:
335  coerceValue(myDetect2d, ( ( value ) ));
336  break;
337 
338  }
339  }
340 
341  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
344  { doSetParmValue(idx, instance, value); }
345  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
346  { doSetParmValue(idx, instance, value); }
347  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
348  { doSetParmValue(idx, instance, value); }
349  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
350  { doSetParmValue(idx, instance, value); }
351  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
352  { doSetParmValue(idx, instance, value); }
353  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
354  { doSetParmValue(idx, instance, value); }
355  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
356  { doSetParmValue(idx, instance, value); }
357  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
358  { doSetParmValue(idx, instance, value); }
359  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
360  { doSetParmValue(idx, instance, value); }
361  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
362  { doSetParmValue(idx, instance, value); }
363 
364  exint getNestNumParms(TempIndex idx) const override
365  {
366  if (idx.size() == 0)
367  return 18;
368  switch (idx[0])
369  {
370 
371  }
372  // Invalid
373  return 0;
374  }
375 
376  const char *getNestParmName(TempIndex fieldnum) const override
377  {
378  if (fieldnum.size() < 1)
379  return 0;
380  switch (fieldnum[0])
381  {
382  case 0:
383  return "group";
384  case 1:
385  return "extracttile";
386  case 2:
387  return "tilecount";
388  case 3:
389  return "tilenum";
390  case 4:
391  return "combine";
392  case 5:
393  return "size";
394  case 6:
395  return "t";
396  case 7:
397  return "tileminpad";
398  case 8:
399  return "tilemaxpad";
400  case 9:
401  return "voxelpad";
402  case 10:
403  return "usepoints";
404  case 11:
405  return "keepdata";
406  case 12:
407  return "useclipplane";
408  case 13:
409  return "clipcenter";
410  case 14:
411  return "clipdir";
412  case 15:
413  return "usemaxres";
414  case 16:
415  return "maxres";
416  case 17:
417  return "detect2d";
418 
419  }
420  return 0;
421  }
422 
423  ParmType getNestParmType(TempIndex fieldnum) const override
424  {
425  if (fieldnum.size() < 1)
426  return PARM_UNSUPPORTED;
427  switch (fieldnum[0])
428  {
429  case 0:
430  return PARM_STRING;
431  case 1:
432  return PARM_INTEGER;
433  case 2:
434  return PARM_VECTOR3;
435  case 3:
436  return PARM_INTEGER;
437  case 4:
438  return PARM_INTEGER;
439  case 5:
440  return PARM_VECTOR3;
441  case 6:
442  return PARM_VECTOR3;
443  case 7:
444  return PARM_VECTOR3;
445  case 8:
446  return PARM_VECTOR3;
447  case 9:
448  return PARM_VECTOR3;
449  case 10:
450  return PARM_INTEGER;
451  case 11:
452  return PARM_INTEGER;
453  case 12:
454  return PARM_INTEGER;
455  case 13:
456  return PARM_VECTOR3;
457  case 14:
458  return PARM_VECTOR3;
459  case 15:
460  return PARM_INTEGER;
461  case 16:
462  return PARM_VECTOR3;
463  case 17:
464  return PARM_INTEGER;
465 
466  }
467  return PARM_UNSUPPORTED;
468  }
469 
470  // Boiler plate to load individual types.
471  static void loadData(UT_IStream &is, int64 &v)
472  { is.bread(&v, 1); }
473  static void loadData(UT_IStream &is, bool &v)
474  { int64 iv; is.bread(&iv, 1); v = iv; }
475  static void loadData(UT_IStream &is, fpreal64 &v)
476  { is.bread<fpreal64>(&v, 1); }
477  static void loadData(UT_IStream &is, UT_Vector2D &v)
478  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
479  static void loadData(UT_IStream &is, UT_Vector3D &v)
480  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
481  is.bread<fpreal64>(&v.z(), 1); }
482  static void loadData(UT_IStream &is, UT_Vector4D &v)
483  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
484  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
485  static void loadData(UT_IStream &is, UT_Matrix2D &v)
486  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
487  static void loadData(UT_IStream &is, UT_Matrix3D &v)
488  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
489  static void loadData(UT_IStream &is, UT_Matrix4D &v)
490  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
491  static void loadData(UT_IStream &is, UT_Vector2I &v)
492  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
493  static void loadData(UT_IStream &is, UT_Vector3I &v)
494  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
495  is.bread<int64>(&v.z(), 1); }
496  static void loadData(UT_IStream &is, UT_Vector4I &v)
497  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
498  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
500  { is.bread(v); }
502  { UT_StringHolder rampdata;
503  loadData(is, rampdata);
504  if (rampdata.isstring())
505  {
506  v.reset(new UT_Ramp());
507  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
508  v->load(istr);
509  }
510  else v.reset();
511  }
514  loadData(is, data);
515  if (data.isstring())
516  {
517  // Find the data type.
518  const char *colon = UT_StringWrap(data).findChar(':');
519  if (colon)
520  {
521  int typelen = colon - data.buffer();
523  type.strncpy(data.buffer(), typelen);
524  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
525 
526  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
527  }
528  }
529  else v.reset();
530  }
531 
532  static void saveData(std::ostream &os, int64 v)
533  { UTwrite(os, &v); }
534  static void saveData(std::ostream &os, bool v)
535  { int64 iv = v; UTwrite(os, &iv); }
536  static void saveData(std::ostream &os, fpreal64 v)
537  { UTwrite<fpreal64>(os, &v); }
538  static void saveData(std::ostream &os, UT_Vector2D v)
539  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
540  static void saveData(std::ostream &os, UT_Vector3D v)
541  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
542  UTwrite<fpreal64>(os, &v.z()); }
543  static void saveData(std::ostream &os, UT_Vector4D v)
544  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
545  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
546  static void saveData(std::ostream &os, UT_Matrix2D v)
548  static void saveData(std::ostream &os, UT_Matrix3D v)
550  static void saveData(std::ostream &os, UT_Matrix4D v)
552  static void saveData(std::ostream &os, UT_StringHolder s)
553  { UT_StringWrap(s).saveBinary(os); }
554  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
556  UT_OStringStream ostr;
557  if (s) s->save(ostr);
558  result = ostr.str();
559  saveData(os, result);
560  }
561  static void saveData(std::ostream &os, PRM_DataItemHandle s)
563  UT_OStringStream ostr;
564  if (s)
565  {
566  ostr << s->getDataTypeToken();
567  ostr << ":";
568  s->saveBinary(ostr);
569  }
570  result = ostr.str();
571  saveData(os, result);
572  }
573 
574 
575  void save(std::ostream &os) const
576  {
577  int32 v = version();
578  UTwrite(os, &v);
579  saveData(os, myGroup);
580  saveData(os, myExtracttile);
581  saveData(os, myTilecount);
582  saveData(os, myTilenum);
583  saveData(os, myCombine);
584  saveData(os, mySize);
585  saveData(os, myT);
586  saveData(os, myTileminpad);
587  saveData(os, myTilemaxpad);
588  saveData(os, myVoxelpad);
589  saveData(os, myUsepoints);
590  saveData(os, myKeepdata);
591  saveData(os, myUseclipplane);
592  saveData(os, myClipcenter);
593  saveData(os, myClipdir);
594  saveData(os, myUsemaxres);
595  saveData(os, myMaxres);
596  saveData(os, myDetect2d);
597 
598  }
599 
600  bool load(UT_IStream &is)
601  {
602  int32 v;
603  is.bread(&v, 1);
604  if (version() != v)
605  {
606  // Fail incompatible versions
607  return false;
608  }
609  loadData(is, myGroup);
610  loadData(is, myExtracttile);
611  loadData(is, myTilecount);
612  loadData(is, myTilenum);
613  loadData(is, myCombine);
614  loadData(is, mySize);
615  loadData(is, myT);
616  loadData(is, myTileminpad);
617  loadData(is, myTilemaxpad);
618  loadData(is, myVoxelpad);
619  loadData(is, myUsepoints);
620  loadData(is, myKeepdata);
621  loadData(is, myUseclipplane);
622  loadData(is, myClipcenter);
623  loadData(is, myClipdir);
624  loadData(is, myUsemaxres);
625  loadData(is, myMaxres);
626  loadData(is, myDetect2d);
627 
628  return true;
629  }
630 
631  const UT_StringHolder & getGroup() const { return myGroup; }
632  void setGroup(const UT_StringHolder & val) { myGroup = val; }
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getGroup();
638  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
639  return result;
640  }
641  bool getExtracttile() const { return myExtracttile; }
642  void setExtracttile(bool val) { myExtracttile = val; }
643  bool opExtracttile(const SOP_NodeVerb::CookParms &cookparms) const
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getExtracttile();
647  bool result;
648  OP_Utils::evalOpParm(result, thissop, "extracttile", cookparms.getCookTime(), 0);
649  return result;
650  }
651  UT_Vector3I getTilecount() const { return myTilecount; }
652  void setTilecount(UT_Vector3I val) { myTilecount = val; }
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getTilecount();
658  OP_Utils::evalOpParm(result, thissop, "tilecount", cookparms.getCookTime(), 0);
659  return result;
660  }
661  int64 getTilenum() const { return myTilenum; }
662  void setTilenum(int64 val) { myTilenum = val; }
663  int64 opTilenum(const SOP_NodeVerb::CookParms &cookparms) const
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getTilenum();
667  int64 result;
668  OP_Utils::evalOpParm(result, thissop, "tilenum", cookparms.getCookTime(), 0);
669  return result;
670  }
671  Combine getCombine() const { return Combine(myCombine); }
672  void setCombine(Combine val) { myCombine = int64(val); }
673  Combine opCombine(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getCombine();
677  int64 result;
678  OP_Utils::evalOpParm(result, thissop, "combine", cookparms.getCookTime(), 0);
679  return Combine(result);
680  }
681  UT_Vector3D getSize() const { return mySize; }
682  void setSize(UT_Vector3D val) { mySize = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getSize();
688  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
689  return result;
690  }
691  UT_Vector3D getT() const { return myT; }
692  void setT(UT_Vector3D val) { myT = val; }
693  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getT();
698  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
699  return result;
700  }
701  UT_Vector3I getTileminpad() const { return myTileminpad; }
702  void setTileminpad(UT_Vector3I val) { myTileminpad = val; }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getTileminpad();
708  OP_Utils::evalOpParm(result, thissop, "tileminpad", cookparms.getCookTime(), 0);
709  return result;
710  }
711  UT_Vector3I getTilemaxpad() const { return myTilemaxpad; }
712  void setTilemaxpad(UT_Vector3I val) { myTilemaxpad = val; }
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getTilemaxpad();
718  OP_Utils::evalOpParm(result, thissop, "tilemaxpad", cookparms.getCookTime(), 0);
719  return result;
720  }
721  UT_Vector3D getVoxelpad() const { return myVoxelpad; }
722  void setVoxelpad(UT_Vector3D val) { myVoxelpad = val; }
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getVoxelpad();
728  OP_Utils::evalOpParm(result, thissop, "voxelpad", cookparms.getCookTime(), 0);
729  return result;
730  }
731  bool getUsepoints() const { return myUsepoints; }
732  void setUsepoints(bool val) { myUsepoints = val; }
733  bool opUsepoints(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getUsepoints();
737  bool result;
738  OP_Utils::evalOpParm(result, thissop, "usepoints", cookparms.getCookTime(), 0);
739  return result;
740  }
741  bool getKeepdata() const { return myKeepdata; }
742  void setKeepdata(bool val) { myKeepdata = val; }
743  bool opKeepdata(const SOP_NodeVerb::CookParms &cookparms) const
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getKeepdata();
747  bool result;
748  OP_Utils::evalOpParm(result, thissop, "keepdata", cookparms.getCookTime(), 0);
749  return result;
750  }
751  bool getUseclipplane() const { return myUseclipplane; }
752  void setUseclipplane(bool val) { myUseclipplane = val; }
753  bool opUseclipplane(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getUseclipplane();
757  bool result;
758  OP_Utils::evalOpParm(result, thissop, "useclipplane", cookparms.getCookTime(), 0);
759  return result;
760  }
761  UT_Vector3D getClipcenter() const { return myClipcenter; }
762  void setClipcenter(UT_Vector3D val) { myClipcenter = val; }
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getClipcenter();
768  OP_Utils::evalOpParm(result, thissop, "clipcenter", cookparms.getCookTime(), 0);
769  return result;
770  }
771  UT_Vector3D getClipdir() const { return myClipdir; }
772  void setClipdir(UT_Vector3D val) { myClipdir = val; }
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getClipdir();
778  OP_Utils::evalOpParm(result, thissop, "clipdir", cookparms.getCookTime(), 0);
779  return result;
780  }
781  bool getUsemaxres() const { return myUsemaxres; }
782  void setUsemaxres(bool val) { myUsemaxres = val; }
783  bool opUsemaxres(const SOP_NodeVerb::CookParms &cookparms) const
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return getUsemaxres();
787  bool result;
788  OP_Utils::evalOpParm(result, thissop, "usemaxres", cookparms.getCookTime(), 0);
789  return result;
790  }
791  UT_Vector3I getMaxres() const { return myMaxres; }
792  void setMaxres(UT_Vector3I val) { myMaxres = val; }
794  {
795  SOP_Node *thissop = cookparms.getNode();
796  if (!thissop) return getMaxres();
798  OP_Utils::evalOpParm(result, thissop, "maxres", cookparms.getCookTime(), 0);
799  return result;
800  }
801  bool getDetect2d() const { return myDetect2d; }
802  void setDetect2d(bool val) { myDetect2d = val; }
803  bool opDetect2d(const SOP_NodeVerb::CookParms &cookparms) const
804  {
805  SOP_Node *thissop = cookparms.getNode();
806  if (!thissop) return getDetect2d();
807  bool result;
808  OP_Utils::evalOpParm(result, thissop, "detect2d", cookparms.getCookTime(), 0);
809  return result;
810  }
811 
812 private:
813  UT_StringHolder myGroup;
814  bool myExtracttile;
815  UT_Vector3I myTilecount;
816  int64 myTilenum;
817  int64 myCombine;
818  UT_Vector3D mySize;
819  UT_Vector3D myT;
820  UT_Vector3I myTileminpad;
821  UT_Vector3I myTilemaxpad;
822  UT_Vector3D myVoxelpad;
823  bool myUsepoints;
824  bool myKeepdata;
825  bool myUseclipplane;
826  UT_Vector3D myClipcenter;
827  UT_Vector3D myClipdir;
828  bool myUsemaxres;
829  UT_Vector3I myMaxres;
830  bool myDetect2d;
831 
832 };
UT_Vector3D opVoxelpad(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setVoxelpad(UT_Vector3D val)
Combine opCombine(const SOP_NodeVerb::CookParms &cookparms) const
bool opExtracttile(const SOP_NodeVerb::CookParms &cookparms) const
int64 opTilenum(const SOP_NodeVerb::CookParms &cookparms) const
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
exint getNestNumParms(TempIndex idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, int64 &v)
ParmType getNestParmType(TempIndex fieldnum) const override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setMaxres(UT_Vector3I val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
SYS_FORCE_INLINE const char * buffer() const
bool opKeepdata(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, bool &v)
bool operator==(const SOP_VolumeResizeParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
**But if you need a result
Definition: thread.h:613
UT_Vector3T< int64 > UT_Vector3I
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
UT_Vector3D opClipcenter(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I opTilemaxpad(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
double fpreal64
Definition: SYS_Types.h:201
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
UT_Vector3D getT() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
UT_Vector3D opClipdir(const SOP_NodeVerb::CookParms &cookparms) const
void setSize(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
exint length() const
UT_Vector3I getTilemaxpad() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, UT_Matrix4D v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void setTilecount(UT_Vector3I val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_Vector3D getSize() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
long long int64
Definition: SYS_Types.h:116
void setClipcenter(UT_Vector3D val)
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
void copyFrom(const OP_NodeParms *src) override
const char * getNestParmName(TempIndex fieldnum) const override
void save(std::ostream &os) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
UT_Vector3I opMaxres(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
GT_API const UT_StringHolder version
UT_Vector3D getVoxelpad() const
UT_Vector3I opTilecount(const SOP_NodeVerb::CookParms &cookparms) const
bool opDetect2d(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setTileminpad(UT_Vector3I val)
UT_Vector3I getTilecount() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
UT_Vector3D getClipdir() const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void loadData(UT_IStream &is, UT_Vector2D &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setClipdir(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
UT_Vector3I getMaxres() const
#define SOP_API
Definition: SOP_API.h:10
bool opUsemaxres(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setGroup(const UT_StringHolder &val)
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
static void saveData(std::ostream &os, UT_Matrix3D v)
bool opUseclipplane(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool operator!=(const SOP_VolumeResizeParms &src) const
UT_Vector3I opTileminpad(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void saveData(std::ostream &os, bool v)
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I getTileminpad() const
type
Definition: core.h:1059
UT_Vector3D getClipcenter() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setTilemaxpad(UT_Vector3I val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
bool opUsepoints(const SOP_NodeVerb::CookParms &cookparms) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void setT(UT_Vector3D val)
static void saveData(std::ostream &os, int64 v)