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