HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Tetrahedralize-2.0.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_Tetrahedralize_2_0Enums
22 {
23  enum class Batch
24  {
25  ENTIRE = 0,
26  CONNECTED,
27  ATTRIB
28  };
29  enum class Mode
30  {
31  CONFORM = 0,
32  REFINE,
33  CONVEXHULL,
34  DETECT
35  };
36  enum class Output
37  {
38  POLYLINE = 0,
39  TETRAHEDRA,
40  POLYGONS,
41  POLYTET
42  };
43  enum class Failures
44  {
45  REMOVEFAILED = 0,
46  KEEPFAILED,
48  };
49 }
50 
51 
53 {
54 public:
55  static int version() { return 1; }
56 
58  {
59  myGroup = ""_sh;
60  myBatch = 0;
61  myPieceAttrib = "name"_sh;
62  myRemove = true;
63  myMode = 0;
64  myOutput = 1;
65  myKeepPrims = false;
66  myNoBoundMod = true;
67  myOneFacePerTet = false;
68  myPropNormal = true;
69  myInternAttrib = true;
70  myUseQuality = true;
71  myRadEdgeTol = 1.5;
72  myMinDihedralAngle = 10;
73  myUseTargetSizeAttrib = false;
74  myTargetSizeAttrib = "target_size"_sh;
75  myUseUniformMaxSize = false;
76  myUniformMaxSize = 0.1;
77  myUseMaxSizeAttrib = false;
78  myMaxSizeAttrib = "max_size"_sh;
79  myUseMaxIter = false;
80  myMaxIter = 100000;
81  myUseMaxSteiner = false;
82  myMaxSteiner = 1000;
83  myOptIterations = 2;
84  myOptEdgeFace = true;
85  myOptVtxSmooth = true;
86  myOptVtxMod = true;
87  myUseIsectColor = true;
88  myIsectPolyClr = UT_Vector3D(0.9,0,0);
89  myUseIsectGrp = true;
90  myIsectPolyGrp = "intersecting_polygon_grp"_sh;
91  myFailures = 0;
92  myRandomSeed = 3;
93  myPrecisionTol = 1e-09;
94  myDihedralAngleTol = 1e-05;
95  myMaxAttempts = 5;
96  myUseInvalidColor = true;
97  myInvalidPrimClr = UT_Vector3D(0.2,0,0);
98  myUseInvalidGrp = true;
99  myInvalidPrimGrp = "invalid_prim_grp"_sh;
100 
101  }
102 
103  explicit SOP_Tetrahedralize_2_0Parms(const SOP_Tetrahedralize_2_0Parms &) = default;
104 
106 
108  {
109  if (myGroup != src.myGroup) return false;
110  if (myBatch != src.myBatch) return false;
111  if (myPieceAttrib != src.myPieceAttrib) return false;
112  if (myRemove != src.myRemove) return false;
113  if (myMode != src.myMode) return false;
114  if (myOutput != src.myOutput) return false;
115  if (myKeepPrims != src.myKeepPrims) return false;
116  if (myNoBoundMod != src.myNoBoundMod) return false;
117  if (myOneFacePerTet != src.myOneFacePerTet) return false;
118  if (myPropNormal != src.myPropNormal) return false;
119  if (myInternAttrib != src.myInternAttrib) return false;
120  if (myUseQuality != src.myUseQuality) return false;
121  if (myRadEdgeTol != src.myRadEdgeTol) return false;
122  if (myMinDihedralAngle != src.myMinDihedralAngle) return false;
123  if (myUseTargetSizeAttrib != src.myUseTargetSizeAttrib) return false;
124  if (myTargetSizeAttrib != src.myTargetSizeAttrib) return false;
125  if (myUseUniformMaxSize != src.myUseUniformMaxSize) return false;
126  if (myUniformMaxSize != src.myUniformMaxSize) return false;
127  if (myUseMaxSizeAttrib != src.myUseMaxSizeAttrib) return false;
128  if (myMaxSizeAttrib != src.myMaxSizeAttrib) return false;
129  if (myUseMaxIter != src.myUseMaxIter) return false;
130  if (myMaxIter != src.myMaxIter) return false;
131  if (myUseMaxSteiner != src.myUseMaxSteiner) return false;
132  if (myMaxSteiner != src.myMaxSteiner) return false;
133  if (myOptIterations != src.myOptIterations) return false;
134  if (myOptEdgeFace != src.myOptEdgeFace) return false;
135  if (myOptVtxSmooth != src.myOptVtxSmooth) return false;
136  if (myOptVtxMod != src.myOptVtxMod) return false;
137  if (myUseIsectColor != src.myUseIsectColor) return false;
138  if (myIsectPolyClr != src.myIsectPolyClr) return false;
139  if (myUseIsectGrp != src.myUseIsectGrp) return false;
140  if (myIsectPolyGrp != src.myIsectPolyGrp) return false;
141  if (myFailures != src.myFailures) return false;
142  if (myRandomSeed != src.myRandomSeed) return false;
143  if (myPrecisionTol != src.myPrecisionTol) return false;
144  if (myDihedralAngleTol != src.myDihedralAngleTol) return false;
145  if (myMaxAttempts != src.myMaxAttempts) return false;
146  if (myUseInvalidColor != src.myUseInvalidColor) return false;
147  if (myInvalidPrimClr != src.myInvalidPrimClr) return false;
148  if (myUseInvalidGrp != src.myUseInvalidGrp) return false;
149  if (myInvalidPrimGrp != src.myInvalidPrimGrp) return false;
150 
151  return true;
152  }
154  {
155  return !operator==(src);
156  }
161 
162 
163 
164  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
165  {
166  if (true)
167  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
168  else myGroup = ""_sh;
169  if (true)
170  OP_Utils::evalOpParm(myBatch, node, "batch", time, 0);
171  else myBatch = 0;
172  if (true && ( (!(((int64(getBatch())==0)))) ) )
173  OP_Utils::evalOpParm(myPieceAttrib, node, "pieceattrib", time, 0);
174  else myPieceAttrib = "name"_sh;
175  if (true)
176  OP_Utils::evalOpParm(myRemove, node, "remove", time, 0);
177  else myRemove = true;
178  if (true)
179  OP_Utils::evalOpParm(myMode, node, "mode", time, 0);
180  else myMode = 0;
181  if (true && ( (!(((int64(getMode())==3)))) ) )
182  OP_Utils::evalOpParm(myOutput, node, "output", time, 0);
183  else myOutput = 1;
184  if (true && ( (!(((int64(getMode())==3)))) ) )
185  OP_Utils::evalOpParm(myKeepPrims, node, "keepprims", time, 0);
186  else myKeepPrims = false;
187  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3)))) ) )
188  OP_Utils::evalOpParm(myNoBoundMod, node, "noboundmod", time, 0);
189  else myNoBoundMod = true;
190  if (true && ( (!(((int64(getMode())!=0))||((int64(getOutput())==0))||((int64(getOutput())==2)))) ) )
191  OP_Utils::evalOpParm(myOneFacePerTet, node, "onefacepertet", time, 0);
192  else myOneFacePerTet = false;
193  if (true && ( (!(((int64(getMode())!=0))||((int64(getOutput())==0))||((int64(getOutput())==2)))) ) )
194  OP_Utils::evalOpParm(myPropNormal, node, "propnormal", time, 0);
195  else myPropNormal = true;
196  if (true && ( (!(((int64(getMode())!=0))||((int64(getOutput())==0))||((int64(getOutput())==2)))) ) )
197  OP_Utils::evalOpParm(myInternAttrib, node, "internattrib", time, 0);
198  else myInternAttrib = true;
199  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3)))) ) )
200  OP_Utils::evalOpParm(myUseQuality, node, "usequality", time, 0);
201  else myUseQuality = true;
202  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0)))) ) )
203  OP_Utils::evalOpParm(myRadEdgeTol, node, "radedgetol", time, 0);
204  else myRadEdgeTol = 1.5;
205  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0)))) ) )
206  OP_Utils::evalOpParm(myMinDihedralAngle, node, "mindihedralang", time, 0);
207  else myMinDihedralAngle = 10;
208  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0)))) ) )
209  OP_Utils::evalOpParm(myUseTargetSizeAttrib, node, "usetargetsizeattrib", time, 0);
210  else myUseTargetSizeAttrib = false;
211  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0))||((getUseTargetSizeAttrib()==0)))) ) )
212  OP_Utils::evalOpParm(myTargetSizeAttrib, node, "targetsizeattrib", time, 0);
213  else myTargetSizeAttrib = "target_size"_sh;
214  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0)))) ) )
215  OP_Utils::evalOpParm(myUseUniformMaxSize, node, "useuniformmaxsize", time, 0);
216  else myUseUniformMaxSize = false;
217  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0))||((getUseUniformMaxSize()==0)))) ) )
218  OP_Utils::evalOpParm(myUniformMaxSize, node, "uniformmaxsize", time, 0);
219  else myUniformMaxSize = 0.1;
220  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0))||((int64(getMode())!=1)))) ) )
221  OP_Utils::evalOpParm(myUseMaxSizeAttrib, node, "usemaxsizeattrib", time, 0);
222  else myUseMaxSizeAttrib = false;
223  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0))||((getUseMaxSizeAttrib()==0))||((int64(getMode())!=1)))) ) )
224  OP_Utils::evalOpParm(myMaxSizeAttrib, node, "maxsizeattrib", time, 0);
225  else myMaxSizeAttrib = "max_size"_sh;
226  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0)))) ) )
227  OP_Utils::evalOpParm(myUseMaxIter, node, "usemaxiter", time, 0);
228  else myUseMaxIter = false;
229  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0))||((getUseMaxIter()==0)))) ) )
230  OP_Utils::evalOpParm(myMaxIter, node, "maxiter", time, 0);
231  else myMaxIter = 100000;
232  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0)))) ) )
233  OP_Utils::evalOpParm(myUseMaxSteiner, node, "usemaxsteiner", time, 0);
234  else myUseMaxSteiner = false;
235  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3))||((getUseQuality()==0))||((getUseMaxSteiner()==0)))) ) )
236  OP_Utils::evalOpParm(myMaxSteiner, node, "maxsteiner", time, 0);
237  else myMaxSteiner = 1000;
238  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3)))) ) )
239  OP_Utils::evalOpParm(myOptIterations, node, "optiterations", time, 0);
240  else myOptIterations = 2;
241  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3)))) ) )
242  OP_Utils::evalOpParm(myOptEdgeFace, node, "optedgeface", time, 0);
243  else myOptEdgeFace = true;
244  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3)))) ) )
245  OP_Utils::evalOpParm(myOptVtxSmooth, node, "optvtxsmooth", time, 0);
246  else myOptVtxSmooth = true;
247  if (true && ( (!(((int64(getMode())==2))||((int64(getMode())==3)))) ) )
248  OP_Utils::evalOpParm(myOptVtxMod, node, "optvtxmod", time, 0);
249  else myOptVtxMod = true;
250  if (true && ( (!(((int64(getMode())!=3)))) ) )
251  OP_Utils::evalOpParm(myUseIsectColor, node, "useisectcolor", time, 0);
252  else myUseIsectColor = true;
253  if (true && ( (!(((getUseIsectColor()==0))||((int64(getMode())!=3)))) ) )
254  OP_Utils::evalOpParm(myIsectPolyClr, node, "isectpolyclr", time, 0);
255  else myIsectPolyClr = UT_Vector3D(0.9,0,0);
256  if (true && ( (!(((int64(getMode())!=3)))) ) )
257  OP_Utils::evalOpParm(myUseIsectGrp, node, "useisectgrp", time, 0);
258  else myUseIsectGrp = true;
259  if (true && ( (!(((getUseIsectGrp()==0))||((int64(getMode())!=3)))) ) )
260  OP_Utils::evalOpParm(myIsectPolyGrp, node, "isectpolygrp", time, 0);
261  else myIsectPolyGrp = "intersecting_polygon_grp"_sh;
262  if (true)
263  OP_Utils::evalOpParm(myFailures, node, "failures", time, 0);
264  else myFailures = 0;
265  if (true)
266  OP_Utils::evalOpParm(myRandomSeed, node, "randomseed", time, 0);
267  else myRandomSeed = 3;
268  if (true)
269  OP_Utils::evalOpParm(myPrecisionTol, node, "precisiontol", time, 0);
270  else myPrecisionTol = 1e-09;
271  if (true)
272  OP_Utils::evalOpParm(myDihedralAngleTol, node, "dihedralangtol", time, 0);
273  else myDihedralAngleTol = 1e-05;
274  if (true)
275  OP_Utils::evalOpParm(myMaxAttempts, node, "maxattempts", time, 0);
276  else myMaxAttempts = 5;
277  if (true)
278  OP_Utils::evalOpParm(myUseInvalidColor, node, "useinvalidcolor", time, 0);
279  else myUseInvalidColor = true;
280  if (true && ( (!(((getUseInvalidColor()==0)))) ) )
281  OP_Utils::evalOpParm(myInvalidPrimClr, node, "invalidprimclr", time, 0);
282  else myInvalidPrimClr = UT_Vector3D(0.2,0,0);
283  if (true)
284  OP_Utils::evalOpParm(myUseInvalidGrp, node, "useinvalidgrp", time, 0);
285  else myUseInvalidGrp = true;
286  if (true && ( (!(((getUseInvalidGrp()==0)))) ) )
287  OP_Utils::evalOpParm(myInvalidPrimGrp, node, "invalidprimgrp", time, 0);
288  else myInvalidPrimGrp = "invalid_prim_grp"_sh;
289 
290  }
291 
292 
293  virtual void loadFromOpSubclass(const LoadParms &loadparms)
294  {
295  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
296  }
297 
298 
299  virtual void copyFrom(const SOP_NodeParms *src)
300  {
301  *this = *((const SOP_Tetrahedralize_2_0Parms *)src);
302  }
303 
304  template <typename T>
305  void
306  doGetParmValue(exint idx, T &value) const
307  {
308  switch (idx)
309  {
310  case 0:
311  coerceValue(value, myGroup);
312  break;
313  case 1:
314  coerceValue(value, myBatch);
315  break;
316  case 2:
317  coerceValue(value, myPieceAttrib);
318  break;
319  case 3:
320  coerceValue(value, myRemove);
321  break;
322  case 4:
323  coerceValue(value, myMode);
324  break;
325  case 5:
326  coerceValue(value, myOutput);
327  break;
328  case 6:
329  coerceValue(value, myKeepPrims);
330  break;
331  case 7:
332  coerceValue(value, myNoBoundMod);
333  break;
334  case 8:
335  coerceValue(value, myOneFacePerTet);
336  break;
337  case 9:
338  coerceValue(value, myPropNormal);
339  break;
340  case 10:
341  coerceValue(value, myInternAttrib);
342  break;
343  case 11:
344  coerceValue(value, myUseQuality);
345  break;
346  case 12:
347  coerceValue(value, myRadEdgeTol);
348  break;
349  case 13:
350  coerceValue(value, myMinDihedralAngle);
351  break;
352  case 14:
353  coerceValue(value, myUseTargetSizeAttrib);
354  break;
355  case 15:
356  coerceValue(value, myTargetSizeAttrib);
357  break;
358  case 16:
359  coerceValue(value, myUseUniformMaxSize);
360  break;
361  case 17:
362  coerceValue(value, myUniformMaxSize);
363  break;
364  case 18:
365  coerceValue(value, myUseMaxSizeAttrib);
366  break;
367  case 19:
368  coerceValue(value, myMaxSizeAttrib);
369  break;
370  case 20:
371  coerceValue(value, myUseMaxIter);
372  break;
373  case 21:
374  coerceValue(value, myMaxIter);
375  break;
376  case 22:
377  coerceValue(value, myUseMaxSteiner);
378  break;
379  case 23:
380  coerceValue(value, myMaxSteiner);
381  break;
382  case 24:
383  coerceValue(value, myOptIterations);
384  break;
385  case 25:
386  coerceValue(value, myOptEdgeFace);
387  break;
388  case 26:
389  coerceValue(value, myOptVtxSmooth);
390  break;
391  case 27:
392  coerceValue(value, myOptVtxMod);
393  break;
394  case 28:
395  coerceValue(value, myUseIsectColor);
396  break;
397  case 29:
398  coerceValue(value, myIsectPolyClr);
399  break;
400  case 30:
401  coerceValue(value, myUseIsectGrp);
402  break;
403  case 31:
404  coerceValue(value, myIsectPolyGrp);
405  break;
406  case 32:
407  coerceValue(value, myFailures);
408  break;
409  case 33:
410  coerceValue(value, myRandomSeed);
411  break;
412  case 34:
413  coerceValue(value, myPrecisionTol);
414  break;
415  case 35:
416  coerceValue(value, myDihedralAngleTol);
417  break;
418  case 36:
419  coerceValue(value, myMaxAttempts);
420  break;
421  case 37:
422  coerceValue(value, myUseInvalidColor);
423  break;
424  case 38:
425  coerceValue(value, myInvalidPrimClr);
426  break;
427  case 39:
428  coerceValue(value, myUseInvalidGrp);
429  break;
430  case 40:
431  coerceValue(value, myInvalidPrimGrp);
432  break;
433 
434  }
435  }
436 
437  void getParmValue(exint idx, exint &value) const
438  { doGetParmValue(idx, value); }
439  void getParmValue(exint idx, fpreal &value) const
440  { doGetParmValue(idx, value); }
442  { doGetParmValue(idx, value); }
444  { doGetParmValue(idx, value); }
446  { doGetParmValue(idx, value); }
448  { doGetParmValue(idx, value); }
450  { doGetParmValue(idx, value); }
452  { doGetParmValue(idx, value); }
454  { doGetParmValue(idx, value); }
456  { doGetParmValue(idx, value); }
458  { doGetParmValue(idx, value); }
459 
460  template <typename T>
461  void
462  doSetParmValue(exint idx, const T &value)
463  {
464  switch (idx)
465  {
466  case 0:
467  coerceValue(myGroup, value);
468  break;
469  case 1:
470  coerceValue(myBatch, value);
471  break;
472  case 2:
473  coerceValue(myPieceAttrib, value);
474  break;
475  case 3:
476  coerceValue(myRemove, value);
477  break;
478  case 4:
479  coerceValue(myMode, value);
480  break;
481  case 5:
482  coerceValue(myOutput, value);
483  break;
484  case 6:
485  coerceValue(myKeepPrims, value);
486  break;
487  case 7:
488  coerceValue(myNoBoundMod, value);
489  break;
490  case 8:
491  coerceValue(myOneFacePerTet, value);
492  break;
493  case 9:
494  coerceValue(myPropNormal, value);
495  break;
496  case 10:
497  coerceValue(myInternAttrib, value);
498  break;
499  case 11:
500  coerceValue(myUseQuality, value);
501  break;
502  case 12:
503  coerceValue(myRadEdgeTol, value);
504  break;
505  case 13:
506  coerceValue(myMinDihedralAngle, value);
507  break;
508  case 14:
509  coerceValue(myUseTargetSizeAttrib, value);
510  break;
511  case 15:
512  coerceValue(myTargetSizeAttrib, value);
513  break;
514  case 16:
515  coerceValue(myUseUniformMaxSize, value);
516  break;
517  case 17:
518  coerceValue(myUniformMaxSize, value);
519  break;
520  case 18:
521  coerceValue(myUseMaxSizeAttrib, value);
522  break;
523  case 19:
524  coerceValue(myMaxSizeAttrib, value);
525  break;
526  case 20:
527  coerceValue(myUseMaxIter, value);
528  break;
529  case 21:
530  coerceValue(myMaxIter, value);
531  break;
532  case 22:
533  coerceValue(myUseMaxSteiner, value);
534  break;
535  case 23:
536  coerceValue(myMaxSteiner, value);
537  break;
538  case 24:
539  coerceValue(myOptIterations, value);
540  break;
541  case 25:
542  coerceValue(myOptEdgeFace, value);
543  break;
544  case 26:
545  coerceValue(myOptVtxSmooth, value);
546  break;
547  case 27:
548  coerceValue(myOptVtxMod, value);
549  break;
550  case 28:
551  coerceValue(myUseIsectColor, value);
552  break;
553  case 29:
554  coerceValue(myIsectPolyClr, value);
555  break;
556  case 30:
557  coerceValue(myUseIsectGrp, value);
558  break;
559  case 31:
560  coerceValue(myIsectPolyGrp, value);
561  break;
562  case 32:
563  coerceValue(myFailures, value);
564  break;
565  case 33:
566  coerceValue(myRandomSeed, value);
567  break;
568  case 34:
569  coerceValue(myPrecisionTol, value);
570  break;
571  case 35:
572  coerceValue(myDihedralAngleTol, value);
573  break;
574  case 36:
575  coerceValue(myMaxAttempts, value);
576  break;
577  case 37:
578  coerceValue(myUseInvalidColor, value);
579  break;
580  case 38:
581  coerceValue(myInvalidPrimClr, value);
582  break;
583  case 39:
584  coerceValue(myUseInvalidGrp, value);
585  break;
586  case 40:
587  coerceValue(myInvalidPrimGrp, value);
588  break;
589 
590  }
591  }
592 
593  void setParmValue(exint idx, const exint &value)
594  { doSetParmValue(idx, value); }
595  void setParmValue(exint idx, const fpreal &value)
596  { doSetParmValue(idx, value); }
597  void setParmValue(exint idx, const UT_Vector2D &value)
598  { doSetParmValue(idx, value); }
599  void setParmValue(exint idx, const UT_Vector3D &value)
600  { doSetParmValue(idx, value); }
601  void setParmValue(exint idx, const UT_Vector4D &value)
602  { doSetParmValue(idx, value); }
603  void setParmValue(exint idx, const UT_Matrix2D &value)
604  { doSetParmValue(idx, value); }
605  void setParmValue(exint idx, const UT_Matrix3D &value)
606  { doSetParmValue(idx, value); }
607  void setParmValue(exint idx, const UT_Matrix4D &value)
608  { doSetParmValue(idx, value); }
610  { doSetParmValue(idx, value); }
612  { doSetParmValue(idx, value); }
614  { doSetParmValue(idx, value); }
615 
616  virtual exint getNumParms() const
617  {
618  return 41;
619  }
620 
621  virtual const char *getParmName(exint fieldnum) const
622  {
623  switch (fieldnum)
624  {
625  case 0:
626  return "group";
627  case 1:
628  return "batch";
629  case 2:
630  return "pieceattrib";
631  case 3:
632  return "remove";
633  case 4:
634  return "mode";
635  case 5:
636  return "output";
637  case 6:
638  return "keepprims";
639  case 7:
640  return "noboundmod";
641  case 8:
642  return "onefacepertet";
643  case 9:
644  return "propnormal";
645  case 10:
646  return "internattrib";
647  case 11:
648  return "usequality";
649  case 12:
650  return "radedgetol";
651  case 13:
652  return "mindihedralang";
653  case 14:
654  return "usetargetsizeattrib";
655  case 15:
656  return "targetsizeattrib";
657  case 16:
658  return "useuniformmaxsize";
659  case 17:
660  return "uniformmaxsize";
661  case 18:
662  return "usemaxsizeattrib";
663  case 19:
664  return "maxsizeattrib";
665  case 20:
666  return "usemaxiter";
667  case 21:
668  return "maxiter";
669  case 22:
670  return "usemaxsteiner";
671  case 23:
672  return "maxsteiner";
673  case 24:
674  return "optiterations";
675  case 25:
676  return "optedgeface";
677  case 26:
678  return "optvtxsmooth";
679  case 27:
680  return "optvtxmod";
681  case 28:
682  return "useisectcolor";
683  case 29:
684  return "isectpolyclr";
685  case 30:
686  return "useisectgrp";
687  case 31:
688  return "isectpolygrp";
689  case 32:
690  return "failures";
691  case 33:
692  return "randomseed";
693  case 34:
694  return "precisiontol";
695  case 35:
696  return "dihedralangtol";
697  case 36:
698  return "maxattempts";
699  case 37:
700  return "useinvalidcolor";
701  case 38:
702  return "invalidprimclr";
703  case 39:
704  return "useinvalidgrp";
705  case 40:
706  return "invalidprimgrp";
707 
708  }
709  return 0;
710  }
711 
712  virtual ParmType getParmType(exint fieldnum) const
713  {
714  switch (fieldnum)
715  {
716  case 0:
717  return PARM_STRING;
718  case 1:
719  return PARM_INTEGER;
720  case 2:
721  return PARM_STRING;
722  case 3:
723  return PARM_INTEGER;
724  case 4:
725  return PARM_INTEGER;
726  case 5:
727  return PARM_INTEGER;
728  case 6:
729  return PARM_INTEGER;
730  case 7:
731  return PARM_INTEGER;
732  case 8:
733  return PARM_INTEGER;
734  case 9:
735  return PARM_INTEGER;
736  case 10:
737  return PARM_INTEGER;
738  case 11:
739  return PARM_INTEGER;
740  case 12:
741  return PARM_FLOAT;
742  case 13:
743  return PARM_FLOAT;
744  case 14:
745  return PARM_INTEGER;
746  case 15:
747  return PARM_STRING;
748  case 16:
749  return PARM_INTEGER;
750  case 17:
751  return PARM_FLOAT;
752  case 18:
753  return PARM_INTEGER;
754  case 19:
755  return PARM_STRING;
756  case 20:
757  return PARM_INTEGER;
758  case 21:
759  return PARM_INTEGER;
760  case 22:
761  return PARM_INTEGER;
762  case 23:
763  return PARM_INTEGER;
764  case 24:
765  return PARM_INTEGER;
766  case 25:
767  return PARM_INTEGER;
768  case 26:
769  return PARM_INTEGER;
770  case 27:
771  return PARM_INTEGER;
772  case 28:
773  return PARM_INTEGER;
774  case 29:
775  return PARM_VECTOR3;
776  case 30:
777  return PARM_INTEGER;
778  case 31:
779  return PARM_STRING;
780  case 32:
781  return PARM_INTEGER;
782  case 33:
783  return PARM_INTEGER;
784  case 34:
785  return PARM_FLOAT;
786  case 35:
787  return PARM_FLOAT;
788  case 36:
789  return PARM_INTEGER;
790  case 37:
791  return PARM_INTEGER;
792  case 38:
793  return PARM_VECTOR3;
794  case 39:
795  return PARM_INTEGER;
796  case 40:
797  return PARM_STRING;
798 
799  }
800  return PARM_UNSUPPORTED;
801  }
802 
803  // Boiler plate to load individual types.
804  static void loadData(UT_IStream &is, int64 &v)
805  { is.bread(&v, 1); }
806  static void loadData(UT_IStream &is, bool &v)
807  { int64 iv; is.bread(&iv, 1); v = iv; }
808  static void loadData(UT_IStream &is, fpreal64 &v)
809  { is.bread<fpreal64>(&v, 1); }
810  static void loadData(UT_IStream &is, UT_Vector2D &v)
811  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
812  static void loadData(UT_IStream &is, UT_Vector3D &v)
813  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
814  is.bread<fpreal64>(&v.z(), 1); }
815  static void loadData(UT_IStream &is, UT_Vector4D &v)
816  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
817  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
818  static void loadData(UT_IStream &is, UT_Matrix2D &v)
819  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
820  static void loadData(UT_IStream &is, UT_Matrix3D &v)
821  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
822  static void loadData(UT_IStream &is, UT_Matrix4D &v)
823  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
824  static void loadData(UT_IStream &is, UT_Vector2I &v)
825  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
826  static void loadData(UT_IStream &is, UT_Vector3I &v)
827  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
828  is.bread<int64>(&v.z(), 1); }
829  static void loadData(UT_IStream &is, UT_Vector4I &v)
830  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
831  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
833  { is.bread(v); }
835  { UT_StringHolder rampdata;
836  loadData(is, rampdata);
837  if (rampdata.isstring())
838  {
839  v.reset(new UT_Ramp());
840  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
841  v->load(istr);
842  }
843  else v.reset();
844  }
847  loadData(is, data);
848  if (data.isstring())
849  {
850  // Find the data type.
851  char *colon = UT_StringWrap(data).findChar(':');
852  if (colon)
853  {
854  int typelen = colon - data.buffer();
856  type.strncpy(data.buffer(), typelen);
857  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
858 
859  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
860  }
861  }
862  else v.reset();
863  }
864 
865  static void saveData(std::ostream &os, int64 v)
866  { UTwrite(os, &v); }
867  static void saveData(std::ostream &os, bool v)
868  { int64 iv = v; UTwrite(os, &iv); }
869  static void saveData(std::ostream &os, fpreal64 v)
870  { UTwrite<fpreal64>(os, &v); }
871  static void saveData(std::ostream &os, UT_Vector2D v)
872  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
873  static void saveData(std::ostream &os, UT_Vector3D v)
874  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
875  UTwrite<fpreal64>(os, &v.z()); }
876  static void saveData(std::ostream &os, UT_Vector4D v)
877  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
878  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
879  static void saveData(std::ostream &os, UT_Matrix2D v)
881  static void saveData(std::ostream &os, UT_Matrix3D v)
883  static void saveData(std::ostream &os, UT_Matrix4D v)
885  static void saveData(std::ostream &os, UT_StringHolder s)
886  { UT_StringWrap(s).saveBinary(os); }
887  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
888  { UT_StringHolder result;
889  UT_OStringStream ostr;
890  if (s) s->save(ostr);
891  result = ostr.str();
892  saveData(os, result);
893  }
894  static void saveData(std::ostream &os, PRM_DataItemHandle s)
895  { UT_StringHolder result;
896  UT_OStringStream ostr;
897  if (s)
898  {
899  ostr << s->getDataTypeToken();
900  ostr << ":";
901  s->saveBinary(ostr);
902  }
903  result = ostr.str();
904  saveData(os, result);
905  }
906 
907 
908  void save(std::ostream &os) const
909  {
910  int32 v = version();
911  UTwrite(os, &v);
912  saveData(os, myGroup);
913  saveData(os, myBatch);
914  saveData(os, myPieceAttrib);
915  saveData(os, myRemove);
916  saveData(os, myMode);
917  saveData(os, myOutput);
918  saveData(os, myKeepPrims);
919  saveData(os, myNoBoundMod);
920  saveData(os, myOneFacePerTet);
921  saveData(os, myPropNormal);
922  saveData(os, myInternAttrib);
923  saveData(os, myUseQuality);
924  saveData(os, myRadEdgeTol);
925  saveData(os, myMinDihedralAngle);
926  saveData(os, myUseTargetSizeAttrib);
927  saveData(os, myTargetSizeAttrib);
928  saveData(os, myUseUniformMaxSize);
929  saveData(os, myUniformMaxSize);
930  saveData(os, myUseMaxSizeAttrib);
931  saveData(os, myMaxSizeAttrib);
932  saveData(os, myUseMaxIter);
933  saveData(os, myMaxIter);
934  saveData(os, myUseMaxSteiner);
935  saveData(os, myMaxSteiner);
936  saveData(os, myOptIterations);
937  saveData(os, myOptEdgeFace);
938  saveData(os, myOptVtxSmooth);
939  saveData(os, myOptVtxMod);
940  saveData(os, myUseIsectColor);
941  saveData(os, myIsectPolyClr);
942  saveData(os, myUseIsectGrp);
943  saveData(os, myIsectPolyGrp);
944  saveData(os, myFailures);
945  saveData(os, myRandomSeed);
946  saveData(os, myPrecisionTol);
947  saveData(os, myDihedralAngleTol);
948  saveData(os, myMaxAttempts);
949  saveData(os, myUseInvalidColor);
950  saveData(os, myInvalidPrimClr);
951  saveData(os, myUseInvalidGrp);
952  saveData(os, myInvalidPrimGrp);
953 
954  }
955 
956  bool load(UT_IStream &is)
957  {
958  int32 v;
959  is.bread(&v, 1);
960  if (version() != v)
961  {
962  // Fail incompatible versions
963  return false;
964  }
965  loadData(is, myGroup);
966  loadData(is, myBatch);
967  loadData(is, myPieceAttrib);
968  loadData(is, myRemove);
969  loadData(is, myMode);
970  loadData(is, myOutput);
971  loadData(is, myKeepPrims);
972  loadData(is, myNoBoundMod);
973  loadData(is, myOneFacePerTet);
974  loadData(is, myPropNormal);
975  loadData(is, myInternAttrib);
976  loadData(is, myUseQuality);
977  loadData(is, myRadEdgeTol);
978  loadData(is, myMinDihedralAngle);
979  loadData(is, myUseTargetSizeAttrib);
980  loadData(is, myTargetSizeAttrib);
981  loadData(is, myUseUniformMaxSize);
982  loadData(is, myUniformMaxSize);
983  loadData(is, myUseMaxSizeAttrib);
984  loadData(is, myMaxSizeAttrib);
985  loadData(is, myUseMaxIter);
986  loadData(is, myMaxIter);
987  loadData(is, myUseMaxSteiner);
988  loadData(is, myMaxSteiner);
989  loadData(is, myOptIterations);
990  loadData(is, myOptEdgeFace);
991  loadData(is, myOptVtxSmooth);
992  loadData(is, myOptVtxMod);
993  loadData(is, myUseIsectColor);
994  loadData(is, myIsectPolyClr);
995  loadData(is, myUseIsectGrp);
996  loadData(is, myIsectPolyGrp);
997  loadData(is, myFailures);
998  loadData(is, myRandomSeed);
999  loadData(is, myPrecisionTol);
1000  loadData(is, myDihedralAngleTol);
1001  loadData(is, myMaxAttempts);
1002  loadData(is, myUseInvalidColor);
1003  loadData(is, myInvalidPrimClr);
1004  loadData(is, myUseInvalidGrp);
1005  loadData(is, myInvalidPrimGrp);
1006 
1007  return true;
1008  }
1009 
1010  const UT_StringHolder & getGroup() const { return myGroup; }
1011  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1013  {
1014  SOP_Node *thissop = cookparms.getNode();
1015  if (!thissop) return getGroup();
1016  UT_StringHolder result;
1017  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1018  return result;
1019  }
1020  Batch getBatch() const { return Batch(myBatch); }
1021  void setBatch(Batch val) { myBatch = int64(val); }
1022  Batch opBatch(const SOP_NodeVerb::CookParms &cookparms) const
1023  {
1024  SOP_Node *thissop = cookparms.getNode();
1025  if (!thissop) return getBatch();
1026  int64 result;
1027  OP_Utils::evalOpParm(result, thissop, "batch", cookparms.getCookTime(), 0);
1028  return Batch(result);
1029  }
1030  const UT_StringHolder & getPieceAttrib() const { return myPieceAttrib; }
1031  void setPieceAttrib(const UT_StringHolder & val) { myPieceAttrib = val; }
1033  {
1034  SOP_Node *thissop = cookparms.getNode();
1035  if (!thissop) return getPieceAttrib();
1036  UT_StringHolder result;
1037  OP_Utils::evalOpParm(result, thissop, "pieceattrib", cookparms.getCookTime(), 0);
1038  return result;
1039  }
1040  bool getRemove() const { return myRemove; }
1041  void setRemove(bool val) { myRemove = val; }
1042  bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
1043  {
1044  SOP_Node *thissop = cookparms.getNode();
1045  if (!thissop) return getRemove();
1046  bool result;
1047  OP_Utils::evalOpParm(result, thissop, "remove", cookparms.getCookTime(), 0);
1048  return result;
1049  }
1050  Mode getMode() const { return Mode(myMode); }
1051  void setMode(Mode val) { myMode = int64(val); }
1052  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
1053  {
1054  SOP_Node *thissop = cookparms.getNode();
1055  if (!thissop) return getMode();
1056  int64 result;
1057  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
1058  return Mode(result);
1059  }
1060  Output getOutput() const { return Output(myOutput); }
1061  void setOutput(Output val) { myOutput = int64(val); }
1062  Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
1063  {
1064  SOP_Node *thissop = cookparms.getNode();
1065  if (!thissop) return getOutput();
1066  int64 result;
1067  OP_Utils::evalOpParm(result, thissop, "output", cookparms.getCookTime(), 0);
1068  return Output(result);
1069  }
1070  bool getKeepPrims() const { return myKeepPrims; }
1071  void setKeepPrims(bool val) { myKeepPrims = val; }
1072  bool opKeepPrims(const SOP_NodeVerb::CookParms &cookparms) const
1073  {
1074  SOP_Node *thissop = cookparms.getNode();
1075  if (!thissop) return getKeepPrims();
1076  bool result;
1077  OP_Utils::evalOpParm(result, thissop, "keepprims", cookparms.getCookTime(), 0);
1078  return result;
1079  }
1080  bool getNoBoundMod() const { return myNoBoundMod; }
1081  void setNoBoundMod(bool val) { myNoBoundMod = val; }
1082  bool opNoBoundMod(const SOP_NodeVerb::CookParms &cookparms) const
1083  {
1084  SOP_Node *thissop = cookparms.getNode();
1085  if (!thissop) return getNoBoundMod();
1086  bool result;
1087  OP_Utils::evalOpParm(result, thissop, "noboundmod", cookparms.getCookTime(), 0);
1088  return result;
1089  }
1090  bool getOneFacePerTet() const { return myOneFacePerTet; }
1091  void setOneFacePerTet(bool val) { myOneFacePerTet = val; }
1092  bool opOneFacePerTet(const SOP_NodeVerb::CookParms &cookparms) const
1093  {
1094  SOP_Node *thissop = cookparms.getNode();
1095  if (!thissop) return getOneFacePerTet();
1096  bool result;
1097  OP_Utils::evalOpParm(result, thissop, "onefacepertet", cookparms.getCookTime(), 0);
1098  return result;
1099  }
1100  bool getPropNormal() const { return myPropNormal; }
1101  void setPropNormal(bool val) { myPropNormal = val; }
1102  bool opPropNormal(const SOP_NodeVerb::CookParms &cookparms) const
1103  {
1104  SOP_Node *thissop = cookparms.getNode();
1105  if (!thissop) return getPropNormal();
1106  bool result;
1107  OP_Utils::evalOpParm(result, thissop, "propnormal", cookparms.getCookTime(), 0);
1108  return result;
1109  }
1110  bool getInternAttrib() const { return myInternAttrib; }
1111  void setInternAttrib(bool val) { myInternAttrib = val; }
1112  bool opInternAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1113  {
1114  SOP_Node *thissop = cookparms.getNode();
1115  if (!thissop) return getInternAttrib();
1116  bool result;
1117  OP_Utils::evalOpParm(result, thissop, "internattrib", cookparms.getCookTime(), 0);
1118  return result;
1119  }
1120  bool getUseQuality() const { return myUseQuality; }
1121  void setUseQuality(bool val) { myUseQuality = val; }
1122  bool opUseQuality(const SOP_NodeVerb::CookParms &cookparms) const
1123  {
1124  SOP_Node *thissop = cookparms.getNode();
1125  if (!thissop) return getUseQuality();
1126  bool result;
1127  OP_Utils::evalOpParm(result, thissop, "usequality", cookparms.getCookTime(), 0);
1128  return result;
1129  }
1130  fpreal64 getRadEdgeTol() const { return myRadEdgeTol; }
1131  void setRadEdgeTol(fpreal64 val) { myRadEdgeTol = val; }
1133  {
1134  SOP_Node *thissop = cookparms.getNode();
1135  if (!thissop) return getRadEdgeTol();
1136  fpreal64 result;
1137  OP_Utils::evalOpParm(result, thissop, "radedgetol", cookparms.getCookTime(), 0);
1138  return result;
1139  }
1140  fpreal64 getMinDihedralAngle() const { return myMinDihedralAngle; }
1141  void setMinDihedralAngle(fpreal64 val) { myMinDihedralAngle = val; }
1143  {
1144  SOP_Node *thissop = cookparms.getNode();
1145  if (!thissop) return getMinDihedralAngle();
1146  fpreal64 result;
1147  OP_Utils::evalOpParm(result, thissop, "mindihedralang", cookparms.getCookTime(), 0);
1148  return result;
1149  }
1150  bool getUseTargetSizeAttrib() const { return myUseTargetSizeAttrib; }
1151  void setUseTargetSizeAttrib(bool val) { myUseTargetSizeAttrib = val; }
1152  bool opUseTargetSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1153  {
1154  SOP_Node *thissop = cookparms.getNode();
1155  if (!thissop) return getUseTargetSizeAttrib();
1156  bool result;
1157  OP_Utils::evalOpParm(result, thissop, "usetargetsizeattrib", cookparms.getCookTime(), 0);
1158  return result;
1159  }
1160  const UT_StringHolder & getTargetSizeAttrib() const { return myTargetSizeAttrib; }
1161  void setTargetSizeAttrib(const UT_StringHolder & val) { myTargetSizeAttrib = val; }
1163  {
1164  SOP_Node *thissop = cookparms.getNode();
1165  if (!thissop) return getTargetSizeAttrib();
1166  UT_StringHolder result;
1167  OP_Utils::evalOpParm(result, thissop, "targetsizeattrib", cookparms.getCookTime(), 0);
1168  return result;
1169  }
1170  bool getUseUniformMaxSize() const { return myUseUniformMaxSize; }
1171  void setUseUniformMaxSize(bool val) { myUseUniformMaxSize = val; }
1172  bool opUseUniformMaxSize(const SOP_NodeVerb::CookParms &cookparms) const
1173  {
1174  SOP_Node *thissop = cookparms.getNode();
1175  if (!thissop) return getUseUniformMaxSize();
1176  bool result;
1177  OP_Utils::evalOpParm(result, thissop, "useuniformmaxsize", cookparms.getCookTime(), 0);
1178  return result;
1179  }
1180  fpreal64 getUniformMaxSize() const { return myUniformMaxSize; }
1181  void setUniformMaxSize(fpreal64 val) { myUniformMaxSize = val; }
1183  {
1184  SOP_Node *thissop = cookparms.getNode();
1185  if (!thissop) return getUniformMaxSize();
1186  fpreal64 result;
1187  OP_Utils::evalOpParm(result, thissop, "uniformmaxsize", cookparms.getCookTime(), 0);
1188  return result;
1189  }
1190  bool getUseMaxSizeAttrib() const { return myUseMaxSizeAttrib; }
1191  void setUseMaxSizeAttrib(bool val) { myUseMaxSizeAttrib = val; }
1192  bool opUseMaxSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1193  {
1194  SOP_Node *thissop = cookparms.getNode();
1195  if (!thissop) return getUseMaxSizeAttrib();
1196  bool result;
1197  OP_Utils::evalOpParm(result, thissop, "usemaxsizeattrib", cookparms.getCookTime(), 0);
1198  return result;
1199  }
1200  const UT_StringHolder & getMaxSizeAttrib() const { return myMaxSizeAttrib; }
1201  void setMaxSizeAttrib(const UT_StringHolder & val) { myMaxSizeAttrib = val; }
1203  {
1204  SOP_Node *thissop = cookparms.getNode();
1205  if (!thissop) return getMaxSizeAttrib();
1206  UT_StringHolder result;
1207  OP_Utils::evalOpParm(result, thissop, "maxsizeattrib", cookparms.getCookTime(), 0);
1208  return result;
1209  }
1210  bool getUseMaxIter() const { return myUseMaxIter; }
1211  void setUseMaxIter(bool val) { myUseMaxIter = val; }
1212  bool opUseMaxIter(const SOP_NodeVerb::CookParms &cookparms) const
1213  {
1214  SOP_Node *thissop = cookparms.getNode();
1215  if (!thissop) return getUseMaxIter();
1216  bool result;
1217  OP_Utils::evalOpParm(result, thissop, "usemaxiter", cookparms.getCookTime(), 0);
1218  return result;
1219  }
1220  int64 getMaxIter() const { return myMaxIter; }
1221  void setMaxIter(int64 val) { myMaxIter = val; }
1222  int64 opMaxIter(const SOP_NodeVerb::CookParms &cookparms) const
1223  {
1224  SOP_Node *thissop = cookparms.getNode();
1225  if (!thissop) return getMaxIter();
1226  int64 result;
1227  OP_Utils::evalOpParm(result, thissop, "maxiter", cookparms.getCookTime(), 0);
1228  return result;
1229  }
1230  bool getUseMaxSteiner() const { return myUseMaxSteiner; }
1231  void setUseMaxSteiner(bool val) { myUseMaxSteiner = val; }
1232  bool opUseMaxSteiner(const SOP_NodeVerb::CookParms &cookparms) const
1233  {
1234  SOP_Node *thissop = cookparms.getNode();
1235  if (!thissop) return getUseMaxSteiner();
1236  bool result;
1237  OP_Utils::evalOpParm(result, thissop, "usemaxsteiner", cookparms.getCookTime(), 0);
1238  return result;
1239  }
1240  int64 getMaxSteiner() const { return myMaxSteiner; }
1241  void setMaxSteiner(int64 val) { myMaxSteiner = val; }
1243  {
1244  SOP_Node *thissop = cookparms.getNode();
1245  if (!thissop) return getMaxSteiner();
1246  int64 result;
1247  OP_Utils::evalOpParm(result, thissop, "maxsteiner", cookparms.getCookTime(), 0);
1248  return result;
1249  }
1250  int64 getOptIterations() const { return myOptIterations; }
1251  void setOptIterations(int64 val) { myOptIterations = val; }
1253  {
1254  SOP_Node *thissop = cookparms.getNode();
1255  if (!thissop) return getOptIterations();
1256  int64 result;
1257  OP_Utils::evalOpParm(result, thissop, "optiterations", cookparms.getCookTime(), 0);
1258  return result;
1259  }
1260  bool getOptEdgeFace() const { return myOptEdgeFace; }
1261  void setOptEdgeFace(bool val) { myOptEdgeFace = val; }
1262  bool opOptEdgeFace(const SOP_NodeVerb::CookParms &cookparms) const
1263  {
1264  SOP_Node *thissop = cookparms.getNode();
1265  if (!thissop) return getOptEdgeFace();
1266  bool result;
1267  OP_Utils::evalOpParm(result, thissop, "optedgeface", cookparms.getCookTime(), 0);
1268  return result;
1269  }
1270  bool getOptVtxSmooth() const { return myOptVtxSmooth; }
1271  void setOptVtxSmooth(bool val) { myOptVtxSmooth = val; }
1272  bool opOptVtxSmooth(const SOP_NodeVerb::CookParms &cookparms) const
1273  {
1274  SOP_Node *thissop = cookparms.getNode();
1275  if (!thissop) return getOptVtxSmooth();
1276  bool result;
1277  OP_Utils::evalOpParm(result, thissop, "optvtxsmooth", cookparms.getCookTime(), 0);
1278  return result;
1279  }
1280  bool getOptVtxMod() const { return myOptVtxMod; }
1281  void setOptVtxMod(bool val) { myOptVtxMod = val; }
1282  bool opOptVtxMod(const SOP_NodeVerb::CookParms &cookparms) const
1283  {
1284  SOP_Node *thissop = cookparms.getNode();
1285  if (!thissop) return getOptVtxMod();
1286  bool result;
1287  OP_Utils::evalOpParm(result, thissop, "optvtxmod", cookparms.getCookTime(), 0);
1288  return result;
1289  }
1290  bool getUseIsectColor() const { return myUseIsectColor; }
1291  void setUseIsectColor(bool val) { myUseIsectColor = val; }
1292  bool opUseIsectColor(const SOP_NodeVerb::CookParms &cookparms) const
1293  {
1294  SOP_Node *thissop = cookparms.getNode();
1295  if (!thissop) return getUseIsectColor();
1296  bool result;
1297  OP_Utils::evalOpParm(result, thissop, "useisectcolor", cookparms.getCookTime(), 0);
1298  return result;
1299  }
1300  UT_Vector3D getIsectPolyClr() const { return myIsectPolyClr; }
1301  void setIsectPolyClr(UT_Vector3D val) { myIsectPolyClr = val; }
1303  {
1304  SOP_Node *thissop = cookparms.getNode();
1305  if (!thissop) return getIsectPolyClr();
1306  UT_Vector3D result;
1307  OP_Utils::evalOpParm(result, thissop, "isectpolyclr", cookparms.getCookTime(), 0);
1308  return result;
1309  }
1310  bool getUseIsectGrp() const { return myUseIsectGrp; }
1311  void setUseIsectGrp(bool val) { myUseIsectGrp = val; }
1312  bool opUseIsectGrp(const SOP_NodeVerb::CookParms &cookparms) const
1313  {
1314  SOP_Node *thissop = cookparms.getNode();
1315  if (!thissop) return getUseIsectGrp();
1316  bool result;
1317  OP_Utils::evalOpParm(result, thissop, "useisectgrp", cookparms.getCookTime(), 0);
1318  return result;
1319  }
1320  const UT_StringHolder & getIsectPolyGrp() const { return myIsectPolyGrp; }
1321  void setIsectPolyGrp(const UT_StringHolder & val) { myIsectPolyGrp = val; }
1323  {
1324  SOP_Node *thissop = cookparms.getNode();
1325  if (!thissop) return getIsectPolyGrp();
1326  UT_StringHolder result;
1327  OP_Utils::evalOpParm(result, thissop, "isectpolygrp", cookparms.getCookTime(), 0);
1328  return result;
1329  }
1330  Failures getFailures() const { return Failures(myFailures); }
1331  void setFailures(Failures val) { myFailures = int64(val); }
1333  {
1334  SOP_Node *thissop = cookparms.getNode();
1335  if (!thissop) return getFailures();
1336  int64 result;
1337  OP_Utils::evalOpParm(result, thissop, "failures", cookparms.getCookTime(), 0);
1338  return Failures(result);
1339  }
1340  int64 getRandomSeed() const { return myRandomSeed; }
1341  void setRandomSeed(int64 val) { myRandomSeed = val; }
1343  {
1344  SOP_Node *thissop = cookparms.getNode();
1345  if (!thissop) return getRandomSeed();
1346  int64 result;
1347  OP_Utils::evalOpParm(result, thissop, "randomseed", cookparms.getCookTime(), 0);
1348  return result;
1349  }
1350  fpreal64 getPrecisionTol() const { return myPrecisionTol; }
1351  void setPrecisionTol(fpreal64 val) { myPrecisionTol = val; }
1353  {
1354  SOP_Node *thissop = cookparms.getNode();
1355  if (!thissop) return getPrecisionTol();
1356  fpreal64 result;
1357  OP_Utils::evalOpParm(result, thissop, "precisiontol", cookparms.getCookTime(), 0);
1358  return result;
1359  }
1360  fpreal64 getDihedralAngleTol() const { return myDihedralAngleTol; }
1361  void setDihedralAngleTol(fpreal64 val) { myDihedralAngleTol = val; }
1363  {
1364  SOP_Node *thissop = cookparms.getNode();
1365  if (!thissop) return getDihedralAngleTol();
1366  fpreal64 result;
1367  OP_Utils::evalOpParm(result, thissop, "dihedralangtol", cookparms.getCookTime(), 0);
1368  return result;
1369  }
1370  int64 getMaxAttempts() const { return myMaxAttempts; }
1371  void setMaxAttempts(int64 val) { myMaxAttempts = val; }
1373  {
1374  SOP_Node *thissop = cookparms.getNode();
1375  if (!thissop) return getMaxAttempts();
1376  int64 result;
1377  OP_Utils::evalOpParm(result, thissop, "maxattempts", cookparms.getCookTime(), 0);
1378  return result;
1379  }
1380  bool getUseInvalidColor() const { return myUseInvalidColor; }
1381  void setUseInvalidColor(bool val) { myUseInvalidColor = val; }
1382  bool opUseInvalidColor(const SOP_NodeVerb::CookParms &cookparms) const
1383  {
1384  SOP_Node *thissop = cookparms.getNode();
1385  if (!thissop) return getUseInvalidColor();
1386  bool result;
1387  OP_Utils::evalOpParm(result, thissop, "useinvalidcolor", cookparms.getCookTime(), 0);
1388  return result;
1389  }
1390  UT_Vector3D getInvalidPrimClr() const { return myInvalidPrimClr; }
1391  void setInvalidPrimClr(UT_Vector3D val) { myInvalidPrimClr = val; }
1393  {
1394  SOP_Node *thissop = cookparms.getNode();
1395  if (!thissop) return getInvalidPrimClr();
1396  UT_Vector3D result;
1397  OP_Utils::evalOpParm(result, thissop, "invalidprimclr", cookparms.getCookTime(), 0);
1398  return result;
1399  }
1400  bool getUseInvalidGrp() const { return myUseInvalidGrp; }
1401  void setUseInvalidGrp(bool val) { myUseInvalidGrp = val; }
1402  bool opUseInvalidGrp(const SOP_NodeVerb::CookParms &cookparms) const
1403  {
1404  SOP_Node *thissop = cookparms.getNode();
1405  if (!thissop) return getUseInvalidGrp();
1406  bool result;
1407  OP_Utils::evalOpParm(result, thissop, "useinvalidgrp", cookparms.getCookTime(), 0);
1408  return result;
1409  }
1410  const UT_StringHolder & getInvalidPrimGrp() const { return myInvalidPrimGrp; }
1411  void setInvalidPrimGrp(const UT_StringHolder & val) { myInvalidPrimGrp = val; }
1413  {
1414  SOP_Node *thissop = cookparms.getNode();
1415  if (!thissop) return getInvalidPrimGrp();
1416  UT_StringHolder result;
1417  OP_Utils::evalOpParm(result, thissop, "invalidprimgrp", cookparms.getCookTime(), 0);
1418  return result;
1419  }
1420 
1421 private:
1422  UT_StringHolder myGroup;
1423  int64 myBatch;
1424  UT_StringHolder myPieceAttrib;
1425  bool myRemove;
1426  int64 myMode;
1427  int64 myOutput;
1428  bool myKeepPrims;
1429  bool myNoBoundMod;
1430  bool myOneFacePerTet;
1431  bool myPropNormal;
1432  bool myInternAttrib;
1433  bool myUseQuality;
1434  fpreal64 myRadEdgeTol;
1435  fpreal64 myMinDihedralAngle;
1436  bool myUseTargetSizeAttrib;
1437  UT_StringHolder myTargetSizeAttrib;
1438  bool myUseUniformMaxSize;
1439  fpreal64 myUniformMaxSize;
1440  bool myUseMaxSizeAttrib;
1441  UT_StringHolder myMaxSizeAttrib;
1442  bool myUseMaxIter;
1443  int64 myMaxIter;
1444  bool myUseMaxSteiner;
1445  int64 myMaxSteiner;
1446  int64 myOptIterations;
1447  bool myOptEdgeFace;
1448  bool myOptVtxSmooth;
1449  bool myOptVtxMod;
1450  bool myUseIsectColor;
1451  UT_Vector3D myIsectPolyClr;
1452  bool myUseIsectGrp;
1453  UT_StringHolder myIsectPolyGrp;
1454  int64 myFailures;
1455  int64 myRandomSeed;
1456  fpreal64 myPrecisionTol;
1457  fpreal64 myDihedralAngleTol;
1458  int64 myMaxAttempts;
1459  bool myUseInvalidColor;
1460  UT_Vector3D myInvalidPrimClr;
1461  bool myUseInvalidGrp;
1462  UT_StringHolder myInvalidPrimGrp;
1463 
1464 };
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
const UT_StringHolder & getTargetSizeAttrib() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getParmValue(exint idx, exint &value) const
bool opUseTargetSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
T & z(void)
Definition: UT_Vector4.h:379
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal64 opUniformMaxSize(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getInvalidPrimGrp() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setParmValue(exint idx, const UT_Vector4D &value)
void setParmValue(exint idx, const exint &value)
bool opUseIsectGrp(const SOP_NodeVerb::CookParms &cookparms) const
int64 opMaxIter(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, UT_Matrix2D v)
GT_API const UT_StringHolder time
virtual const char * getParmName(exint fieldnum) const
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool opOneFacePerTet(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool opUseIsectColor(const SOP_NodeVerb::CookParms &cookparms) const
int64 opMaxAttempts(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_StringHolder &value)
bool opOptVtxSmooth(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
void setTargetSizeAttrib(const UT_StringHolder &val)
An output stream object that owns its own string buffer storage.
fpreal64 opPrecisionTol(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setParmValue(exint idx, const UT_Vector2D &value)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Vector4D v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
UT_StringHolder opIsectPolyGrp(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
UT_Vector3D opIsectPolyClr(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector2D &value) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal64 opDihedralAngleTol(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(exint idx, const T &value)
fpreal64 opRadEdgeTol(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool opUseInvalidGrp(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool opUseMaxSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setMaxSizeAttrib(const UT_StringHolder &val)
const UT_StringHolder & getIsectPolyGrp() const
UT_Vector3D opInvalidPrimClr(const SOP_NodeVerb::CookParms &cookparms) const
int64 opRandomSeed(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const UT_StringHolder & getPieceAttrib() const
void setGroup(const UT_StringHolder &val)
UT_StringHolder opMaxSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
void getParmValue(exint idx, UT_Matrix3D &value) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
bool opUseInvalidColor(const SOP_NodeVerb::CookParms &cookparms) const
virtual ParmType getParmType(exint fieldnum) const
bool opUseQuality(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, int64 &v)
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
fpreal64 opMinDihedralAngle(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
UT_StringHolder opTargetSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getMaxSizeAttrib() const
int64 exint
Definition: SYS_Types.h:116
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
void getParmValue(exint idx, fpreal &value) const
bool opUseUniformMaxSize(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix2D &value)
bool operator==(const SOP_Tetrahedralize_2_0Parms &src) const
void setPieceAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
virtual void copyFrom(const SOP_NodeParms *src)
UT_Vector3T< fpreal64 > UT_Vector3D
GLboolean * data
Definition: glcorearb.h:130
bool opOptEdgeFace(const SOP_NodeVerb::CookParms &cookparms) const
Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
UT_StringHolder opInvalidPrimGrp(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
bool opKeepPrims(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
bool operator!=(const SOP_Tetrahedralize_2_0Parms &src) const
GT_API const UT_StringHolder version
bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void setParmValue(exint idx, const UT_Vector3D &value)
static void loadData(UT_IStream &is, fpreal64 &v)
bool opOptVtxMod(const SOP_NodeVerb::CookParms &cookparms) const
void setIsectPolyGrp(const UT_StringHolder &val)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
static void saveData(std::ostream &os, UT_StringHolder s)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void setInvalidPrimGrp(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Matrix2D &value) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void loadData(UT_IStream &is, UT_Vector4I &v)
Failures opFailures(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
bool opPropNormal(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix4D &value)
#define SOP_API
Definition: SOP_API.h:10
void setParmValue(exint idx, const fpreal &value)
int64 opMaxSteiner(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
T & x(void)
Definition: UT_Vector4.h:375
Batch opBatch(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseMaxIter(const SOP_NodeVerb::CookParms &cookparms) const
bool opInternAttrib(const SOP_NodeVerb::CookParms &cookparms) const
T & y(void)
Definition: UT_Vector2.h:287
void getParmValue(exint idx, PRM_DataItemHandle &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLboolean r
Definition: glcorearb.h:1221
void getParmValue(exint idx, UT_Vector4D &value) const
void getParmValue(exint idx, UT_Vector3D &value) const
bool opUseMaxSteiner(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
int64 opOptIterations(const SOP_NodeVerb::CookParms &cookparms) const
T & w(void)
Definition: UT_Vector4.h:381
static void loadData(UT_IStream &is, bool &v)
void getParmValue(exint idx, UT_Matrix4D &value) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setParmValue(exint idx, const UT_Matrix3D &value)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE bool isstring() const
bool opNoBoundMod(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(exint idx, T &value) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Matrix3D v)
GLenum src
Definition: glcorearb.h:1792