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