HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_IsoOffsetParms.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 
23 {
24 public:
25  static int version() { return 1; }
26 
28  {
29  myOutput = 1;
30  myMode = 0;
31  myUniformSamples = 4;
32  myDivs = 10;
33  mySampleDiv = 10;
34  myDivSize = 0.1;
35  myOverrideOutput = false;
36  myIsoDiv = 10;
37  myPadBounds = false;
38  myOverrideBounds = false;
39  myMin = -1;
40  myMax = 0;
41  myTol = 0.001;
42  myOffset = 0;
43  myLaserScan = true;
44  myFixSigns = true;
45  myForceBounds = true;
46  myInvert = false;
47  myNumNeighbour = 1;
48  mySweepCount = 3;
49  mySweepThreshold = 2;
50  myTetraType = 0;
51  myFileMode = 3;
52  myFileName = "./sdf$F4.simdata"_sh;
53  myName = ""_sh;
54  myBuildPolySoup = false;
55 
56  }
57 
58  explicit SOP_IsoOffsetParms(const SOP_IsoOffsetParms &) = default;
59 
60  virtual ~SOP_IsoOffsetParms() {}
61 
62  bool operator==(const SOP_IsoOffsetParms &src) const
63  {
64  if (myOutput != src.myOutput) return false;
65  if (myMode != src.myMode) return false;
66  if (myUniformSamples != src.myUniformSamples) return false;
67  if (myDivs != src.myDivs) return false;
68  if (mySampleDiv != src.mySampleDiv) return false;
69  if (myDivSize != src.myDivSize) return false;
70  if (myOverrideOutput != src.myOverrideOutput) return false;
71  if (myIsoDiv != src.myIsoDiv) return false;
72  if (myPadBounds != src.myPadBounds) return false;
73  if (myOverrideBounds != src.myOverrideBounds) return false;
74  if (myMin != src.myMin) return false;
75  if (myMax != src.myMax) return false;
76  if (myTol != src.myTol) return false;
77  if (myOffset != src.myOffset) return false;
78  if (myLaserScan != src.myLaserScan) return false;
79  if (myFixSigns != src.myFixSigns) return false;
80  if (myForceBounds != src.myForceBounds) return false;
81  if (myInvert != src.myInvert) return false;
82  if (myNumNeighbour != src.myNumNeighbour) return false;
83  if (mySweepCount != src.mySweepCount) return false;
84  if (mySweepThreshold != src.mySweepThreshold) return false;
85  if (myTetraType != src.myTetraType) return false;
86  if (myFileMode != src.myFileMode) return false;
87  if (myFileName != src.myFileName) return false;
88  if (myName != src.myName) return false;
89  if (myBuildPolySoup != src.myBuildPolySoup) return false;
90 
91  return true;
92  }
93  bool operator!=(const SOP_IsoOffsetParms &src) const
94  {
95  return !operator==(src);
96  }
97 
98 
99 
100  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
101  {
102  if (true)
103  OP_Utils::evalOpParm(myOutput, node, "output", time, 0);
104  else myOutput = 1;
105  if (true)
106  OP_Utils::evalOpParm(myMode, node, "mode", time, 0);
107  else myMode = 0;
108  if (true)
109  OP_Utils::evalOpParm(myUniformSamples, node, "uniformsamples", time, 0);
110  else myUniformSamples = 4;
111  if (true)
112  OP_Utils::evalOpParm(myDivs, node, "divs", time, 0);
113  else myDivs = 10;
114  if (true)
115  OP_Utils::evalOpParm(mySampleDiv, node, "samplediv", time, 0);
116  else mySampleDiv = 10;
117  if (true)
118  OP_Utils::evalOpParm(myDivSize, node, "divsize", time, 0);
119  else myDivSize = 0.1;
120  if (true)
121  OP_Utils::evalOpParm(myOverrideOutput, node, "overrideoutput", time, 0);
122  else myOverrideOutput = false;
123  if (true)
124  OP_Utils::evalOpParm(myIsoDiv, node, "isodiv", time, 0);
125  else myIsoDiv = 10;
126  if (true)
127  OP_Utils::evalOpParm(myPadBounds, node, "padbounds", time, 0);
128  else myPadBounds = false;
129  if (true)
130  OP_Utils::evalOpParm(myOverrideBounds, node, "overridebounds", time, 0);
131  else myOverrideBounds = false;
132  if (true)
133  OP_Utils::evalOpParm(myMin, node, "min", time, 0);
134  else myMin = -1;
135  if (true)
136  OP_Utils::evalOpParm(myMax, node, "max", time, 0);
137  else myMax = 0;
138  if (true)
139  OP_Utils::evalOpParm(myTol, node, "tol", time, 0);
140  else myTol = 0.001;
141  if (true)
142  OP_Utils::evalOpParm(myOffset, node, "offset", time, 0);
143  else myOffset = 0;
144  if (true)
145  OP_Utils::evalOpParm(myLaserScan, node, "laserscan", time, 0);
146  else myLaserScan = true;
147  if (true)
148  OP_Utils::evalOpParm(myFixSigns, node, "fixsigns", time, 0);
149  else myFixSigns = true;
150  if (true)
151  OP_Utils::evalOpParm(myForceBounds, node, "forcebounds", time, 0);
152  else myForceBounds = true;
153  if (true)
154  OP_Utils::evalOpParm(myInvert, node, "invert", time, 0);
155  else myInvert = false;
156  if (true)
157  OP_Utils::evalOpParm(myNumNeighbour, node, "numneighbour", time, 0);
158  else myNumNeighbour = 1;
159  if (true)
160  OP_Utils::evalOpParm(mySweepCount, node, "sweepcount", time, 0);
161  else mySweepCount = 3;
162  if (true)
163  OP_Utils::evalOpParm(mySweepThreshold, node, "sweepalpha", time, 0);
164  else mySweepThreshold = 2;
165  if (true)
166  OP_Utils::evalOpParm(myTetraType, node, "tetratype", time, 0);
167  else myTetraType = 0;
168  if (true)
169  OP_Utils::evalOpParm(myFileMode, node, "filemode", time, 0);
170  else myFileMode = 3;
171  if (true && ( (getFileMode()!=3) ) )
172  OP_Utils::evalOpParm(myFileName, node, "filename", time, 0);
173  else myFileName = "./sdf$F4.simdata"_sh;
174  if (true)
175  OP_Utils::evalOpParm(myName, node, "name", time, 0);
176  else myName = ""_sh;
177  if (true)
178  OP_Utils::evalOpParm(myBuildPolySoup, node, "buildpolysoup", time, 0);
179  else myBuildPolySoup = false;
180 
181  }
182 
183 
184  virtual void loadFromOpSubclass(const LoadParms &loadparms)
185  {
186  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
187  }
188 
189 
190  virtual void copyFrom(const SOP_NodeParms *src)
191  {
192  *this = *((const SOP_IsoOffsetParms *)src);
193  }
194 
195  template <typename T>
196  void
197  doGetParmValue(exint idx, T &value) const
198  {
199  switch (idx)
200  {
201  case 0:
202  coerceValue(value, myOutput);
203  break;
204  case 1:
205  coerceValue(value, myMode);
206  break;
207  case 2:
208  coerceValue(value, myUniformSamples);
209  break;
210  case 3:
211  coerceValue(value, myDivs);
212  break;
213  case 4:
214  coerceValue(value, mySampleDiv);
215  break;
216  case 5:
217  coerceValue(value, myDivSize);
218  break;
219  case 6:
220  coerceValue(value, myOverrideOutput);
221  break;
222  case 7:
223  coerceValue(value, myIsoDiv);
224  break;
225  case 8:
226  coerceValue(value, myPadBounds);
227  break;
228  case 9:
229  coerceValue(value, myOverrideBounds);
230  break;
231  case 10:
232  coerceValue(value, myMin);
233  break;
234  case 11:
235  coerceValue(value, myMax);
236  break;
237  case 12:
238  coerceValue(value, myTol);
239  break;
240  case 13:
241  coerceValue(value, myOffset);
242  break;
243  case 14:
244  coerceValue(value, myLaserScan);
245  break;
246  case 15:
247  coerceValue(value, myFixSigns);
248  break;
249  case 16:
250  coerceValue(value, myForceBounds);
251  break;
252  case 17:
253  coerceValue(value, myInvert);
254  break;
255  case 18:
256  coerceValue(value, myNumNeighbour);
257  break;
258  case 19:
259  coerceValue(value, mySweepCount);
260  break;
261  case 20:
262  coerceValue(value, mySweepThreshold);
263  break;
264  case 21:
265  coerceValue(value, myTetraType);
266  break;
267  case 22:
268  coerceValue(value, myFileMode);
269  break;
270  case 23:
271  coerceValue(value, myFileName);
272  break;
273  case 24:
274  coerceValue(value, myName);
275  break;
276  case 25:
277  coerceValue(value, myBuildPolySoup);
278  break;
279 
280  }
281  }
282 
283  void getParmValue(exint idx, exint &value) const
284  { doGetParmValue(idx, value); }
285  void getParmValue(exint idx, fpreal &value) const
286  { doGetParmValue(idx, value); }
288  { doGetParmValue(idx, value); }
290  { doGetParmValue(idx, value); }
292  { doGetParmValue(idx, value); }
294  { doGetParmValue(idx, value); }
296  { doGetParmValue(idx, value); }
298  { doGetParmValue(idx, value); }
300  { doGetParmValue(idx, value); }
302  { doGetParmValue(idx, value); }
304  { doGetParmValue(idx, value); }
305 
306  template <typename T>
307  void
308  doSetParmValue(exint idx, const T &value)
309  {
310  switch (idx)
311  {
312  case 0:
313  coerceValue(myOutput, value);
314  break;
315  case 1:
316  coerceValue(myMode, value);
317  break;
318  case 2:
319  coerceValue(myUniformSamples, value);
320  break;
321  case 3:
322  coerceValue(myDivs, value);
323  break;
324  case 4:
325  coerceValue(mySampleDiv, value);
326  break;
327  case 5:
328  coerceValue(myDivSize, value);
329  break;
330  case 6:
331  coerceValue(myOverrideOutput, value);
332  break;
333  case 7:
334  coerceValue(myIsoDiv, value);
335  break;
336  case 8:
337  coerceValue(myPadBounds, value);
338  break;
339  case 9:
340  coerceValue(myOverrideBounds, value);
341  break;
342  case 10:
343  coerceValue(myMin, value);
344  break;
345  case 11:
346  coerceValue(myMax, value);
347  break;
348  case 12:
349  coerceValue(myTol, value);
350  break;
351  case 13:
352  coerceValue(myOffset, value);
353  break;
354  case 14:
355  coerceValue(myLaserScan, value);
356  break;
357  case 15:
358  coerceValue(myFixSigns, value);
359  break;
360  case 16:
361  coerceValue(myForceBounds, value);
362  break;
363  case 17:
364  coerceValue(myInvert, value);
365  break;
366  case 18:
367  coerceValue(myNumNeighbour, value);
368  break;
369  case 19:
370  coerceValue(mySweepCount, value);
371  break;
372  case 20:
373  coerceValue(mySweepThreshold, value);
374  break;
375  case 21:
376  coerceValue(myTetraType, value);
377  break;
378  case 22:
379  coerceValue(myFileMode, value);
380  break;
381  case 23:
382  coerceValue(myFileName, value);
383  break;
384  case 24:
385  coerceValue(myName, value);
386  break;
387  case 25:
388  coerceValue(myBuildPolySoup, value);
389  break;
390 
391  }
392  }
393 
394  void setParmValue(exint idx, const exint &value)
395  { doSetParmValue(idx, value); }
396  void setParmValue(exint idx, const fpreal &value)
397  { doSetParmValue(idx, value); }
398  void setParmValue(exint idx, const UT_Vector2D &value)
399  { doSetParmValue(idx, value); }
400  void setParmValue(exint idx, const UT_Vector3D &value)
401  { doSetParmValue(idx, value); }
402  void setParmValue(exint idx, const UT_Vector4D &value)
403  { doSetParmValue(idx, value); }
404  void setParmValue(exint idx, const UT_Matrix2D &value)
405  { doSetParmValue(idx, value); }
406  void setParmValue(exint idx, const UT_Matrix3D &value)
407  { doSetParmValue(idx, value); }
408  void setParmValue(exint idx, const UT_Matrix4D &value)
409  { doSetParmValue(idx, value); }
411  { doSetParmValue(idx, value); }
413  { doSetParmValue(idx, value); }
415  { doSetParmValue(idx, value); }
416 
417  virtual exint getNumParms() const
418  {
419  return 26;
420  }
421 
422  virtual const char *getParmName(exint fieldnum) const
423  {
424  switch (fieldnum)
425  {
426  case 0:
427  return "output";
428  case 1:
429  return "mode";
430  case 2:
431  return "uniformsamples";
432  case 3:
433  return "divs";
434  case 4:
435  return "samplediv";
436  case 5:
437  return "divsize";
438  case 6:
439  return "overrideoutput";
440  case 7:
441  return "isodiv";
442  case 8:
443  return "padbounds";
444  case 9:
445  return "overridebounds";
446  case 10:
447  return "min";
448  case 11:
449  return "max";
450  case 12:
451  return "tol";
452  case 13:
453  return "offset";
454  case 14:
455  return "laserscan";
456  case 15:
457  return "fixsigns";
458  case 16:
459  return "forcebounds";
460  case 17:
461  return "invert";
462  case 18:
463  return "numneighbour";
464  case 19:
465  return "sweepcount";
466  case 20:
467  return "sweepalpha";
468  case 21:
469  return "tetratype";
470  case 22:
471  return "filemode";
472  case 23:
473  return "filename";
474  case 24:
475  return "name";
476  case 25:
477  return "buildpolysoup";
478 
479  }
480  return 0;
481  }
482 
483  virtual ParmType getParmType(exint fieldnum) const
484  {
485  switch (fieldnum)
486  {
487  case 0:
488  return PARM_INTEGER;
489  case 1:
490  return PARM_INTEGER;
491  case 2:
492  return PARM_INTEGER;
493  case 3:
494  return PARM_VECTOR3;
495  case 4:
496  return PARM_INTEGER;
497  case 5:
498  return PARM_FLOAT;
499  case 6:
500  return PARM_INTEGER;
501  case 7:
502  return PARM_VECTOR3;
503  case 8:
504  return PARM_INTEGER;
505  case 9:
506  return PARM_INTEGER;
507  case 10:
508  return PARM_VECTOR3;
509  case 11:
510  return PARM_VECTOR3;
511  case 12:
512  return PARM_FLOAT;
513  case 13:
514  return PARM_FLOAT;
515  case 14:
516  return PARM_INTEGER;
517  case 15:
518  return PARM_INTEGER;
519  case 16:
520  return PARM_INTEGER;
521  case 17:
522  return PARM_INTEGER;
523  case 18:
524  return PARM_INTEGER;
525  case 19:
526  return PARM_INTEGER;
527  case 20:
528  return PARM_INTEGER;
529  case 21:
530  return PARM_INTEGER;
531  case 22:
532  return PARM_INTEGER;
533  case 23:
534  return PARM_STRING;
535  case 24:
536  return PARM_STRING;
537  case 25:
538  return PARM_INTEGER;
539 
540  }
541  return PARM_UNSUPPORTED;
542  }
543 
544  // Boiler plate to load individual types.
545  static void loadData(UT_IStream &is, int64 &v)
546  { is.bread(&v, 1); }
547  static void loadData(UT_IStream &is, bool &v)
548  { int64 iv; is.bread(&iv, 1); v = iv; }
549  static void loadData(UT_IStream &is, fpreal64 &v)
550  { is.bread<fpreal64>(&v, 1); }
551  static void loadData(UT_IStream &is, UT_Vector2D &v)
552  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
553  static void loadData(UT_IStream &is, UT_Vector3D &v)
554  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
555  is.bread<fpreal64>(&v.z(), 1); }
556  static void loadData(UT_IStream &is, UT_Vector4D &v)
557  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
558  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
559  static void loadData(UT_IStream &is, UT_Matrix2D &v)
560  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
561  static void loadData(UT_IStream &is, UT_Matrix3D &v)
562  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
563  static void loadData(UT_IStream &is, UT_Matrix4D &v)
564  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
565  static void loadData(UT_IStream &is, UT_Vector2I &v)
566  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
567  static void loadData(UT_IStream &is, UT_Vector3I &v)
568  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
569  is.bread<int64>(&v.z(), 1); }
570  static void loadData(UT_IStream &is, UT_Vector4I &v)
571  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
572  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
574  { is.bread(v); }
576  { UT_StringHolder rampdata;
577  loadData(is, rampdata);
578  if (rampdata.isstring())
579  {
580  v.reset(new UT_Ramp());
581  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
582  v->load(istr);
583  }
584  else v.reset();
585  }
588  loadData(is, data);
589  if (data.isstring())
590  {
591  // Find the data type.
592  char *colon = UT_StringWrap(data).findChar(':');
593  if (colon)
594  {
595  int typelen = colon - data.buffer();
597  type.strncpy(data.buffer(), typelen);
598  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
599 
600  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
601  }
602  }
603  else v.reset();
604  }
605 
606  static void saveData(std::ostream &os, int64 v)
607  { UTwrite(os, &v); }
608  static void saveData(std::ostream &os, bool v)
609  { int64 iv = v; UTwrite(os, &iv); }
610  static void saveData(std::ostream &os, fpreal64 v)
611  { UTwrite<fpreal64>(os, &v); }
612  static void saveData(std::ostream &os, UT_Vector2D v)
613  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
614  static void saveData(std::ostream &os, UT_Vector3D v)
615  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
616  UTwrite<fpreal64>(os, &v.z()); }
617  static void saveData(std::ostream &os, UT_Vector4D v)
618  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
619  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
620  static void saveData(std::ostream &os, UT_Matrix2D v)
622  static void saveData(std::ostream &os, UT_Matrix3D v)
624  static void saveData(std::ostream &os, UT_Matrix4D v)
626  static void saveData(std::ostream &os, UT_StringHolder s)
627  { UT_StringWrap(s).saveBinary(os); }
628  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
629  { UT_StringHolder result;
630  UT_OStringStream ostr;
631  if (s) s->save(ostr);
632  result = ostr.str();
633  saveData(os, result);
634  }
635  static void saveData(std::ostream &os, PRM_DataItemHandle s)
636  { UT_StringHolder result;
637  UT_OStringStream ostr;
638  if (s)
639  {
640  ostr << s->getDataTypeToken();
641  ostr << ":";
642  s->saveBinary(ostr);
643  }
644  result = ostr.str();
645  saveData(os, result);
646  }
647 
648 
649  void save(std::ostream &os) const
650  {
651  int32 v = version();
652  UTwrite(os, &v);
653  saveData(os, myOutput);
654  saveData(os, myMode);
655  saveData(os, myUniformSamples);
656  saveData(os, myDivs);
657  saveData(os, mySampleDiv);
658  saveData(os, myDivSize);
659  saveData(os, myOverrideOutput);
660  saveData(os, myIsoDiv);
661  saveData(os, myPadBounds);
662  saveData(os, myOverrideBounds);
663  saveData(os, myMin);
664  saveData(os, myMax);
665  saveData(os, myTol);
666  saveData(os, myOffset);
667  saveData(os, myLaserScan);
668  saveData(os, myFixSigns);
669  saveData(os, myForceBounds);
670  saveData(os, myInvert);
671  saveData(os, myNumNeighbour);
672  saveData(os, mySweepCount);
673  saveData(os, mySweepThreshold);
674  saveData(os, myTetraType);
675  saveData(os, myFileMode);
676  saveData(os, myFileName);
677  saveData(os, myName);
678  saveData(os, myBuildPolySoup);
679 
680  }
681 
682  bool load(UT_IStream &is)
683  {
684  int32 v;
685  is.bread(&v, 1);
686  if (version() != v)
687  {
688  // Fail incompatible versions
689  return false;
690  }
691  loadData(is, myOutput);
692  loadData(is, myMode);
693  loadData(is, myUniformSamples);
694  loadData(is, myDivs);
695  loadData(is, mySampleDiv);
696  loadData(is, myDivSize);
697  loadData(is, myOverrideOutput);
698  loadData(is, myIsoDiv);
699  loadData(is, myPadBounds);
700  loadData(is, myOverrideBounds);
701  loadData(is, myMin);
702  loadData(is, myMax);
703  loadData(is, myTol);
704  loadData(is, myOffset);
705  loadData(is, myLaserScan);
706  loadData(is, myFixSigns);
707  loadData(is, myForceBounds);
708  loadData(is, myInvert);
709  loadData(is, myNumNeighbour);
710  loadData(is, mySweepCount);
711  loadData(is, mySweepThreshold);
712  loadData(is, myTetraType);
713  loadData(is, myFileMode);
714  loadData(is, myFileName);
715  loadData(is, myName);
716  loadData(is, myBuildPolySoup);
717 
718  return true;
719  }
720 
721  int64 getOutput() const { return myOutput; }
722  void setOutput(int64 val) { myOutput = val; }
723  int64 opOutput(const SOP_NodeVerb::CookParms &cookparms) const
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getOutput();
727  int64 result;
728  OP_Utils::evalOpParm(result, thissop, "output", cookparms.getCookTime(), 0);
729  return result;
730  }
731  int64 getMode() const { return myMode; }
732  void setMode(int64 val) { myMode = val; }
733  int64 opMode(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getMode();
737  int64 result;
738  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
739  return result;
740  }
741  int64 getUniformSamples() const { return myUniformSamples; }
742  void setUniformSamples(int64 val) { myUniformSamples = val; }
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getUniformSamples();
747  int64 result;
748  OP_Utils::evalOpParm(result, thissop, "uniformsamples", cookparms.getCookTime(), 0);
749  return result;
750  }
751  UT_Vector3I getDivs() const { return myDivs; }
752  void setDivs(UT_Vector3I val) { myDivs = val; }
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getDivs();
757  UT_Vector3I result;
758  OP_Utils::evalOpParm(result, thissop, "divs", cookparms.getCookTime(), 0);
759  return result;
760  }
761  int64 getSampleDiv() const { return mySampleDiv; }
762  void setSampleDiv(int64 val) { mySampleDiv = val; }
763  int64 opSampleDiv(const SOP_NodeVerb::CookParms &cookparms) const
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getSampleDiv();
767  int64 result;
768  OP_Utils::evalOpParm(result, thissop, "samplediv", cookparms.getCookTime(), 0);
769  return result;
770  }
771  fpreal64 getDivSize() const { return myDivSize; }
772  void setDivSize(fpreal64 val) { myDivSize = val; }
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getDivSize();
777  fpreal64 result;
778  OP_Utils::evalOpParm(result, thissop, "divsize", cookparms.getCookTime(), 0);
779  return result;
780  }
781  bool getOverrideOutput() const { return myOverrideOutput; }
782  void setOverrideOutput(bool val) { myOverrideOutput = val; }
783  bool opOverrideOutput(const SOP_NodeVerb::CookParms &cookparms) const
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return getOverrideOutput();
787  bool result;
788  OP_Utils::evalOpParm(result, thissop, "overrideoutput", cookparms.getCookTime(), 0);
789  return result;
790  }
791  UT_Vector3I getIsoDiv() const { return myIsoDiv; }
792  void setIsoDiv(UT_Vector3I val) { myIsoDiv = val; }
794  {
795  SOP_Node *thissop = cookparms.getNode();
796  if (!thissop) return getIsoDiv();
797  UT_Vector3I result;
798  OP_Utils::evalOpParm(result, thissop, "isodiv", cookparms.getCookTime(), 0);
799  return result;
800  }
801  bool getPadBounds() const { return myPadBounds; }
802  void setPadBounds(bool val) { myPadBounds = val; }
803  bool opPadBounds(const SOP_NodeVerb::CookParms &cookparms) const
804  {
805  SOP_Node *thissop = cookparms.getNode();
806  if (!thissop) return getPadBounds();
807  bool result;
808  OP_Utils::evalOpParm(result, thissop, "padbounds", cookparms.getCookTime(), 0);
809  return result;
810  }
811  bool getOverrideBounds() const { return myOverrideBounds; }
812  void setOverrideBounds(bool val) { myOverrideBounds = val; }
813  bool opOverrideBounds(const SOP_NodeVerb::CookParms &cookparms) const
814  {
815  SOP_Node *thissop = cookparms.getNode();
816  if (!thissop) return getOverrideBounds();
817  bool result;
818  OP_Utils::evalOpParm(result, thissop, "overridebounds", cookparms.getCookTime(), 0);
819  return result;
820  }
821  UT_Vector3D getMin() const { return myMin; }
822  void setMin(UT_Vector3D val) { myMin = val; }
823  UT_Vector3D opMin(const SOP_NodeVerb::CookParms &cookparms) const
824  {
825  SOP_Node *thissop = cookparms.getNode();
826  if (!thissop) return getMin();
827  UT_Vector3D result;
828  OP_Utils::evalOpParm(result, thissop, "min", cookparms.getCookTime(), 0);
829  return result;
830  }
831  UT_Vector3D getMax() const { return myMax; }
832  void setMax(UT_Vector3D val) { myMax = val; }
833  UT_Vector3D opMax(const SOP_NodeVerb::CookParms &cookparms) const
834  {
835  SOP_Node *thissop = cookparms.getNode();
836  if (!thissop) return getMax();
837  UT_Vector3D result;
838  OP_Utils::evalOpParm(result, thissop, "max", cookparms.getCookTime(), 0);
839  return result;
840  }
841  fpreal64 getTol() const { return myTol; }
842  void setTol(fpreal64 val) { myTol = val; }
843  fpreal64 opTol(const SOP_NodeVerb::CookParms &cookparms) const
844  {
845  SOP_Node *thissop = cookparms.getNode();
846  if (!thissop) return getTol();
847  fpreal64 result;
848  OP_Utils::evalOpParm(result, thissop, "tol", cookparms.getCookTime(), 0);
849  return result;
850  }
851  fpreal64 getOffset() const { return myOffset; }
852  void setOffset(fpreal64 val) { myOffset = val; }
853  fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
854  {
855  SOP_Node *thissop = cookparms.getNode();
856  if (!thissop) return getOffset();
857  fpreal64 result;
858  OP_Utils::evalOpParm(result, thissop, "offset", cookparms.getCookTime(), 0);
859  return result;
860  }
861  bool getLaserScan() const { return myLaserScan; }
862  void setLaserScan(bool val) { myLaserScan = val; }
863  bool opLaserScan(const SOP_NodeVerb::CookParms &cookparms) const
864  {
865  SOP_Node *thissop = cookparms.getNode();
866  if (!thissop) return getLaserScan();
867  bool result;
868  OP_Utils::evalOpParm(result, thissop, "laserscan", cookparms.getCookTime(), 0);
869  return result;
870  }
871  bool getFixSigns() const { return myFixSigns; }
872  void setFixSigns(bool val) { myFixSigns = val; }
873  bool opFixSigns(const SOP_NodeVerb::CookParms &cookparms) const
874  {
875  SOP_Node *thissop = cookparms.getNode();
876  if (!thissop) return getFixSigns();
877  bool result;
878  OP_Utils::evalOpParm(result, thissop, "fixsigns", cookparms.getCookTime(), 0);
879  return result;
880  }
881  bool getForceBounds() const { return myForceBounds; }
882  void setForceBounds(bool val) { myForceBounds = val; }
883  bool opForceBounds(const SOP_NodeVerb::CookParms &cookparms) const
884  {
885  SOP_Node *thissop = cookparms.getNode();
886  if (!thissop) return getForceBounds();
887  bool result;
888  OP_Utils::evalOpParm(result, thissop, "forcebounds", cookparms.getCookTime(), 0);
889  return result;
890  }
891  bool getInvert() const { return myInvert; }
892  void setInvert(bool val) { myInvert = val; }
893  bool opInvert(const SOP_NodeVerb::CookParms &cookparms) const
894  {
895  SOP_Node *thissop = cookparms.getNode();
896  if (!thissop) return getInvert();
897  bool result;
898  OP_Utils::evalOpParm(result, thissop, "invert", cookparms.getCookTime(), 0);
899  return result;
900  }
901  int64 getNumNeighbour() const { return myNumNeighbour; }
902  void setNumNeighbour(int64 val) { myNumNeighbour = val; }
904  {
905  SOP_Node *thissop = cookparms.getNode();
906  if (!thissop) return getNumNeighbour();
907  int64 result;
908  OP_Utils::evalOpParm(result, thissop, "numneighbour", cookparms.getCookTime(), 0);
909  return result;
910  }
911  int64 getSweepCount() const { return mySweepCount; }
912  void setSweepCount(int64 val) { mySweepCount = val; }
914  {
915  SOP_Node *thissop = cookparms.getNode();
916  if (!thissop) return getSweepCount();
917  int64 result;
918  OP_Utils::evalOpParm(result, thissop, "sweepcount", cookparms.getCookTime(), 0);
919  return result;
920  }
921  int64 getSweepThreshold() const { return mySweepThreshold; }
922  void setSweepThreshold(int64 val) { mySweepThreshold = val; }
924  {
925  SOP_Node *thissop = cookparms.getNode();
926  if (!thissop) return getSweepThreshold();
927  int64 result;
928  OP_Utils::evalOpParm(result, thissop, "sweepalpha", cookparms.getCookTime(), 0);
929  return result;
930  }
931  int64 getTetraType() const { return myTetraType; }
932  void setTetraType(int64 val) { myTetraType = val; }
933  int64 opTetraType(const SOP_NodeVerb::CookParms &cookparms) const
934  {
935  SOP_Node *thissop = cookparms.getNode();
936  if (!thissop) return getTetraType();
937  int64 result;
938  OP_Utils::evalOpParm(result, thissop, "tetratype", cookparms.getCookTime(), 0);
939  return result;
940  }
941  int64 getFileMode() const { return myFileMode; }
942  void setFileMode(int64 val) { myFileMode = val; }
943  int64 opFileMode(const SOP_NodeVerb::CookParms &cookparms) const
944  {
945  SOP_Node *thissop = cookparms.getNode();
946  if (!thissop) return getFileMode();
947  int64 result;
948  OP_Utils::evalOpParm(result, thissop, "filemode", cookparms.getCookTime(), 0);
949  return result;
950  }
951  const UT_StringHolder & getFileName() const { return myFileName; }
952  void setFileName(const UT_StringHolder & val) { myFileName = val; }
954  {
955  SOP_Node *thissop = cookparms.getNode();
956  if (!thissop) return getFileName();
957  UT_StringHolder result;
958  OP_Utils::evalOpParm(result, thissop, "filename", cookparms.getCookTime(), 0);
959  return result;
960  }
961  const UT_StringHolder & getName() const { return myName; }
962  void setName(const UT_StringHolder & val) { myName = val; }
964  {
965  SOP_Node *thissop = cookparms.getNode();
966  if (!thissop) return getName();
967  UT_StringHolder result;
968  OP_Utils::evalOpParm(result, thissop, "name", cookparms.getCookTime(), 0);
969  return result;
970  }
971  bool getBuildPolySoup() const { return myBuildPolySoup; }
972  void setBuildPolySoup(bool val) { myBuildPolySoup = val; }
973  bool opBuildPolySoup(const SOP_NodeVerb::CookParms &cookparms) const
974  {
975  SOP_Node *thissop = cookparms.getNode();
976  if (!thissop) return getBuildPolySoup();
977  bool result;
978  OP_Utils::evalOpParm(result, thissop, "buildpolysoup", cookparms.getCookTime(), 0);
979  return result;
980  }
981 
982 private:
983  int64 myOutput;
984  int64 myMode;
985  int64 myUniformSamples;
986  UT_Vector3I myDivs;
987  int64 mySampleDiv;
988  fpreal64 myDivSize;
989  bool myOverrideOutput;
990  UT_Vector3I myIsoDiv;
991  bool myPadBounds;
992  bool myOverrideBounds;
993  UT_Vector3D myMin;
994  UT_Vector3D myMax;
995  fpreal64 myTol;
996  fpreal64 myOffset;
997  bool myLaserScan;
998  bool myFixSigns;
999  bool myForceBounds;
1000  bool myInvert;
1001  int64 myNumNeighbour;
1002  int64 mySweepCount;
1003  int64 mySweepThreshold;
1004  int64 myTetraType;
1005  int64 myFileMode;
1006  UT_StringHolder myFileName;
1007  UT_StringHolder myName;
1008  bool myBuildPolySoup;
1009 
1010 };
int64 opUniformSamples(const SOP_NodeVerb::CookParms &cookparms) const
bool opForceBounds(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_Vector4D v)
void setOffset(fpreal64 val)
void doSetParmValue(exint idx, const T &value)
bool opOverrideOutput(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
bool operator!=(const SOP_IsoOffsetParms &src) const
T & z(void)
Definition: UT_Vector4.h:379
bool opInvert(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getName() const
void setIsoDiv(UT_Vector3I val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal getTime() const
Definition: OP_Context.h:60
void setMin(UT_Vector3D val)
const GLdouble * v
Definition: glcorearb.h:836
void getParmValue(exint idx, UT_Vector2D &value) const
void setParmValue(exint idx, const UT_StringHolder &value)
void setParmValue(exint idx, const fpreal &value)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
int64 opFileMode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 opDivSize(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
int64 opMode(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
UT_Vector3I opIsoDiv(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector2D v)
int64 opNumNeighbour(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
UT_Vector3D getMax() const
UT_Vector3I getDivs() const
UT_StringHolder opFileName(const SOP_NodeVerb::CookParms &cookparms) const
bool opOverrideBounds(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_IsoOffsetParms &src) const
void doGetParmValue(exint idx, T &value) const
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
void setParmValue(exint idx, const UT_Matrix4D &value)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
UT_Vector3D opMin(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setDivs(UT_Vector3I val)
fpreal64 getDivSize() const
const UT_StringHolder & getFileName() const
void getParmValue(exint idx, UT_Matrix2D &value) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void saveData(std::ostream &os, UT_Matrix3D v)
void setParmValue(exint idx, const UT_Matrix2D &value)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void setDivSize(fpreal64 val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
int64 exint
Definition: SYS_Types.h:116
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
int64 opOutput(const SOP_NodeVerb::CookParms &cookparms) const
void setName(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Vector4D &value) const
UT_Vector3D getMin() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setParmValue(exint idx, const UT_Matrix3D &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
GLboolean * data
Definition: glcorearb.h:130
virtual void copyFrom(const SOP_NodeParms *src)
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
UT_Vector3D opMax(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I getIsoDiv() const
void setFileName(const UT_StringHolder &val)
void setParmValue(exint idx, const UT_Vector2D &value)
void setUniformSamples(int64 val)
static void saveData(std::ostream &os, UT_Vector3D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
int64 opSweepThreshold(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void saveData(std::ostream &os, bool v)
void getParmValue(exint idx, UT_Matrix3D &value) const
static void loadData(UT_IStream &is, int64 &v)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
void getParmValue(exint idx, fpreal &value) const
double fpreal
Definition: SYS_Types.h:270
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setMax(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const exint &value)
UT_StringHolder opName(const SOP_NodeVerb::CookParms &cookparms) const
bool opBuildPolySoup(const SOP_NodeVerb::CookParms &cookparms) const
bool opPadBounds(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, exint &value) const
void setSweepThreshold(int64 val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setParmValue(exint idx, const UT_Vector3D &value)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void getParmValue(exint idx, UT_StringHolder &value) const
virtual exint getNumParms() const
GLuint GLfloat * val
Definition: glcorearb.h:1607
virtual const char * getParmName(exint fieldnum) const
#define SOP_API
Definition: SOP_API.h:10
int64 opTetraType(const SOP_NodeVerb::CookParms &cookparms) const
bool opFixSigns(const SOP_NodeVerb::CookParms &cookparms) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
T & x(void)
Definition: UT_Vector4.h:375
T & y(void)
Definition: UT_Vector2.h:287
void save(std::ostream &os) const
UT_Vector3I opDivs(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1221
void getParmValue(exint idx, UT_Matrix4D &value) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setParmValue(exint idx, const UT_Vector4D &value)
static void saveData(std::ostream &os, UT_Matrix4D v)
T & w(void)
Definition: UT_Vector4.h:381
void getParmValue(exint idx, UT_Vector3D &value) const
bool opLaserScan(const SOP_NodeVerb::CookParms &cookparms) const
int64 opSampleDiv(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
virtual ParmType getParmType(exint fieldnum) const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
fpreal64 opTol(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
static void saveData(std::ostream &os, int64 v)
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
int64 opSweepCount(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1792