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