HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_QuadRemesh.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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_QuadRemeshEnums
24 {
25  enum class ResolutionMode
26  {
27  QUAD_COUNT = 0,
28  QUAD_AREA,
29  TOLERANCE,
32  };
33 
35  getToken(ResolutionMode enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case ResolutionMode::QUAD_COUNT: return "quad_count"_sh;
40  case ResolutionMode::QUAD_AREA: return "quad_area"_sh;
41  case ResolutionMode::TOLERANCE: return "tolerance"_sh;
42  case ResolutionMode::RELATIVE_SCALE: return "relative_scale"_sh;
43  case ResolutionMode::ABSOLUTE_SCALE: return "absolute_scale"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class ResolutionSource
49  {
50  AUTO = 0,
52  };
53 
56  {
57  using namespace UT::Literal;
58  switch (enum_value) {
59  case ResolutionSource::AUTO: return "auto"_sh;
60  case ResolutionSource::TRIANGLE_AREA: return "triangle_area"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65  enum class XDirection
66  {
67  POSITIVE = 0,
68  NEGATIVE
69  };
70 
72  getToken(XDirection enum_value)
73  {
74  using namespace UT::Literal;
75  switch (enum_value) {
76  case XDirection::POSITIVE: return "positive"_sh;
77  case XDirection::NEGATIVE: return "negative"_sh;
78  default: UT_ASSERT(false); return ""_sh;
79  }
80  }
81 
82  enum class YDirection
83  {
84  POSITIVE = 0,
85  NEGATIVE
86  };
87 
89  getToken(YDirection enum_value)
90  {
91  using namespace UT::Literal;
92  switch (enum_value) {
93  case YDirection::POSITIVE: return "positive"_sh;
94  case YDirection::NEGATIVE: return "negative"_sh;
95  default: UT_ASSERT(false); return ""_sh;
96  }
97  }
98 
99  enum class ZDirection
100  {
101  POSITIVE = 0,
102  NEGATIVE
103  };
104 
106  getToken(ZDirection enum_value)
107  {
108  using namespace UT::Literal;
109  switch (enum_value) {
110  case ZDirection::POSITIVE: return "positive"_sh;
111  case ZDirection::NEGATIVE: return "negative"_sh;
112  default: UT_ASSERT(false); return ""_sh;
113  }
114  }
115 
116  enum class Output
117  {
118  EXTRACTED_MESH = 0,
121  };
122 
124  getToken(Output enum_value)
125  {
126  using namespace UT::Literal;
127  switch (enum_value) {
128  case Output::EXTRACTED_MESH: return "extracted_mesh"_sh;
129  case Output::GLOBAL_TEXTURE: return "global_texture"_sh;
130  case Output::LOCAL_TEXTURE: return "local_texture"_sh;
131  default: UT_ASSERT(false); return ""_sh;
132  }
133  }
134 
135  enum class Method
136  {
137  UNIFORM = 0,
139  };
140 
142  getToken(Method enum_value)
143  {
144  using namespace UT::Literal;
145  switch (enum_value) {
146  case Method::UNIFORM: return "uniform"_sh;
147  case Method::RECTANGULAR: return "rectangular"_sh;
148  default: UT_ASSERT(false); return ""_sh;
149  }
150  }
151 
152  enum class Field
153  {
154  FACE = 0,
155  EDGE
156  };
157 
159  getToken(Field enum_value)
160  {
161  using namespace UT::Literal;
162  switch (enum_value) {
163  case Field::FACE: return "face"_sh;
164  case Field::EDGE: return "edge"_sh;
165  default: UT_ASSERT(false); return ""_sh;
166  }
167  }
168 
169  enum class BoundaryMode
170  {
171  ADD = 0,
172  OVER
173  };
174 
176  getToken(BoundaryMode enum_value)
177  {
178  using namespace UT::Literal;
179  switch (enum_value) {
180  case BoundaryMode::ADD: return "add"_sh;
181  case BoundaryMode::OVER: return "over"_sh;
182  default: UT_ASSERT(false); return ""_sh;
183  }
184  }
185 
186  enum class GuideMode
187  {
188  ADD = 0,
189  OVER
190  };
191 
193  getToken(GuideMode enum_value)
194  {
195  using namespace UT::Literal;
196  switch (enum_value) {
197  case GuideMode::ADD: return "add"_sh;
198  case GuideMode::OVER: return "over"_sh;
199  default: UT_ASSERT(false); return ""_sh;
200  }
201  }
202 
203 }
204 
205 
207 {
208 public:
209  static int version() { return 1; }
210 
212  {
213  myGroup = ""_UTsh;
214  myResolutionMode = 0;
215  myTargetQuadCount = 10000;
216  myTargetQuadArea = .1;
217  myTargetTolerance = .1;
218  myResolutionScale = 0;
219  myResolutionSource = 0;
220  myTriangleArea = .125;
221  mySymmetryCenter = UT_Vector3D(0,0,0);
222  myXAxis = false;
223  myXDirection = 0;
224  myYAxis = false;
225  myYDirection = 0;
226  myZAxis = false;
227  myZDirection = 0;
228  myMirrorOutput = true;
229  myOutput = 0;
230  myConstrainedEdgesGroup = "constrained"_UTsh;
231  myDecimation = true;
232  myDecimationLevel = 2;
233  myMinQuadCount = 100;
234  myMethod = 0;
235  myUseQuadCover = false;
236  myEnableAdaptivity = true;
237  myAdaptivityWeight = 0.5;
238  myAdaptivityMaskAttrib = ""_UTsh;
239  myAdaptivitySizing = false;
240  myAdaptivitySizingAttrib = ""_UTsh;
241  myFeatureEdges = ""_UTsh;
242  myFeatureBoundaries = true;
243  myGlobalWeight = 0.1;
244  myField = 0;
245  myFieldSmoothingIterations = 10;
246  myHardenGuidesToFeatures = false;
247  myCurvature = true;
248  myLocalCurvatureWeight = 1;
249  myCurvatureMaskAttrib = ""_UTsh;
250  myCurvatureRotation = 0;
251  myBoundary = true;
252  myBoundaryMode = 0;
253  myLocalBoundaryWeight = 1;
254  myBoundaryMaskAttrib = ""_UTsh;
255  myBoundaryRotation = 0;
256  myGuide = false;
257  myGuideMaskAttrib = ""_UTsh;
258  myGuideAttrib = ""_UTsh;
259  myAdaptivitySizingWeight = 1;
260  myGlobalMask = ""_UTsh;
261  myGuideMode = 0;
262  myLocalGuideWeight = 1;
263 
264  }
265 
266  explicit SOP_QuadRemeshParms(const SOP_QuadRemeshParms &) = default;
268  SOP_QuadRemeshParms(SOP_QuadRemeshParms &&) noexcept = default;
269  SOP_QuadRemeshParms &operator=(SOP_QuadRemeshParms &&) noexcept = default;
270 
271  ~SOP_QuadRemeshParms() override {}
272 
273  bool operator==(const SOP_QuadRemeshParms &src) const
274  {
275  if (myGroup != src.myGroup) return false;
276  if (myResolutionMode != src.myResolutionMode) return false;
277  if (myTargetQuadCount != src.myTargetQuadCount) return false;
278  if (myTargetQuadArea != src.myTargetQuadArea) return false;
279  if (myTargetTolerance != src.myTargetTolerance) return false;
280  if (myResolutionScale != src.myResolutionScale) return false;
281  if (myResolutionSource != src.myResolutionSource) return false;
282  if (myTriangleArea != src.myTriangleArea) return false;
283  if (mySymmetryCenter != src.mySymmetryCenter) return false;
284  if (myXAxis != src.myXAxis) return false;
285  if (myXDirection != src.myXDirection) return false;
286  if (myYAxis != src.myYAxis) return false;
287  if (myYDirection != src.myYDirection) return false;
288  if (myZAxis != src.myZAxis) return false;
289  if (myZDirection != src.myZDirection) return false;
290  if (myMirrorOutput != src.myMirrorOutput) return false;
291  if (myOutput != src.myOutput) return false;
292  if (myConstrainedEdgesGroup != src.myConstrainedEdgesGroup) return false;
293  if (myDecimation != src.myDecimation) return false;
294  if (myDecimationLevel != src.myDecimationLevel) return false;
295  if (myMinQuadCount != src.myMinQuadCount) return false;
296  if (myMethod != src.myMethod) return false;
297  if (myUseQuadCover != src.myUseQuadCover) return false;
298  if (myEnableAdaptivity != src.myEnableAdaptivity) return false;
299  if (myAdaptivityWeight != src.myAdaptivityWeight) return false;
300  if (myAdaptivityMaskAttrib != src.myAdaptivityMaskAttrib) return false;
301  if (myAdaptivitySizing != src.myAdaptivitySizing) return false;
302  if (myAdaptivitySizingAttrib != src.myAdaptivitySizingAttrib) return false;
303  if (myFeatureEdges != src.myFeatureEdges) return false;
304  if (myFeatureBoundaries != src.myFeatureBoundaries) return false;
305  if (myGlobalWeight != src.myGlobalWeight) return false;
306  if (myField != src.myField) return false;
307  if (myFieldSmoothingIterations != src.myFieldSmoothingIterations) return false;
308  if (myHardenGuidesToFeatures != src.myHardenGuidesToFeatures) return false;
309  if (myCurvature != src.myCurvature) return false;
310  if (myLocalCurvatureWeight != src.myLocalCurvatureWeight) return false;
311  if (myCurvatureMaskAttrib != src.myCurvatureMaskAttrib) return false;
312  if (myCurvatureRotation != src.myCurvatureRotation) return false;
313  if (myBoundary != src.myBoundary) return false;
314  if (myBoundaryMode != src.myBoundaryMode) return false;
315  if (myLocalBoundaryWeight != src.myLocalBoundaryWeight) return false;
316  if (myBoundaryMaskAttrib != src.myBoundaryMaskAttrib) return false;
317  if (myBoundaryRotation != src.myBoundaryRotation) return false;
318  if (myGuide != src.myGuide) return false;
319  if (myGuideMaskAttrib != src.myGuideMaskAttrib) return false;
320  if (myGuideAttrib != src.myGuideAttrib) return false;
321  if (myAdaptivitySizingWeight != src.myAdaptivitySizingWeight) return false;
322  if (myGlobalMask != src.myGlobalMask) return false;
323  if (myGuideMode != src.myGuideMode) return false;
324  if (myLocalGuideWeight != src.myLocalGuideWeight) return false;
325 
326 
327  if (baseGetSignature() != src.baseGetSignature()) return false;
328 
329  return true;
330  }
331  bool operator!=(const SOP_QuadRemeshParms &src) const
332  {
333  return !operator==(src);
334  }
345 
346 
347 
348  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
349  {
350  myGroup = ""_UTsh;
351  if (true)
352  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
353  myResolutionMode = 0;
354  if (true)
355  graph->evalOpParm(myResolutionMode, nodeidx, "resolution", time, graph->isDirect()?nullptr:depnode);
356  myTargetQuadCount = 10000;
357  if (true && ( (true&&!(((int64(getResolutionMode())!=0)))) ) )
358  graph->evalOpParm(myTargetQuadCount, nodeidx, "targetquadcount", time, graph->isDirect()?nullptr:depnode);
359  myTargetQuadArea = .1;
360  if (true && ( (true&&!(((int64(getResolutionMode())!=1)))) ) )
361  graph->evalOpParm(myTargetQuadArea, nodeidx, "targetquadarea", time, graph->isDirect()?nullptr:depnode);
362  myTargetTolerance = .1;
363  if (true && ( (true&&!(((int64(getResolutionMode())!=2)))) ) )
364  graph->evalOpParm(myTargetTolerance, nodeidx, "targettolerance", time, graph->isDirect()?nullptr:depnode);
365  myResolutionScale = 0;
366  if (true && ( (true&&!(((int64(getResolutionMode())!=4)&&(int64(getResolutionMode())!=3)))) ) )
367  graph->evalOpParm(myResolutionScale, nodeidx, "resolutionscale", time, graph->isDirect()?nullptr:depnode);
368  myResolutionSource = 0;
369  if (true && ( (true&&!(((int64(getResolutionMode())!=4)))) ) )
370  graph->evalOpParm(myResolutionSource, nodeidx, "resolutionsource", time, graph->isDirect()?nullptr:depnode);
371  myTriangleArea = .125;
372  if (true && ( (true&&!(((int64(getResolutionMode())!=4))||((int64(getResolutionSource())!=1)))) ) )
373  graph->evalOpParm(myTriangleArea, nodeidx, "trianglearea", time, graph->isDirect()?nullptr:depnode);
374  mySymmetryCenter = UT_Vector3D(0,0,0);
375  if (true)
376  graph->evalOpParm(mySymmetryCenter, nodeidx, "symmetrycenter", time, graph->isDirect()?nullptr:depnode);
377  myXAxis = false;
378  if (true)
379  graph->evalOpParm(myXAxis, nodeidx, "xaxis", time, graph->isDirect()?nullptr:depnode);
380  myXDirection = 0;
381  if (true)
382  graph->evalOpParm(myXDirection, nodeidx, "xdirection", time, graph->isDirect()?nullptr:depnode);
383  myYAxis = false;
384  if (true)
385  graph->evalOpParm(myYAxis, nodeidx, "yaxis", time, graph->isDirect()?nullptr:depnode);
386  myYDirection = 0;
387  if (true)
388  graph->evalOpParm(myYDirection, nodeidx, "ydirection", time, graph->isDirect()?nullptr:depnode);
389  myZAxis = false;
390  if (true)
391  graph->evalOpParm(myZAxis, nodeidx, "zaxis", time, graph->isDirect()?nullptr:depnode);
392  myZDirection = 0;
393  if (true)
394  graph->evalOpParm(myZDirection, nodeidx, "zdirection", time, graph->isDirect()?nullptr:depnode);
395  myMirrorOutput = true;
396  if (true)
397  graph->evalOpParm(myMirrorOutput, nodeidx, "mirroroutput", time, graph->isDirect()?nullptr:depnode);
398  myOutput = 0;
399  if (true)
400  graph->evalOpParm(myOutput, nodeidx, "output", time, graph->isDirect()?nullptr:depnode);
401  myConstrainedEdgesGroup = "constrained"_UTsh;
402  if (true)
403  graph->evalOpParm(myConstrainedEdgesGroup, nodeidx, "constrainededgesgroup", time, graph->isDirect()?nullptr:depnode);
404  myDecimation = true;
405  if (true)
406  graph->evalOpParm(myDecimation, nodeidx, "decimation", time, graph->isDirect()?nullptr:depnode);
407  myDecimationLevel = 2;
408  if (true && ( (true&&!(((getDecimation()==0)))) ) )
409  graph->evalOpParm(myDecimationLevel, nodeidx, "decimationlevel", time, graph->isDirect()?nullptr:depnode);
410  myMinQuadCount = 100;
411  if (true)
412  graph->evalOpParm(myMinQuadCount, nodeidx, "minquadcount", time, graph->isDirect()?nullptr:depnode);
413  myMethod = 0;
414  if (true)
415  graph->evalOpParm(myMethod, nodeidx, "method", time, graph->isDirect()?nullptr:depnode);
416  myUseQuadCover = false;
417  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
418  graph->evalOpParm(myUseQuadCover, nodeidx, "usesimplestitching", time, graph->isDirect()?nullptr:depnode);
419  myEnableAdaptivity = true;
420  if (true)
421  graph->evalOpParm(myEnableAdaptivity, nodeidx, "enableadaptivity", time, graph->isDirect()?nullptr:depnode);
422  myAdaptivityWeight = 0.5;
423  if (true && ( (true&&!(((getEnableAdaptivity()==0)))) ) )
424  graph->evalOpParm(myAdaptivityWeight, nodeidx, "adaptivityweight", time, graph->isDirect()?nullptr:depnode);
425  myAdaptivityMaskAttrib = ""_UTsh;
426  if (true && ( (true&&!(((getEnableAdaptivity()==0)))) ) )
427  graph->evalOpParm(myAdaptivityMaskAttrib, nodeidx, "adaptivitymaskattrib", time, graph->isDirect()?nullptr:depnode);
428  myAdaptivitySizing = false;
429  if (true && ( (true&&!(((getEnableAdaptivity()==0)))) ) )
430  graph->evalOpParm(myAdaptivitySizing, nodeidx, "adaptivitysizing", time, graph->isDirect()?nullptr:depnode);
431  myAdaptivitySizingAttrib = ""_UTsh;
432  if (true && ( (true&&!(((getAdaptivitySizing()==0))||((getEnableAdaptivity()==0)))) ) )
433  graph->evalOpParm(myAdaptivitySizingAttrib, nodeidx, "adaptivitysizingattrib", time, graph->isDirect()?nullptr:depnode);
434  myFeatureEdges = ""_UTsh;
435  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
436  graph->evalOpParm(myFeatureEdges, nodeidx, "featuredges", time, graph->isDirect()?nullptr:depnode);
437  myFeatureBoundaries = true;
438  if (true)
439  graph->evalOpParm(myFeatureBoundaries, nodeidx, "featureboundaries", time, graph->isDirect()?nullptr:depnode);
440  myGlobalWeight = 0.1;
441  if (true)
442  graph->evalOpParm(myGlobalWeight, nodeidx, "globalweight", time, graph->isDirect()?nullptr:depnode);
443  myField = 0;
444  if (true)
445  graph->evalOpParm(myField, nodeidx, "field", time, graph->isDirect()?nullptr:depnode);
446  myFieldSmoothingIterations = 10;
447  if (true && ( (true&&!(((int64(getField())==1)))) ) )
448  graph->evalOpParm(myFieldSmoothingIterations, nodeidx, "fieldsmoothingiterations", time, graph->isDirect()?nullptr:depnode);
449  myHardenGuidesToFeatures = false;
450  if (true && ( (true&&!(((int64(getField())==1)))) ) )
451  graph->evalOpParm(myHardenGuidesToFeatures, nodeidx, "hardenguidestofeatures", time, graph->isDirect()?nullptr:depnode);
452  myCurvature = true;
453  if (true && ( (true&&!(((int64(getField())==1)))) ) )
454  graph->evalOpParm(myCurvature, nodeidx, "curvature", time, graph->isDirect()?nullptr:depnode);
455  myLocalCurvatureWeight = 1;
456  if (true && ( (true&&!(((int64(getField())==1))||((getCurvature()==0)))) ) )
457  graph->evalOpParm(myLocalCurvatureWeight, nodeidx, "localcurvatureweight", time, graph->isDirect()?nullptr:depnode);
458  myCurvatureMaskAttrib = ""_UTsh;
459  if (true && ( (true&&!(((int64(getField())==1))||((getCurvature()==0)))) ) )
460  graph->evalOpParm(myCurvatureMaskAttrib, nodeidx, "curvaturemaskattrib", time, graph->isDirect()?nullptr:depnode);
461  myCurvatureRotation = 0;
462  if (true && ( (true&&!(((int64(getField())==1))||((getCurvature()==0)))) ) )
463  graph->evalOpParm(myCurvatureRotation, nodeidx, "curvaturerotation", time, graph->isDirect()?nullptr:depnode);
464  myBoundary = true;
465  if (true && ( (true&&!(((int64(getField())==1)))) ) )
466  graph->evalOpParm(myBoundary, nodeidx, "boundary", time, graph->isDirect()?nullptr:depnode);
467  myBoundaryMode = 0;
468  if (true && ( (true&&!(((int64(getField())==1))||((getBoundary()==0)))) ) )
469  graph->evalOpParm(myBoundaryMode, nodeidx, "boundarymode", time, graph->isDirect()?nullptr:depnode);
470  myLocalBoundaryWeight = 1;
471  if (true && ( (true&&!(((int64(getField())==1))||((getBoundary()==0)))) ) )
472  graph->evalOpParm(myLocalBoundaryWeight, nodeidx, "localboundaryweight", time, graph->isDirect()?nullptr:depnode);
473  myBoundaryMaskAttrib = ""_UTsh;
474  if (true && ( (true&&!(((int64(getField())==1))||((getBoundary()==0)))) ) )
475  graph->evalOpParm(myBoundaryMaskAttrib, nodeidx, "boundarymaskattrib", time, graph->isDirect()?nullptr:depnode);
476  myBoundaryRotation = 0;
477  if (true && ( (true&&!(((int64(getField())==1))||((getBoundary()==0)))) ) )
478  graph->evalOpParm(myBoundaryRotation, nodeidx, "boundaryrotation", time, graph->isDirect()?nullptr:depnode);
479  myGuide = false;
480  if (true && ( (true&&!(((int64(getField())==1)))) ) )
481  graph->evalOpParm(myGuide, nodeidx, "guide", time, graph->isDirect()?nullptr:depnode);
482  myGuideMaskAttrib = ""_UTsh;
483  if (true && ( (true&&!(((int64(getField())==1))||((getGuide()==0)))) ) )
484  graph->evalOpParm(myGuideMaskAttrib, nodeidx, "guidemaskattrib", time, graph->isDirect()?nullptr:depnode);
485  myGuideAttrib = ""_UTsh;
486  if (true && ( (true&&!(((int64(getField())==1))||((getGuide()==0)))) ) )
487  graph->evalOpParm(myGuideAttrib, nodeidx, "guideattrib", time, graph->isDirect()?nullptr:depnode);
488  myAdaptivitySizingWeight = 1;
489  if (true && ( (true&&!(((getAdaptivitySizing()==0))||((getEnableAdaptivity()==0))||((getAdaptivitySizingAttrib()=="")))) ) )
490  graph->evalOpParm(myAdaptivitySizingWeight, nodeidx, "adaptivitysizingweight", time, graph->isDirect()?nullptr:depnode);
491  myGlobalMask = ""_UTsh;
492  if (true && ( (true&&!(((int64(getField())==1)))) ) )
493  graph->evalOpParm(myGlobalMask, nodeidx, "globalmask", time, graph->isDirect()?nullptr:depnode);
494  myGuideMode = 0;
495  if (true && ( (true&&!(((int64(getField())==1))||((getGuide()==0))||((getGuideAttrib()=="")))) ) )
496  graph->evalOpParm(myGuideMode, nodeidx, "guidemode", time, graph->isDirect()?nullptr:depnode);
497  myLocalGuideWeight = 1;
498  if (true && ( (true&&!(((int64(getField())==1))||((getGuide()==0))||((getGuideAttrib()=="")))) ) )
499  graph->evalOpParm(myLocalGuideWeight, nodeidx, "localguideweight", time, graph->isDirect()?nullptr:depnode);
500 
501  }
502 
503 
504  void loadFromOpSubclass(const LoadParms &loadparms) override
505  {
506  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
507  }
508 
509 
510  void copyFrom(const OP_NodeParms *src) override
511  {
512  *this = *((const SOP_QuadRemeshParms *)src);
513  }
514 
515  template <typename T>
516  void
517  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
518  {
519  if (idx.size() < 1)
520  return;
521  UT_ASSERT(idx.size() == instance.size()+1);
522  if (idx.size() != instance.size()+1)
523  return;
524  switch (idx[0])
525  {
526  case 0:
527  coerceValue(value, myGroup);
528  break;
529  case 1:
530  coerceValue(value, myResolutionMode);
531  break;
532  case 2:
533  coerceValue(value, myTargetQuadCount);
534  break;
535  case 3:
536  coerceValue(value, myTargetQuadArea);
537  break;
538  case 4:
539  coerceValue(value, myTargetTolerance);
540  break;
541  case 5:
542  coerceValue(value, myResolutionScale);
543  break;
544  case 6:
545  coerceValue(value, myResolutionSource);
546  break;
547  case 7:
548  coerceValue(value, myTriangleArea);
549  break;
550  case 8:
551  coerceValue(value, mySymmetryCenter);
552  break;
553  case 9:
554  coerceValue(value, myXAxis);
555  break;
556  case 10:
557  coerceValue(value, myXDirection);
558  break;
559  case 11:
560  coerceValue(value, myYAxis);
561  break;
562  case 12:
563  coerceValue(value, myYDirection);
564  break;
565  case 13:
566  coerceValue(value, myZAxis);
567  break;
568  case 14:
569  coerceValue(value, myZDirection);
570  break;
571  case 15:
572  coerceValue(value, myMirrorOutput);
573  break;
574  case 16:
575  coerceValue(value, myOutput);
576  break;
577  case 17:
578  coerceValue(value, myConstrainedEdgesGroup);
579  break;
580  case 18:
581  coerceValue(value, myDecimation);
582  break;
583  case 19:
584  coerceValue(value, myDecimationLevel);
585  break;
586  case 20:
587  coerceValue(value, myMinQuadCount);
588  break;
589  case 21:
590  coerceValue(value, myMethod);
591  break;
592  case 22:
593  coerceValue(value, myUseQuadCover);
594  break;
595  case 23:
596  coerceValue(value, myEnableAdaptivity);
597  break;
598  case 24:
599  coerceValue(value, myAdaptivityWeight);
600  break;
601  case 25:
602  coerceValue(value, myAdaptivityMaskAttrib);
603  break;
604  case 26:
605  coerceValue(value, myAdaptivitySizing);
606  break;
607  case 27:
608  coerceValue(value, myAdaptivitySizingAttrib);
609  break;
610  case 28:
611  coerceValue(value, myFeatureEdges);
612  break;
613  case 29:
614  coerceValue(value, myFeatureBoundaries);
615  break;
616  case 30:
617  coerceValue(value, myGlobalWeight);
618  break;
619  case 31:
620  coerceValue(value, myField);
621  break;
622  case 32:
623  coerceValue(value, myFieldSmoothingIterations);
624  break;
625  case 33:
626  coerceValue(value, myHardenGuidesToFeatures);
627  break;
628  case 34:
629  coerceValue(value, myCurvature);
630  break;
631  case 35:
632  coerceValue(value, myLocalCurvatureWeight);
633  break;
634  case 36:
635  coerceValue(value, myCurvatureMaskAttrib);
636  break;
637  case 37:
638  coerceValue(value, myCurvatureRotation);
639  break;
640  case 38:
641  coerceValue(value, myBoundary);
642  break;
643  case 39:
644  coerceValue(value, myBoundaryMode);
645  break;
646  case 40:
647  coerceValue(value, myLocalBoundaryWeight);
648  break;
649  case 41:
650  coerceValue(value, myBoundaryMaskAttrib);
651  break;
652  case 42:
653  coerceValue(value, myBoundaryRotation);
654  break;
655  case 43:
656  coerceValue(value, myGuide);
657  break;
658  case 44:
659  coerceValue(value, myGuideMaskAttrib);
660  break;
661  case 45:
662  coerceValue(value, myGuideAttrib);
663  break;
664  case 46:
665  coerceValue(value, myAdaptivitySizingWeight);
666  break;
667  case 47:
668  coerceValue(value, myGlobalMask);
669  break;
670  case 48:
671  coerceValue(value, myGuideMode);
672  break;
673  case 49:
674  coerceValue(value, myLocalGuideWeight);
675  break;
676 
677  }
678  }
679 
680  bool isParmColorRamp(exint idx) const override
681  {
682  switch (idx)
683  {
684 
685  }
686  return false;
687  }
688 
689  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
690  { doGetParmValue(idx, instance, value); }
691  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
692  { doGetParmValue(idx, instance, value); }
693  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
694  { doGetParmValue(idx, instance, value); }
695  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
696  { doGetParmValue(idx, instance, value); }
697  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
698  { doGetParmValue(idx, instance, value); }
699  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
700  { doGetParmValue(idx, instance, value); }
701  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
702  { doGetParmValue(idx, instance, value); }
703  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
704  { doGetParmValue(idx, instance, value); }
705  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
706  { doGetParmValue(idx, instance, value); }
707  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
708  { doGetParmValue(idx, instance, value); }
709  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
710  { doGetParmValue(idx, instance, value); }
711 
712  template <typename T>
713  void
714  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
715  {
716  if (idx.size() < 1)
717  return;
718  UT_ASSERT(idx.size() == instance.size()+1);
719  if (idx.size() != instance.size()+1)
720  return;
721  switch (idx[0])
722  {
723  case 0:
724  coerceValue(myGroup, ( ( value ) ));
725  break;
726  case 1:
727  coerceValue(myResolutionMode, clampMinValue(0, clampMaxValue(4, value ) ));
728  break;
729  case 2:
730  coerceValue(myTargetQuadCount, clampMinValue(1, ( value ) ));
731  break;
732  case 3:
733  coerceValue(myTargetQuadArea, clampMinValue(0, ( value ) ));
734  break;
735  case 4:
736  coerceValue(myTargetTolerance, clampMinValue(0, ( value ) ));
737  break;
738  case 5:
739  coerceValue(myResolutionScale, ( ( value ) ));
740  break;
741  case 6:
742  coerceValue(myResolutionSource, clampMinValue(0, clampMaxValue(1, value ) ));
743  break;
744  case 7:
745  coerceValue(myTriangleArea, ( ( value ) ));
746  break;
747  case 8:
748  coerceValue(mySymmetryCenter, ( ( value ) ));
749  break;
750  case 9:
751  coerceValue(myXAxis, ( ( value ) ));
752  break;
753  case 10:
754  coerceValue(myXDirection, clampMinValue(0, clampMaxValue(1, value ) ));
755  break;
756  case 11:
757  coerceValue(myYAxis, ( ( value ) ));
758  break;
759  case 12:
760  coerceValue(myYDirection, clampMinValue(0, clampMaxValue(1, value ) ));
761  break;
762  case 13:
763  coerceValue(myZAxis, ( ( value ) ));
764  break;
765  case 14:
766  coerceValue(myZDirection, clampMinValue(0, clampMaxValue(1, value ) ));
767  break;
768  case 15:
769  coerceValue(myMirrorOutput, ( ( value ) ));
770  break;
771  case 16:
772  coerceValue(myOutput, clampMinValue(0, clampMaxValue(2, value ) ));
773  break;
774  case 17:
775  coerceValue(myConstrainedEdgesGroup, ( ( value ) ));
776  break;
777  case 18:
778  coerceValue(myDecimation, ( ( value ) ));
779  break;
780  case 19:
781  coerceValue(myDecimationLevel, clampMinValue(1, clampMaxValue(12, value ) ));
782  break;
783  case 20:
784  coerceValue(myMinQuadCount, clampMinValue(1, ( value ) ));
785  break;
786  case 21:
787  coerceValue(myMethod, clampMinValue(0, clampMaxValue(1, value ) ));
788  break;
789  case 22:
790  coerceValue(myUseQuadCover, ( ( value ) ));
791  break;
792  case 23:
793  coerceValue(myEnableAdaptivity, ( ( value ) ));
794  break;
795  case 24:
796  coerceValue(myAdaptivityWeight, clampMinValue(0, ( value ) ));
797  break;
798  case 25:
799  coerceValue(myAdaptivityMaskAttrib, ( ( value ) ));
800  break;
801  case 26:
802  coerceValue(myAdaptivitySizing, ( ( value ) ));
803  break;
804  case 27:
805  coerceValue(myAdaptivitySizingAttrib, ( ( value ) ));
806  break;
807  case 28:
808  coerceValue(myFeatureEdges, ( ( value ) ));
809  break;
810  case 29:
811  coerceValue(myFeatureBoundaries, ( ( value ) ));
812  break;
813  case 30:
814  coerceValue(myGlobalWeight, clampMinValue(0, ( value ) ));
815  break;
816  case 31:
817  coerceValue(myField, clampMinValue(0, clampMaxValue(1, value ) ));
818  break;
819  case 32:
820  coerceValue(myFieldSmoothingIterations, clampMinValue(0, ( value ) ));
821  break;
822  case 33:
823  coerceValue(myHardenGuidesToFeatures, ( ( value ) ));
824  break;
825  case 34:
826  coerceValue(myCurvature, ( ( value ) ));
827  break;
828  case 35:
829  coerceValue(myLocalCurvatureWeight, clampMinValue(0, ( value ) ));
830  break;
831  case 36:
832  coerceValue(myCurvatureMaskAttrib, ( ( value ) ));
833  break;
834  case 37:
835  coerceValue(myCurvatureRotation, ( ( value ) ));
836  break;
837  case 38:
838  coerceValue(myBoundary, ( ( value ) ));
839  break;
840  case 39:
841  coerceValue(myBoundaryMode, clampMinValue(0, clampMaxValue(1, value ) ));
842  break;
843  case 40:
844  coerceValue(myLocalBoundaryWeight, clampMinValue(0, ( value ) ));
845  break;
846  case 41:
847  coerceValue(myBoundaryMaskAttrib, ( ( value ) ));
848  break;
849  case 42:
850  coerceValue(myBoundaryRotation, ( ( value ) ));
851  break;
852  case 43:
853  coerceValue(myGuide, ( ( value ) ));
854  break;
855  case 44:
856  coerceValue(myGuideMaskAttrib, ( ( value ) ));
857  break;
858  case 45:
859  coerceValue(myGuideAttrib, ( ( value ) ));
860  break;
861  case 46:
862  coerceValue(myAdaptivitySizingWeight, clampMinValue(0, ( value ) ));
863  break;
864  case 47:
865  coerceValue(myGlobalMask, ( ( value ) ));
866  break;
867  case 48:
868  coerceValue(myGuideMode, clampMinValue(0, clampMaxValue(1, value ) ));
869  break;
870  case 49:
871  coerceValue(myLocalGuideWeight, clampMinValue(0, ( value ) ));
872  break;
873 
874  }
875  }
876 
877  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
878  { doSetParmValue(idx, instance, value); }
879  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
880  { doSetParmValue(idx, instance, value); }
881  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
882  { doSetParmValue(idx, instance, value); }
883  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
884  { doSetParmValue(idx, instance, value); }
885  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
886  { doSetParmValue(idx, instance, value); }
887  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
888  { doSetParmValue(idx, instance, value); }
889  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
890  { doSetParmValue(idx, instance, value); }
891  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
892  { doSetParmValue(idx, instance, value); }
893  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
894  { doSetParmValue(idx, instance, value); }
895  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
896  { doSetParmValue(idx, instance, value); }
897  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
898  { doSetParmValue(idx, instance, value); }
899 
900  exint getNestNumParms(TempIndex idx) const override
901  {
902  if (idx.size() == 0)
903  return 50;
904  switch (idx[0])
905  {
906 
907  }
908  // Invalid
909  return 0;
910  }
911 
912  const char *getNestParmName(TempIndex fieldnum) const override
913  {
914  if (fieldnum.size() < 1)
915  return 0;
916  switch (fieldnum[0])
917  {
918  case 0:
919  return "group";
920  case 1:
921  return "resolution";
922  case 2:
923  return "targetquadcount";
924  case 3:
925  return "targetquadarea";
926  case 4:
927  return "targettolerance";
928  case 5:
929  return "resolutionscale";
930  case 6:
931  return "resolutionsource";
932  case 7:
933  return "trianglearea";
934  case 8:
935  return "symmetrycenter";
936  case 9:
937  return "xaxis";
938  case 10:
939  return "xdirection";
940  case 11:
941  return "yaxis";
942  case 12:
943  return "ydirection";
944  case 13:
945  return "zaxis";
946  case 14:
947  return "zdirection";
948  case 15:
949  return "mirroroutput";
950  case 16:
951  return "output";
952  case 17:
953  return "constrainededgesgroup";
954  case 18:
955  return "decimation";
956  case 19:
957  return "decimationlevel";
958  case 20:
959  return "minquadcount";
960  case 21:
961  return "method";
962  case 22:
963  return "usesimplestitching";
964  case 23:
965  return "enableadaptivity";
966  case 24:
967  return "adaptivityweight";
968  case 25:
969  return "adaptivitymaskattrib";
970  case 26:
971  return "adaptivitysizing";
972  case 27:
973  return "adaptivitysizingattrib";
974  case 28:
975  return "featuredges";
976  case 29:
977  return "featureboundaries";
978  case 30:
979  return "globalweight";
980  case 31:
981  return "field";
982  case 32:
983  return "fieldsmoothingiterations";
984  case 33:
985  return "hardenguidestofeatures";
986  case 34:
987  return "curvature";
988  case 35:
989  return "localcurvatureweight";
990  case 36:
991  return "curvaturemaskattrib";
992  case 37:
993  return "curvaturerotation";
994  case 38:
995  return "boundary";
996  case 39:
997  return "boundarymode";
998  case 40:
999  return "localboundaryweight";
1000  case 41:
1001  return "boundarymaskattrib";
1002  case 42:
1003  return "boundaryrotation";
1004  case 43:
1005  return "guide";
1006  case 44:
1007  return "guidemaskattrib";
1008  case 45:
1009  return "guideattrib";
1010  case 46:
1011  return "adaptivitysizingweight";
1012  case 47:
1013  return "globalmask";
1014  case 48:
1015  return "guidemode";
1016  case 49:
1017  return "localguideweight";
1018 
1019  }
1020  return 0;
1021  }
1022 
1023  ParmType getNestParmType(TempIndex fieldnum) const override
1024  {
1025  if (fieldnum.size() < 1)
1026  return PARM_UNSUPPORTED;
1027  switch (fieldnum[0])
1028  {
1029  case 0:
1030  return PARM_STRING;
1031  case 1:
1032  return PARM_INTEGER;
1033  case 2:
1034  return PARM_INTEGER;
1035  case 3:
1036  return PARM_FLOAT;
1037  case 4:
1038  return PARM_FLOAT;
1039  case 5:
1040  return PARM_INTEGER;
1041  case 6:
1042  return PARM_INTEGER;
1043  case 7:
1044  return PARM_FLOAT;
1045  case 8:
1046  return PARM_VECTOR3;
1047  case 9:
1048  return PARM_INTEGER;
1049  case 10:
1050  return PARM_INTEGER;
1051  case 11:
1052  return PARM_INTEGER;
1053  case 12:
1054  return PARM_INTEGER;
1055  case 13:
1056  return PARM_INTEGER;
1057  case 14:
1058  return PARM_INTEGER;
1059  case 15:
1060  return PARM_INTEGER;
1061  case 16:
1062  return PARM_INTEGER;
1063  case 17:
1064  return PARM_STRING;
1065  case 18:
1066  return PARM_INTEGER;
1067  case 19:
1068  return PARM_INTEGER;
1069  case 20:
1070  return PARM_INTEGER;
1071  case 21:
1072  return PARM_INTEGER;
1073  case 22:
1074  return PARM_INTEGER;
1075  case 23:
1076  return PARM_INTEGER;
1077  case 24:
1078  return PARM_FLOAT;
1079  case 25:
1080  return PARM_STRING;
1081  case 26:
1082  return PARM_INTEGER;
1083  case 27:
1084  return PARM_STRING;
1085  case 28:
1086  return PARM_STRING;
1087  case 29:
1088  return PARM_INTEGER;
1089  case 30:
1090  return PARM_FLOAT;
1091  case 31:
1092  return PARM_INTEGER;
1093  case 32:
1094  return PARM_INTEGER;
1095  case 33:
1096  return PARM_INTEGER;
1097  case 34:
1098  return PARM_INTEGER;
1099  case 35:
1100  return PARM_FLOAT;
1101  case 36:
1102  return PARM_STRING;
1103  case 37:
1104  return PARM_FLOAT;
1105  case 38:
1106  return PARM_INTEGER;
1107  case 39:
1108  return PARM_INTEGER;
1109  case 40:
1110  return PARM_FLOAT;
1111  case 41:
1112  return PARM_STRING;
1113  case 42:
1114  return PARM_FLOAT;
1115  case 43:
1116  return PARM_INTEGER;
1117  case 44:
1118  return PARM_STRING;
1119  case 45:
1120  return PARM_STRING;
1121  case 46:
1122  return PARM_FLOAT;
1123  case 47:
1124  return PARM_STRING;
1125  case 48:
1126  return PARM_INTEGER;
1127  case 49:
1128  return PARM_FLOAT;
1129 
1130  }
1131  return PARM_UNSUPPORTED;
1132  }
1133 
1134  // Boiler plate to load individual types.
1135  static void loadData(UT_IStream &is, int64 &v)
1136  { is.bread(&v, 1); }
1137  static void loadData(UT_IStream &is, bool &v)
1138  { int64 iv; is.bread(&iv, 1); v = iv; }
1139  static void loadData(UT_IStream &is, fpreal64 &v)
1140  { is.bread<fpreal64>(&v, 1); }
1141  static void loadData(UT_IStream &is, UT_Vector2D &v)
1142  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1143  static void loadData(UT_IStream &is, UT_Vector3D &v)
1144  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1145  is.bread<fpreal64>(&v.z(), 1); }
1146  static void loadData(UT_IStream &is, UT_Vector4D &v)
1147  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1148  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1149  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1150  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1151  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1152  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1153  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1154  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1155  static void loadData(UT_IStream &is, UT_Vector2I &v)
1156  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1157  static void loadData(UT_IStream &is, UT_Vector3I &v)
1158  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1159  is.bread<int64>(&v.z(), 1); }
1160  static void loadData(UT_IStream &is, UT_Vector4I &v)
1161  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1162  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1164  { is.bread(v); }
1166  { UT_StringHolder rampdata;
1167  loadData(is, rampdata);
1168  if (rampdata.isstring())
1169  {
1170  v.reset(new UT_Ramp());
1171  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1172  v->load(istr);
1173  }
1174  else v.reset();
1175  }
1178  loadData(is, data);
1179  if (data.isstring())
1180  {
1181  // Find the data type.
1182  const char *colon = UT_StringWrap(data).findChar(':');
1183  if (colon)
1184  {
1185  int typelen = colon - data.buffer();
1187  type.strncpy(data.buffer(), typelen);
1188  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1189 
1190  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1191  }
1192  }
1193  else v.reset();
1194  }
1195 
1196  static void saveData(std::ostream &os, int64 v)
1197  { UTwrite(os, &v); }
1198  static void saveData(std::ostream &os, bool v)
1199  { int64 iv = v; UTwrite(os, &iv); }
1200  static void saveData(std::ostream &os, fpreal64 v)
1201  { UTwrite<fpreal64>(os, &v); }
1202  static void saveData(std::ostream &os, UT_Vector2D v)
1203  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1204  static void saveData(std::ostream &os, UT_Vector3D v)
1205  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1206  UTwrite<fpreal64>(os, &v.z()); }
1207  static void saveData(std::ostream &os, UT_Vector4D v)
1208  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1209  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1210  static void saveData(std::ostream &os, UT_Matrix2D v)
1212  static void saveData(std::ostream &os, UT_Matrix3D v)
1214  static void saveData(std::ostream &os, UT_Matrix4D v)
1216  static void saveData(std::ostream &os, UT_StringHolder s)
1217  { UT_StringWrap(s).saveBinary(os); }
1218  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1220  UT_OStringStream ostr;
1221  if (s) s->save(ostr);
1222  result = ostr.str();
1223  saveData(os, result);
1224  }
1225  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1227  UT_OStringStream ostr;
1228  if (s)
1229  {
1230  ostr << s->getDataTypeToken();
1231  ostr << ":";
1232  s->saveBinary(ostr);
1233  }
1234  result = ostr.str();
1235  saveData(os, result);
1236  }
1237 
1238 
1239  void save(std::ostream &os) const
1240  {
1241  int32 v = version();
1242  UTwrite(os, &v);
1243  saveData(os, myGroup);
1244  saveData(os, myResolutionMode);
1245  saveData(os, myTargetQuadCount);
1246  saveData(os, myTargetQuadArea);
1247  saveData(os, myTargetTolerance);
1248  saveData(os, myResolutionScale);
1249  saveData(os, myResolutionSource);
1250  saveData(os, myTriangleArea);
1251  saveData(os, mySymmetryCenter);
1252  saveData(os, myXAxis);
1253  saveData(os, myXDirection);
1254  saveData(os, myYAxis);
1255  saveData(os, myYDirection);
1256  saveData(os, myZAxis);
1257  saveData(os, myZDirection);
1258  saveData(os, myMirrorOutput);
1259  saveData(os, myOutput);
1260  saveData(os, myConstrainedEdgesGroup);
1261  saveData(os, myDecimation);
1262  saveData(os, myDecimationLevel);
1263  saveData(os, myMinQuadCount);
1264  saveData(os, myMethod);
1265  saveData(os, myUseQuadCover);
1266  saveData(os, myEnableAdaptivity);
1267  saveData(os, myAdaptivityWeight);
1268  saveData(os, myAdaptivityMaskAttrib);
1269  saveData(os, myAdaptivitySizing);
1270  saveData(os, myAdaptivitySizingAttrib);
1271  saveData(os, myFeatureEdges);
1272  saveData(os, myFeatureBoundaries);
1273  saveData(os, myGlobalWeight);
1274  saveData(os, myField);
1275  saveData(os, myFieldSmoothingIterations);
1276  saveData(os, myHardenGuidesToFeatures);
1277  saveData(os, myCurvature);
1278  saveData(os, myLocalCurvatureWeight);
1279  saveData(os, myCurvatureMaskAttrib);
1280  saveData(os, myCurvatureRotation);
1281  saveData(os, myBoundary);
1282  saveData(os, myBoundaryMode);
1283  saveData(os, myLocalBoundaryWeight);
1284  saveData(os, myBoundaryMaskAttrib);
1285  saveData(os, myBoundaryRotation);
1286  saveData(os, myGuide);
1287  saveData(os, myGuideMaskAttrib);
1288  saveData(os, myGuideAttrib);
1289  saveData(os, myAdaptivitySizingWeight);
1290  saveData(os, myGlobalMask);
1291  saveData(os, myGuideMode);
1292  saveData(os, myLocalGuideWeight);
1293 
1294  }
1295 
1296  bool load(UT_IStream &is)
1297  {
1298  int32 v;
1299  is.bread(&v, 1);
1300  if (version() != v)
1301  {
1302  // Fail incompatible versions
1303  return false;
1304  }
1305  loadData(is, myGroup);
1306  loadData(is, myResolutionMode);
1307  loadData(is, myTargetQuadCount);
1308  loadData(is, myTargetQuadArea);
1309  loadData(is, myTargetTolerance);
1310  loadData(is, myResolutionScale);
1311  loadData(is, myResolutionSource);
1312  loadData(is, myTriangleArea);
1313  loadData(is, mySymmetryCenter);
1314  loadData(is, myXAxis);
1315  loadData(is, myXDirection);
1316  loadData(is, myYAxis);
1317  loadData(is, myYDirection);
1318  loadData(is, myZAxis);
1319  loadData(is, myZDirection);
1320  loadData(is, myMirrorOutput);
1321  loadData(is, myOutput);
1322  loadData(is, myConstrainedEdgesGroup);
1323  loadData(is, myDecimation);
1324  loadData(is, myDecimationLevel);
1325  loadData(is, myMinQuadCount);
1326  loadData(is, myMethod);
1327  loadData(is, myUseQuadCover);
1328  loadData(is, myEnableAdaptivity);
1329  loadData(is, myAdaptivityWeight);
1330  loadData(is, myAdaptivityMaskAttrib);
1331  loadData(is, myAdaptivitySizing);
1332  loadData(is, myAdaptivitySizingAttrib);
1333  loadData(is, myFeatureEdges);
1334  loadData(is, myFeatureBoundaries);
1335  loadData(is, myGlobalWeight);
1336  loadData(is, myField);
1337  loadData(is, myFieldSmoothingIterations);
1338  loadData(is, myHardenGuidesToFeatures);
1339  loadData(is, myCurvature);
1340  loadData(is, myLocalCurvatureWeight);
1341  loadData(is, myCurvatureMaskAttrib);
1342  loadData(is, myCurvatureRotation);
1343  loadData(is, myBoundary);
1344  loadData(is, myBoundaryMode);
1345  loadData(is, myLocalBoundaryWeight);
1346  loadData(is, myBoundaryMaskAttrib);
1347  loadData(is, myBoundaryRotation);
1348  loadData(is, myGuide);
1349  loadData(is, myGuideMaskAttrib);
1350  loadData(is, myGuideAttrib);
1351  loadData(is, myAdaptivitySizingWeight);
1352  loadData(is, myGlobalMask);
1353  loadData(is, myGuideMode);
1354  loadData(is, myLocalGuideWeight);
1355 
1356  return true;
1357  }
1358 
1359  const UT_StringHolder & getGroup() const { return myGroup; }
1360  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1362  {
1363  SOP_Node *thissop = cookparms.getNode();
1364  if (!thissop) return getGroup();
1366  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1367  return result;
1368  }
1369  ResolutionMode getResolutionMode() const { return ResolutionMode(myResolutionMode); }
1370  void setResolutionMode(ResolutionMode val) { myResolutionMode = int64(val); }
1372  {
1373  SOP_Node *thissop = cookparms.getNode();
1374  if (!thissop) return getResolutionMode();
1375  int64 result;
1376  OP_Utils::evalOpParm(result, thissop, "resolution", cookparms.getCookTime(), 0);
1377  return ResolutionMode(result);
1378  }
1379  int64 getTargetQuadCount() const { return myTargetQuadCount; }
1380  void setTargetQuadCount(int64 val) { myTargetQuadCount = val; }
1382  {
1383  SOP_Node *thissop = cookparms.getNode();
1384  if (!thissop) return getTargetQuadCount();
1385  int64 result;
1386  OP_Utils::evalOpParm(result, thissop, "targetquadcount", cookparms.getCookTime(), 0);
1387  return result;
1388  }
1389  fpreal64 getTargetQuadArea() const { return myTargetQuadArea; }
1390  void setTargetQuadArea(fpreal64 val) { myTargetQuadArea = val; }
1392  {
1393  SOP_Node *thissop = cookparms.getNode();
1394  if (!thissop) return getTargetQuadArea();
1395  fpreal64 result;
1396  OP_Utils::evalOpParm(result, thissop, "targetquadarea", cookparms.getCookTime(), 0);
1397  return result;
1398  }
1399  fpreal64 getTargetTolerance() const { return myTargetTolerance; }
1400  void setTargetTolerance(fpreal64 val) { myTargetTolerance = val; }
1402  {
1403  SOP_Node *thissop = cookparms.getNode();
1404  if (!thissop) return getTargetTolerance();
1405  fpreal64 result;
1406  OP_Utils::evalOpParm(result, thissop, "targettolerance", cookparms.getCookTime(), 0);
1407  return result;
1408  }
1409  int64 getResolutionScale() const { return myResolutionScale; }
1410  void setResolutionScale(int64 val) { myResolutionScale = val; }
1412  {
1413  SOP_Node *thissop = cookparms.getNode();
1414  if (!thissop) return getResolutionScale();
1415  int64 result;
1416  OP_Utils::evalOpParm(result, thissop, "resolutionscale", cookparms.getCookTime(), 0);
1417  return result;
1418  }
1419  ResolutionSource getResolutionSource() const { return ResolutionSource(myResolutionSource); }
1420  void setResolutionSource(ResolutionSource val) { myResolutionSource = int64(val); }
1422  {
1423  SOP_Node *thissop = cookparms.getNode();
1424  if (!thissop) return getResolutionSource();
1425  int64 result;
1426  OP_Utils::evalOpParm(result, thissop, "resolutionsource", cookparms.getCookTime(), 0);
1427  return ResolutionSource(result);
1428  }
1429  fpreal64 getTriangleArea() const { return myTriangleArea; }
1430  void setTriangleArea(fpreal64 val) { myTriangleArea = val; }
1432  {
1433  SOP_Node *thissop = cookparms.getNode();
1434  if (!thissop) return getTriangleArea();
1435  fpreal64 result;
1436  OP_Utils::evalOpParm(result, thissop, "trianglearea", cookparms.getCookTime(), 0);
1437  return result;
1438  }
1439  UT_Vector3D getSymmetryCenter() const { return mySymmetryCenter; }
1440  void setSymmetryCenter(UT_Vector3D val) { mySymmetryCenter = val; }
1442  {
1443  SOP_Node *thissop = cookparms.getNode();
1444  if (!thissop) return getSymmetryCenter();
1446  OP_Utils::evalOpParm(result, thissop, "symmetrycenter", cookparms.getCookTime(), 0);
1447  return result;
1448  }
1449  bool getXAxis() const { return myXAxis; }
1450  void setXAxis(bool val) { myXAxis = val; }
1451  bool opXAxis(const SOP_NodeVerb::CookParms &cookparms) const
1452  {
1453  SOP_Node *thissop = cookparms.getNode();
1454  if (!thissop) return getXAxis();
1455  bool result;
1456  OP_Utils::evalOpParm(result, thissop, "xaxis", cookparms.getCookTime(), 0);
1457  return result;
1458  }
1459  XDirection getXDirection() const { return XDirection(myXDirection); }
1460  void setXDirection(XDirection val) { myXDirection = int64(val); }
1462  {
1463  SOP_Node *thissop = cookparms.getNode();
1464  if (!thissop) return getXDirection();
1465  int64 result;
1466  OP_Utils::evalOpParm(result, thissop, "xdirection", cookparms.getCookTime(), 0);
1467  return XDirection(result);
1468  }
1469  bool getYAxis() const { return myYAxis; }
1470  void setYAxis(bool val) { myYAxis = val; }
1471  bool opYAxis(const SOP_NodeVerb::CookParms &cookparms) const
1472  {
1473  SOP_Node *thissop = cookparms.getNode();
1474  if (!thissop) return getYAxis();
1475  bool result;
1476  OP_Utils::evalOpParm(result, thissop, "yaxis", cookparms.getCookTime(), 0);
1477  return result;
1478  }
1479  YDirection getYDirection() const { return YDirection(myYDirection); }
1480  void setYDirection(YDirection val) { myYDirection = int64(val); }
1482  {
1483  SOP_Node *thissop = cookparms.getNode();
1484  if (!thissop) return getYDirection();
1485  int64 result;
1486  OP_Utils::evalOpParm(result, thissop, "ydirection", cookparms.getCookTime(), 0);
1487  return YDirection(result);
1488  }
1489  bool getZAxis() const { return myZAxis; }
1490  void setZAxis(bool val) { myZAxis = val; }
1491  bool opZAxis(const SOP_NodeVerb::CookParms &cookparms) const
1492  {
1493  SOP_Node *thissop = cookparms.getNode();
1494  if (!thissop) return getZAxis();
1495  bool result;
1496  OP_Utils::evalOpParm(result, thissop, "zaxis", cookparms.getCookTime(), 0);
1497  return result;
1498  }
1499  ZDirection getZDirection() const { return ZDirection(myZDirection); }
1500  void setZDirection(ZDirection val) { myZDirection = int64(val); }
1502  {
1503  SOP_Node *thissop = cookparms.getNode();
1504  if (!thissop) return getZDirection();
1505  int64 result;
1506  OP_Utils::evalOpParm(result, thissop, "zdirection", cookparms.getCookTime(), 0);
1507  return ZDirection(result);
1508  }
1509  bool getMirrorOutput() const { return myMirrorOutput; }
1510  void setMirrorOutput(bool val) { myMirrorOutput = val; }
1511  bool opMirrorOutput(const SOP_NodeVerb::CookParms &cookparms) const
1512  {
1513  SOP_Node *thissop = cookparms.getNode();
1514  if (!thissop) return getMirrorOutput();
1515  bool result;
1516  OP_Utils::evalOpParm(result, thissop, "mirroroutput", cookparms.getCookTime(), 0);
1517  return result;
1518  }
1519  Output getOutput() const { return Output(myOutput); }
1520  void setOutput(Output val) { myOutput = int64(val); }
1521  Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
1522  {
1523  SOP_Node *thissop = cookparms.getNode();
1524  if (!thissop) return getOutput();
1525  int64 result;
1526  OP_Utils::evalOpParm(result, thissop, "output", cookparms.getCookTime(), 0);
1527  return Output(result);
1528  }
1529  const UT_StringHolder & getConstrainedEdgesGroup() const { return myConstrainedEdgesGroup; }
1530  void setConstrainedEdgesGroup(const UT_StringHolder & val) { myConstrainedEdgesGroup = val; }
1532  {
1533  SOP_Node *thissop = cookparms.getNode();
1534  if (!thissop) return getConstrainedEdgesGroup();
1536  OP_Utils::evalOpParm(result, thissop, "constrainededgesgroup", cookparms.getCookTime(), 0);
1537  return result;
1538  }
1539  bool getDecimation() const { return myDecimation; }
1540  void setDecimation(bool val) { myDecimation = val; }
1541  bool opDecimation(const SOP_NodeVerb::CookParms &cookparms) const
1542  {
1543  SOP_Node *thissop = cookparms.getNode();
1544  if (!thissop) return getDecimation();
1545  bool result;
1546  OP_Utils::evalOpParm(result, thissop, "decimation", cookparms.getCookTime(), 0);
1547  return result;
1548  }
1549  int64 getDecimationLevel() const { return myDecimationLevel; }
1550  void setDecimationLevel(int64 val) { myDecimationLevel = val; }
1552  {
1553  SOP_Node *thissop = cookparms.getNode();
1554  if (!thissop) return getDecimationLevel();
1555  int64 result;
1556  OP_Utils::evalOpParm(result, thissop, "decimationlevel", cookparms.getCookTime(), 0);
1557  return result;
1558  }
1559  int64 getMinQuadCount() const { return myMinQuadCount; }
1560  void setMinQuadCount(int64 val) { myMinQuadCount = val; }
1562  {
1563  SOP_Node *thissop = cookparms.getNode();
1564  if (!thissop) return getMinQuadCount();
1565  int64 result;
1566  OP_Utils::evalOpParm(result, thissop, "minquadcount", cookparms.getCookTime(), 0);
1567  return result;
1568  }
1569  Method getMethod() const { return Method(myMethod); }
1570  void setMethod(Method val) { myMethod = int64(val); }
1571  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
1572  {
1573  SOP_Node *thissop = cookparms.getNode();
1574  if (!thissop) return getMethod();
1575  int64 result;
1576  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
1577  return Method(result);
1578  }
1579  bool getUseQuadCover() const { return myUseQuadCover; }
1580  void setUseQuadCover(bool val) { myUseQuadCover = val; }
1581  bool opUseQuadCover(const SOP_NodeVerb::CookParms &cookparms) const
1582  {
1583  SOP_Node *thissop = cookparms.getNode();
1584  if (!thissop) return getUseQuadCover();
1585  bool result;
1586  OP_Utils::evalOpParm(result, thissop, "usesimplestitching", cookparms.getCookTime(), 0);
1587  return result;
1588  }
1589  bool getEnableAdaptivity() const { return myEnableAdaptivity; }
1590  void setEnableAdaptivity(bool val) { myEnableAdaptivity = val; }
1591  bool opEnableAdaptivity(const SOP_NodeVerb::CookParms &cookparms) const
1592  {
1593  SOP_Node *thissop = cookparms.getNode();
1594  if (!thissop) return getEnableAdaptivity();
1595  bool result;
1596  OP_Utils::evalOpParm(result, thissop, "enableadaptivity", cookparms.getCookTime(), 0);
1597  return result;
1598  }
1599  fpreal64 getAdaptivityWeight() const { return myAdaptivityWeight; }
1600  void setAdaptivityWeight(fpreal64 val) { myAdaptivityWeight = val; }
1602  {
1603  SOP_Node *thissop = cookparms.getNode();
1604  if (!thissop) return getAdaptivityWeight();
1605  fpreal64 result;
1606  OP_Utils::evalOpParm(result, thissop, "adaptivityweight", cookparms.getCookTime(), 0);
1607  return result;
1608  }
1609  const UT_StringHolder & getAdaptivityMaskAttrib() const { return myAdaptivityMaskAttrib; }
1610  void setAdaptivityMaskAttrib(const UT_StringHolder & val) { myAdaptivityMaskAttrib = val; }
1612  {
1613  SOP_Node *thissop = cookparms.getNode();
1614  if (!thissop) return getAdaptivityMaskAttrib();
1616  OP_Utils::evalOpParm(result, thissop, "adaptivitymaskattrib", cookparms.getCookTime(), 0);
1617  return result;
1618  }
1619  bool getAdaptivitySizing() const { return myAdaptivitySizing; }
1620  void setAdaptivitySizing(bool val) { myAdaptivitySizing = val; }
1621  bool opAdaptivitySizing(const SOP_NodeVerb::CookParms &cookparms) const
1622  {
1623  SOP_Node *thissop = cookparms.getNode();
1624  if (!thissop) return getAdaptivitySizing();
1625  bool result;
1626  OP_Utils::evalOpParm(result, thissop, "adaptivitysizing", cookparms.getCookTime(), 0);
1627  return result;
1628  }
1629  const UT_StringHolder & getAdaptivitySizingAttrib() const { return myAdaptivitySizingAttrib; }
1630  void setAdaptivitySizingAttrib(const UT_StringHolder & val) { myAdaptivitySizingAttrib = val; }
1632  {
1633  SOP_Node *thissop = cookparms.getNode();
1634  if (!thissop) return getAdaptivitySizingAttrib();
1636  OP_Utils::evalOpParm(result, thissop, "adaptivitysizingattrib", cookparms.getCookTime(), 0);
1637  return result;
1638  }
1639  const UT_StringHolder & getFeatureEdges() const { return myFeatureEdges; }
1640  void setFeatureEdges(const UT_StringHolder & val) { myFeatureEdges = val; }
1642  {
1643  SOP_Node *thissop = cookparms.getNode();
1644  if (!thissop) return getFeatureEdges();
1646  OP_Utils::evalOpParm(result, thissop, "featuredges", cookparms.getCookTime(), 0);
1647  return result;
1648  }
1649  bool getFeatureBoundaries() const { return myFeatureBoundaries; }
1650  void setFeatureBoundaries(bool val) { myFeatureBoundaries = val; }
1651  bool opFeatureBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
1652  {
1653  SOP_Node *thissop = cookparms.getNode();
1654  if (!thissop) return getFeatureBoundaries();
1655  bool result;
1656  OP_Utils::evalOpParm(result, thissop, "featureboundaries", cookparms.getCookTime(), 0);
1657  return result;
1658  }
1659  fpreal64 getGlobalWeight() const { return myGlobalWeight; }
1660  void setGlobalWeight(fpreal64 val) { myGlobalWeight = val; }
1662  {
1663  SOP_Node *thissop = cookparms.getNode();
1664  if (!thissop) return getGlobalWeight();
1665  fpreal64 result;
1666  OP_Utils::evalOpParm(result, thissop, "globalweight", cookparms.getCookTime(), 0);
1667  return result;
1668  }
1669  Field getField() const { return Field(myField); }
1670  void setField(Field val) { myField = int64(val); }
1671  Field opField(const SOP_NodeVerb::CookParms &cookparms) const
1672  {
1673  SOP_Node *thissop = cookparms.getNode();
1674  if (!thissop) return getField();
1675  int64 result;
1676  OP_Utils::evalOpParm(result, thissop, "field", cookparms.getCookTime(), 0);
1677  return Field(result);
1678  }
1679  int64 getFieldSmoothingIterations() const { return myFieldSmoothingIterations; }
1680  void setFieldSmoothingIterations(int64 val) { myFieldSmoothingIterations = val; }
1682  {
1683  SOP_Node *thissop = cookparms.getNode();
1684  if (!thissop) return getFieldSmoothingIterations();
1685  int64 result;
1686  OP_Utils::evalOpParm(result, thissop, "fieldsmoothingiterations", cookparms.getCookTime(), 0);
1687  return result;
1688  }
1689  bool getHardenGuidesToFeatures() const { return myHardenGuidesToFeatures; }
1690  void setHardenGuidesToFeatures(bool val) { myHardenGuidesToFeatures = val; }
1692  {
1693  SOP_Node *thissop = cookparms.getNode();
1694  if (!thissop) return getHardenGuidesToFeatures();
1695  bool result;
1696  OP_Utils::evalOpParm(result, thissop, "hardenguidestofeatures", cookparms.getCookTime(), 0);
1697  return result;
1698  }
1699  bool getCurvature() const { return myCurvature; }
1700  void setCurvature(bool val) { myCurvature = val; }
1701  bool opCurvature(const SOP_NodeVerb::CookParms &cookparms) const
1702  {
1703  SOP_Node *thissop = cookparms.getNode();
1704  if (!thissop) return getCurvature();
1705  bool result;
1706  OP_Utils::evalOpParm(result, thissop, "curvature", cookparms.getCookTime(), 0);
1707  return result;
1708  }
1709  fpreal64 getLocalCurvatureWeight() const { return myLocalCurvatureWeight; }
1710  void setLocalCurvatureWeight(fpreal64 val) { myLocalCurvatureWeight = val; }
1712  {
1713  SOP_Node *thissop = cookparms.getNode();
1714  if (!thissop) return getLocalCurvatureWeight();
1715  fpreal64 result;
1716  OP_Utils::evalOpParm(result, thissop, "localcurvatureweight", cookparms.getCookTime(), 0);
1717  return result;
1718  }
1719  const UT_StringHolder & getCurvatureMaskAttrib() const { return myCurvatureMaskAttrib; }
1720  void setCurvatureMaskAttrib(const UT_StringHolder & val) { myCurvatureMaskAttrib = val; }
1722  {
1723  SOP_Node *thissop = cookparms.getNode();
1724  if (!thissop) return getCurvatureMaskAttrib();
1726  OP_Utils::evalOpParm(result, thissop, "curvaturemaskattrib", cookparms.getCookTime(), 0);
1727  return result;
1728  }
1729  fpreal64 getCurvatureRotation() const { return myCurvatureRotation; }
1730  void setCurvatureRotation(fpreal64 val) { myCurvatureRotation = val; }
1732  {
1733  SOP_Node *thissop = cookparms.getNode();
1734  if (!thissop) return getCurvatureRotation();
1735  fpreal64 result;
1736  OP_Utils::evalOpParm(result, thissop, "curvaturerotation", cookparms.getCookTime(), 0);
1737  return result;
1738  }
1739  bool getBoundary() const { return myBoundary; }
1740  void setBoundary(bool val) { myBoundary = val; }
1741  bool opBoundary(const SOP_NodeVerb::CookParms &cookparms) const
1742  {
1743  SOP_Node *thissop = cookparms.getNode();
1744  if (!thissop) return getBoundary();
1745  bool result;
1746  OP_Utils::evalOpParm(result, thissop, "boundary", cookparms.getCookTime(), 0);
1747  return result;
1748  }
1749  BoundaryMode getBoundaryMode() const { return BoundaryMode(myBoundaryMode); }
1750  void setBoundaryMode(BoundaryMode val) { myBoundaryMode = int64(val); }
1752  {
1753  SOP_Node *thissop = cookparms.getNode();
1754  if (!thissop) return getBoundaryMode();
1755  int64 result;
1756  OP_Utils::evalOpParm(result, thissop, "boundarymode", cookparms.getCookTime(), 0);
1757  return BoundaryMode(result);
1758  }
1759  fpreal64 getLocalBoundaryWeight() const { return myLocalBoundaryWeight; }
1760  void setLocalBoundaryWeight(fpreal64 val) { myLocalBoundaryWeight = val; }
1762  {
1763  SOP_Node *thissop = cookparms.getNode();
1764  if (!thissop) return getLocalBoundaryWeight();
1765  fpreal64 result;
1766  OP_Utils::evalOpParm(result, thissop, "localboundaryweight", cookparms.getCookTime(), 0);
1767  return result;
1768  }
1769  const UT_StringHolder & getBoundaryMaskAttrib() const { return myBoundaryMaskAttrib; }
1770  void setBoundaryMaskAttrib(const UT_StringHolder & val) { myBoundaryMaskAttrib = val; }
1772  {
1773  SOP_Node *thissop = cookparms.getNode();
1774  if (!thissop) return getBoundaryMaskAttrib();
1776  OP_Utils::evalOpParm(result, thissop, "boundarymaskattrib", cookparms.getCookTime(), 0);
1777  return result;
1778  }
1779  fpreal64 getBoundaryRotation() const { return myBoundaryRotation; }
1780  void setBoundaryRotation(fpreal64 val) { myBoundaryRotation = val; }
1782  {
1783  SOP_Node *thissop = cookparms.getNode();
1784  if (!thissop) return getBoundaryRotation();
1785  fpreal64 result;
1786  OP_Utils::evalOpParm(result, thissop, "boundaryrotation", cookparms.getCookTime(), 0);
1787  return result;
1788  }
1789  bool getGuide() const { return myGuide; }
1790  void setGuide(bool val) { myGuide = val; }
1791  bool opGuide(const SOP_NodeVerb::CookParms &cookparms) const
1792  {
1793  SOP_Node *thissop = cookparms.getNode();
1794  if (!thissop) return getGuide();
1795  bool result;
1796  OP_Utils::evalOpParm(result, thissop, "guide", cookparms.getCookTime(), 0);
1797  return result;
1798  }
1799  const UT_StringHolder & getGuideMaskAttrib() const { return myGuideMaskAttrib; }
1800  void setGuideMaskAttrib(const UT_StringHolder & val) { myGuideMaskAttrib = val; }
1802  {
1803  SOP_Node *thissop = cookparms.getNode();
1804  if (!thissop) return getGuideMaskAttrib();
1806  OP_Utils::evalOpParm(result, thissop, "guidemaskattrib", cookparms.getCookTime(), 0);
1807  return result;
1808  }
1809  const UT_StringHolder & getGuideAttrib() const { return myGuideAttrib; }
1810  void setGuideAttrib(const UT_StringHolder & val) { myGuideAttrib = val; }
1812  {
1813  SOP_Node *thissop = cookparms.getNode();
1814  if (!thissop) return getGuideAttrib();
1816  OP_Utils::evalOpParm(result, thissop, "guideattrib", cookparms.getCookTime(), 0);
1817  return result;
1818  }
1819  fpreal64 getAdaptivitySizingWeight() const { return myAdaptivitySizingWeight; }
1820  void setAdaptivitySizingWeight(fpreal64 val) { myAdaptivitySizingWeight = val; }
1822  {
1823  SOP_Node *thissop = cookparms.getNode();
1824  if (!thissop) return getAdaptivitySizingWeight();
1825  fpreal64 result;
1826  OP_Utils::evalOpParm(result, thissop, "adaptivitysizingweight", cookparms.getCookTime(), 0);
1827  return result;
1828  }
1829  const UT_StringHolder & getGlobalMask() const { return myGlobalMask; }
1830  void setGlobalMask(const UT_StringHolder & val) { myGlobalMask = val; }
1832  {
1833  SOP_Node *thissop = cookparms.getNode();
1834  if (!thissop) return getGlobalMask();
1836  OP_Utils::evalOpParm(result, thissop, "globalmask", cookparms.getCookTime(), 0);
1837  return result;
1838  }
1839  GuideMode getGuideMode() const { return GuideMode(myGuideMode); }
1840  void setGuideMode(GuideMode val) { myGuideMode = int64(val); }
1842  {
1843  SOP_Node *thissop = cookparms.getNode();
1844  if (!thissop) return getGuideMode();
1845  int64 result;
1846  OP_Utils::evalOpParm(result, thissop, "guidemode", cookparms.getCookTime(), 0);
1847  return GuideMode(result);
1848  }
1849  fpreal64 getLocalGuideWeight() const { return myLocalGuideWeight; }
1850  void setLocalGuideWeight(fpreal64 val) { myLocalGuideWeight = val; }
1852  {
1853  SOP_Node *thissop = cookparms.getNode();
1854  if (!thissop) return getLocalGuideWeight();
1855  fpreal64 result;
1856  OP_Utils::evalOpParm(result, thissop, "localguideweight", cookparms.getCookTime(), 0);
1857  return result;
1858  }
1859 
1860 private:
1861  UT_StringHolder myGroup;
1862  int64 myResolutionMode;
1863  int64 myTargetQuadCount;
1864  fpreal64 myTargetQuadArea;
1865  fpreal64 myTargetTolerance;
1866  int64 myResolutionScale;
1867  int64 myResolutionSource;
1868  fpreal64 myTriangleArea;
1869  UT_Vector3D mySymmetryCenter;
1870  bool myXAxis;
1871  int64 myXDirection;
1872  bool myYAxis;
1873  int64 myYDirection;
1874  bool myZAxis;
1875  int64 myZDirection;
1876  bool myMirrorOutput;
1877  int64 myOutput;
1878  UT_StringHolder myConstrainedEdgesGroup;
1879  bool myDecimation;
1880  int64 myDecimationLevel;
1881  int64 myMinQuadCount;
1882  int64 myMethod;
1883  bool myUseQuadCover;
1884  bool myEnableAdaptivity;
1885  fpreal64 myAdaptivityWeight;
1886  UT_StringHolder myAdaptivityMaskAttrib;
1887  bool myAdaptivitySizing;
1888  UT_StringHolder myAdaptivitySizingAttrib;
1889  UT_StringHolder myFeatureEdges;
1890  bool myFeatureBoundaries;
1891  fpreal64 myGlobalWeight;
1892  int64 myField;
1893  int64 myFieldSmoothingIterations;
1894  bool myHardenGuidesToFeatures;
1895  bool myCurvature;
1896  fpreal64 myLocalCurvatureWeight;
1897  UT_StringHolder myCurvatureMaskAttrib;
1898  fpreal64 myCurvatureRotation;
1899  bool myBoundary;
1900  int64 myBoundaryMode;
1901  fpreal64 myLocalBoundaryWeight;
1902  UT_StringHolder myBoundaryMaskAttrib;
1903  fpreal64 myBoundaryRotation;
1904  bool myGuide;
1905  UT_StringHolder myGuideMaskAttrib;
1906  UT_StringHolder myGuideAttrib;
1907  fpreal64 myAdaptivitySizingWeight;
1908  UT_StringHolder myGlobalMask;
1909  int64 myGuideMode;
1910  fpreal64 myLocalGuideWeight;
1911 
1912 };
BoundaryMode getBoundaryMode() const
void setAdaptivityWeight(fpreal64 val)
BoundaryMode opBoundaryMode(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getSymmetryCenter() const
type
Definition: core.h:556
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_Vector4D v)
void setTargetQuadArea(fpreal64 val)
void setCurvatureRotation(fpreal64 val)
void setLocalCurvatureWeight(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:403
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
fpreal64 opCurvatureRotation(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
int64 getFieldSmoothingIterations() const
void setYDirection(YDirection val)
const UT_StringHolder & getGlobalMask() const
bool opBoundary(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGuideAttrib(const SOP_NodeVerb::CookParms &cookparms) const
YDirection opYDirection(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
int64 opMinQuadCount(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opTargetQuadArea(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
const UT_StringHolder & getGuideMaskAttrib() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
XDirection opXDirection(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean * data
Definition: glcorearb.h:131
int64 getResolutionScale() const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:495
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
const UT_StringHolder & getGuideAttrib() const
bool opGuide(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
fpreal64 getLocalBoundaryWeight() const
Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
void save(std::ostream &os) const
UT_StringHolder opGlobalMask(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 getTriangleArea() const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opAdaptivitySizingWeight(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opTargetTolerance(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGuideMaskAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opSymmetryCenter(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:105
bool opDecimation(const SOP_NodeVerb::CookParms &cookparms) const
void setOutput(Output val)
UT_StringHolder opAdaptivityMaskAttrib(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:669
int64 exint
Definition: SYS_Types.h:125
void setConstrainedEdgesGroup(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setAdaptivitySizingAttrib(const UT_StringHolder &val)
GLdouble s
Definition: glad.h:3009
bool opFeatureBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
void setResolutionMode(ResolutionMode val)
An output stream object that owns its own string buffer storage.
bool opAdaptivitySizing(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getBoundaryRotation() const
void setMethod(Method val)
bool opEnableAdaptivity(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setBoundaryMaskAttrib(const UT_StringHolder &val)
**But if you need a result
Definition: thread.h:622
void setGlobalWeight(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setGuideAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
exint nodeIdx() const
Definition: OP_NodeParms.h:103
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
fpreal64 getLocalCurvatureWeight() const
fpreal64 opAdaptivityWeight(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:493
fpreal64 getTargetTolerance() const
fpreal64 getAdaptivitySizingWeight() const
GuideMode getGuideMode() const
void setResolutionSource(ResolutionSource val)
bool opUseQuadCover(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getAdaptivityWeight() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
ResolutionSource getResolutionSource() const
UT_StringHolder opCurvatureMaskAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setEnableAdaptivity(bool val)
double fpreal64
Definition: SYS_Types.h:201
const UT_StringHolder & getAdaptivityMaskAttrib() const
bool opCurvature(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:426
ParmType getNestParmType(TempIndex fieldnum) const override
void setCurvatureMaskAttrib(const UT_StringHolder &val)
int64 opResolutionScale(const SOP_NodeVerb::CookParms &cookparms) const
ResolutionMode opResolutionMode(const SOP_NodeVerb::CookParms &cookparms) const
int64 getTargetQuadCount() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
ResolutionSource opResolutionSource(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opBoundaryRotation(const SOP_NodeVerb::CookParms &cookparms) const
bool opYAxis(const SOP_NodeVerb::CookParms &cookparms) const
Field opField(const SOP_NodeVerb::CookParms &cookparms) const
void setMirrorOutput(bool val)
YDirection getYDirection() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_StringHolder opAdaptivitySizingAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
exint length() const
fpreal64 opLocalCurvatureWeight(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:36
int64 opTargetQuadCount(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:497
bool opMirrorOutput(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:102
void setBoundaryRotation(fpreal64 val)
void setFeatureEdges(const UT_StringHolder &val)
bool getFeatureBoundaries() const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
bool load(UT_IStream &is)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getConstrainedEdgesGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool opZAxis(const SOP_NodeVerb::CookParms &cookparms) const
void setGuideMode(GuideMode val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setLocalGuideWeight(fpreal64 val)
void setZDirection(ZDirection val)
int64 getDecimationLevel() const
void setHardenGuidesToFeatures(bool val)
long long int64
Definition: SYS_Types.h:116
int64 getMinQuadCount() const
ZDirection getZDirection() const
ZDirection opZDirection(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
static void saveData(std::ostream &os, int64 v)
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setGuideMaskAttrib(const UT_StringHolder &val)
void setDecimationLevel(int64 val)
static void saveData(std::ostream &os, UT_Vector2D v)
void setGlobalMask(const UT_StringHolder &val)
void setAdaptivitySizingWeight(fpreal64 val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setLocalBoundaryWeight(fpreal64 val)
static void loadData(UT_IStream &is, fpreal64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:306
UT_StringHolder opConstrainedEdgesGroup(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
const UT_StringHolder & getBoundaryMaskAttrib() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal64 getCurvatureRotation() const
const UT_StringHolder & getFeatureEdges() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setTargetQuadCount(int64 val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
int64 opDecimationLevel(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const UT_StringHolder & getAdaptivitySizingAttrib() const
bool opHardenGuidesToFeatures(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
ResolutionMode getResolutionMode() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
fpreal64 fpreal
Definition: SYS_Types.h:283
void setTargetTolerance(fpreal64 val)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:107
void setFeatureBoundaries(bool val)
bool operator!=(const SOP_QuadRemeshParms &src) const
LeafData & operator=(const LeafData &)=delete
bool getEnableAdaptivity() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setResolutionScale(int64 val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:499
bool opXAxis(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getGlobalWeight() const
void setXDirection(XDirection val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void saveData(std::ostream &os, bool v)
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:302
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
#define SOP_API
Definition: SOP_API.h:10
void setBoundaryMode(BoundaryMode val)
int64 opFieldSmoothingIterations(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setFieldSmoothingIterations(int64 val)
XDirection getXDirection() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:432
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GuideMode opGuideMode(const SOP_NodeVerb::CookParms &cookparms) const
bool getHardenGuidesToFeatures() const
const char * findChar(int c) const
Definition: UT_String.h:1421
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLboolean r
Definition: glcorearb.h:1222
fpreal64 opGlobalWeight(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 opTriangleArea(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(uint8 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
fpreal64 opLocalBoundaryWeight(const SOP_NodeVerb::CookParms &cookparms) const
void setUseQuadCover(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:667
bool operator==(const SOP_QuadRemeshParms &src) const
UT_StringHolder opBoundaryMaskAttrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(ResolutionMode enum_value)
void setTriangleArea(fpreal64 val)
void setSymmetryCenter(UT_Vector3D val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool getAdaptivitySizing() const
fpreal64 opLocalGuideWeight(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getTargetQuadArea() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setAdaptivityMaskAttrib(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:428
UT_StringHolder opFeatureEdges(const SOP_NodeVerb::CookParms &cookparms) const
void setMinQuadCount(int64 val)
SYS_FORCE_INLINE bool isstring() const
fpreal64 getLocalGuideWeight() const
void setAdaptivitySizing(bool val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
const UT_StringHolder & getCurvatureMaskAttrib() const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:665