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