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