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