HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Remesh-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_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_Remesh_2_0Enums
24 {
25  enum class Uvseams
26  {
27  IGNORE = 0,
28  HARDEN,
29  RESAMPLE
30  };
31 
33  getToken(Uvseams enum_value)
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case Uvseams::IGNORE: return "ignore"_sh;
38  case Uvseams::HARDEN: return "harden"_sh;
39  case Uvseams::RESAMPLE: return "resample"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44  enum class EnableBndDev
45  {
46  NOSCALING = 0,
47  BYATTRIB
48  };
49 
51  getToken(EnableBndDev enum_value)
52  {
53  using namespace UT::Literal;
54  switch (enum_value) {
55  case EnableBndDev::NOSCALING: return "noscaling"_sh;
56  case EnableBndDev::BYATTRIB: return "byattrib"_sh;
57  default: UT_ASSERT(false); return ""_sh;
58  }
59  }
60 
61  enum class Sizing
62  {
63  UNIFORM = 0,
64  ADAPTIVE
65  };
66 
68  getToken(Sizing enum_value)
69  {
70  using namespace UT::Literal;
71  switch (enum_value) {
72  case Sizing::UNIFORM: return "uniform"_sh;
73  case Sizing::ADAPTIVE: return "adaptive"_sh;
74  default: UT_ASSERT(false); return ""_sh;
75  }
76  }
77 
78 }
79 
80 
82 {
83 public:
84  static int version() { return 1; }
85 
87  {
88  myGroup = ""_UTsh;
89  myHardEdges = ""_UTsh;
90  myHardPoints = ""_UTsh;
91  myUvseams = 0;
92  myUVAttrib = "uv"_UTsh;
93  myIterations = 2;
94  mySmoothing = 0.1;
95  myBoundaryDeviation = 0;
96  myEnableBndDev = 0;
97  myBndDevAttrib = "mask"_UTsh;
98  myInputPtsOnly = false;
99  myDetachFromNonGroup = false;
100  myRecomputeNormals = true;
101  mySizing = 0;
102  myTargetSize = 0.2;
103  myUseMaxSize = false;
104  myMaxSize = 0.1;
105  myUseMinSize = false;
106  myMinSize = .1;
107  myDensity = 2.0;
108  myGradation = 0.25;
109  myUseMeshSizeAttrib = false;
110  myMeshSizeAttrib = "targetmeshsize"_UTsh;
111  myUseMinSizeAttrib = false;
112  myMinSizeAttrib = "minmeshsize"_UTsh;
113  myUseMaxSizeAttrib = false;
114  myMaxSizeAttrib = "maxmeshsize"_UTsh;
115  myUseOutHardEdgesGroup = false;
116  myOutHardEdgesGroup = "hardedges"_UTsh;
117  myUseOutMeshSizeAttrib = false;
118  myOutMeshSizeAttrib = "meshsize"_UTsh;
119  myUseOutMeshQualityAttrib = false;
120  myOutMeshQualityAttrib = "meshquality"_UTsh;
121 
122  }
123 
124  explicit SOP_Remesh_2_0Parms(const SOP_Remesh_2_0Parms &) = default;
126  SOP_Remesh_2_0Parms(SOP_Remesh_2_0Parms &&) noexcept = default;
127  SOP_Remesh_2_0Parms &operator=(SOP_Remesh_2_0Parms &&) noexcept = default;
128 
129  ~SOP_Remesh_2_0Parms() override {}
130 
131  bool operator==(const SOP_Remesh_2_0Parms &src) const
132  {
133  if (myGroup != src.myGroup) return false;
134  if (myHardEdges != src.myHardEdges) return false;
135  if (myHardPoints != src.myHardPoints) return false;
136  if (myUvseams != src.myUvseams) return false;
137  if (myUVAttrib != src.myUVAttrib) return false;
138  if (myIterations != src.myIterations) return false;
139  if (mySmoothing != src.mySmoothing) return false;
140  if (myBoundaryDeviation != src.myBoundaryDeviation) return false;
141  if (myEnableBndDev != src.myEnableBndDev) return false;
142  if (myBndDevAttrib != src.myBndDevAttrib) return false;
143  if (myInputPtsOnly != src.myInputPtsOnly) return false;
144  if (myDetachFromNonGroup != src.myDetachFromNonGroup) return false;
145  if (myRecomputeNormals != src.myRecomputeNormals) return false;
146  if (mySizing != src.mySizing) return false;
147  if (myTargetSize != src.myTargetSize) return false;
148  if (myUseMaxSize != src.myUseMaxSize) return false;
149  if (myMaxSize != src.myMaxSize) return false;
150  if (myUseMinSize != src.myUseMinSize) return false;
151  if (myMinSize != src.myMinSize) return false;
152  if (myDensity != src.myDensity) return false;
153  if (myGradation != src.myGradation) return false;
154  if (myUseMeshSizeAttrib != src.myUseMeshSizeAttrib) return false;
155  if (myMeshSizeAttrib != src.myMeshSizeAttrib) return false;
156  if (myUseMinSizeAttrib != src.myUseMinSizeAttrib) return false;
157  if (myMinSizeAttrib != src.myMinSizeAttrib) return false;
158  if (myUseMaxSizeAttrib != src.myUseMaxSizeAttrib) return false;
159  if (myMaxSizeAttrib != src.myMaxSizeAttrib) return false;
160  if (myUseOutHardEdgesGroup != src.myUseOutHardEdgesGroup) return false;
161  if (myOutHardEdgesGroup != src.myOutHardEdgesGroup) return false;
162  if (myUseOutMeshSizeAttrib != src.myUseOutMeshSizeAttrib) return false;
163  if (myOutMeshSizeAttrib != src.myOutMeshSizeAttrib) return false;
164  if (myUseOutMeshQualityAttrib != src.myUseOutMeshQualityAttrib) return false;
165  if (myOutMeshQualityAttrib != src.myOutMeshQualityAttrib) return false;
166 
167 
168  if (baseGetSignature() != src.baseGetSignature()) return false;
169 
170  return true;
171  }
172  bool operator!=(const SOP_Remesh_2_0Parms &src) const
173  {
174  return !operator==(src);
175  }
179 
180 
181 
182  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
183  {
184  myGroup = ""_UTsh;
185  if (true)
186  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
187  myHardEdges = ""_UTsh;
188  if (true)
189  graph->evalOpParm(myHardEdges, nodeidx, "hard_edges", time, graph->isDirect()?nullptr:depnode);
190  myHardPoints = ""_UTsh;
191  if (true)
192  graph->evalOpParm(myHardPoints, nodeidx, "hard_points", time, graph->isDirect()?nullptr:depnode);
193  myUvseams = 0;
194  if (true)
195  graph->evalOpParm(myUvseams, nodeidx, "uvseams", time, graph->isDirect()?nullptr:depnode);
196  myUVAttrib = "uv"_UTsh;
197  if (true && ( (true&&!(((int64(getUvseams())==0)))) ) )
198  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, graph->isDirect()?nullptr:depnode);
199  myIterations = 2;
200  if (true)
201  graph->evalOpParm(myIterations, nodeidx, "iterations", time, graph->isDirect()?nullptr:depnode);
202  mySmoothing = 0.1;
203  if (true)
204  graph->evalOpParm(mySmoothing, nodeidx, "smoothing", time, graph->isDirect()?nullptr:depnode);
205  myBoundaryDeviation = 0;
206  if (true)
207  graph->evalOpParm(myBoundaryDeviation, nodeidx, "boundarydeviation", time, graph->isDirect()?nullptr:depnode);
208  myEnableBndDev = 0;
209  if (true)
210  graph->evalOpParm(myEnableBndDev, nodeidx, "enablebnddevattrib", time, graph->isDirect()?nullptr:depnode);
211  myBndDevAttrib = "mask"_UTsh;
212  if (true && ( (true&&!(((int64(getEnableBndDev())==0)))) ) )
213  graph->evalOpParm(myBndDevAttrib, nodeidx, "bnddevattrib", time, graph->isDirect()?nullptr:depnode);
214  myInputPtsOnly = false;
215  if (true)
216  graph->evalOpParm(myInputPtsOnly, nodeidx, "inputptsonly", time, graph->isDirect()?nullptr:depnode);
217  myDetachFromNonGroup = false;
218  if (true)
219  graph->evalOpParm(myDetachFromNonGroup, nodeidx, "detachfromnongroup", time, graph->isDirect()?nullptr:depnode);
220  myRecomputeNormals = true;
221  if (true)
222  graph->evalOpParm(myRecomputeNormals, nodeidx, "recomputenormals", time, graph->isDirect()?nullptr:depnode);
223  mySizing = 0;
224  if (true)
225  graph->evalOpParm(mySizing, nodeidx, "sizing", time, graph->isDirect()?nullptr:depnode);
226  myTargetSize = 0.2;
227  if (true && ( (true&&!(((int64(getSizing())==1)))) ) )
228  graph->evalOpParm(myTargetSize, nodeidx, "targetsize", time, graph->isDirect()?nullptr:depnode);
229  myUseMaxSize = false;
230  if (true && ( (true&&!(((int64(getSizing())==0)))) ) )
231  graph->evalOpParm(myUseMaxSize, nodeidx, "usemaxsize", time, graph->isDirect()?nullptr:depnode);
232  myMaxSize = 0.1;
233  if (true && ( (true&&!(((getUseMaxSize()==0))||((int64(getSizing())==0)))) ) )
234  graph->evalOpParm(myMaxSize, nodeidx, "maxsize", time, graph->isDirect()?nullptr:depnode);
235  myUseMinSize = false;
236  if (true && ( (true&&!(((int64(getSizing())==0)))) ) )
237  graph->evalOpParm(myUseMinSize, nodeidx, "useminsize", time, graph->isDirect()?nullptr:depnode);
238  myMinSize = .1;
239  if (true && ( (true&&!(((getUseMinSize()==0))||((int64(getSizing())==0)))) ) )
240  graph->evalOpParm(myMinSize, nodeidx, "minsize", time, graph->isDirect()?nullptr:depnode);
241  myDensity = 2.0;
242  if (true && ( (true&&!(((int64(getSizing())==0)))) ) )
243  graph->evalOpParm(myDensity, nodeidx, "density", time, graph->isDirect()?nullptr:depnode);
244  myGradation = 0.25;
245  if (true && ( (true&&!(((int64(getSizing())==0)))) ) )
246  graph->evalOpParm(myGradation, nodeidx, "gradation", time, graph->isDirect()?nullptr:depnode);
247  myUseMeshSizeAttrib = false;
248  if (true && ( (true&&!(((int64(getSizing())==0))||((int64(getSizing())==0)))) ) )
249  graph->evalOpParm(myUseMeshSizeAttrib, nodeidx, "usemeshsizeattrib", time, graph->isDirect()?nullptr:depnode);
250  myMeshSizeAttrib = "targetmeshsize"_UTsh;
251  if (true && ( (true&&!(((int64(getSizing())==0))||((getUseMeshSizeAttrib()==0))||((int64(getSizing())==0)))) ) )
252  graph->evalOpParm(myMeshSizeAttrib, nodeidx, "meshsizeattrib", time, graph->isDirect()?nullptr:depnode);
253  myUseMinSizeAttrib = false;
254  if (true && ( (true&&!(((int64(getSizing())==0)))) ) )
255  graph->evalOpParm(myUseMinSizeAttrib, nodeidx, "useminsizeattrib", time, graph->isDirect()?nullptr:depnode);
256  myMinSizeAttrib = "minmeshsize"_UTsh;
257  if (true && ( (true&&!(((int64(getSizing())==0))||((getUseMinSizeAttrib()==0))||((int64(getSizing())==0)))) ) )
258  graph->evalOpParm(myMinSizeAttrib, nodeidx, "minsizeattrib", time, graph->isDirect()?nullptr:depnode);
259  myUseMaxSizeAttrib = false;
260  if (true && ( (true&&!(((int64(getSizing())==0))||((int64(getSizing())==0)))) ) )
261  graph->evalOpParm(myUseMaxSizeAttrib, nodeidx, "usemaxsizeattrib", time, graph->isDirect()?nullptr:depnode);
262  myMaxSizeAttrib = "maxmeshsize"_UTsh;
263  if (true && ( (true&&!(((int64(getSizing())==0))||((getUseMaxSizeAttrib()==0))||((int64(getSizing())==0)))) ) )
264  graph->evalOpParm(myMaxSizeAttrib, nodeidx, "maxsizeattrib", time, graph->isDirect()?nullptr:depnode);
265  myUseOutHardEdgesGroup = false;
266  if (true)
267  graph->evalOpParm(myUseOutHardEdgesGroup, nodeidx, "useouthardedgesgroup", time, graph->isDirect()?nullptr:depnode);
268  myOutHardEdgesGroup = "hardedges"_UTsh;
269  if (true && ( (true&&!(((getUseOutHardEdgesGroup()==0)))) ) )
270  graph->evalOpParm(myOutHardEdgesGroup, nodeidx, "outhardedgesgroup", time, graph->isDirect()?nullptr:depnode);
271  myUseOutMeshSizeAttrib = false;
272  if (true)
273  graph->evalOpParm(myUseOutMeshSizeAttrib, nodeidx, "useoutmeshsizeattrib", time, graph->isDirect()?nullptr:depnode);
274  myOutMeshSizeAttrib = "meshsize"_UTsh;
275  if (true && ( (true&&!(((getUseOutMeshSizeAttrib()==0)))) ) )
276  graph->evalOpParm(myOutMeshSizeAttrib, nodeidx, "outmeshsizeattrib", time, graph->isDirect()?nullptr:depnode);
277  myUseOutMeshQualityAttrib = false;
278  if (true)
279  graph->evalOpParm(myUseOutMeshQualityAttrib, nodeidx, "useoutmeshqualityattrib", time, graph->isDirect()?nullptr:depnode);
280  myOutMeshQualityAttrib = "meshquality"_UTsh;
281  if (true && ( (true&&!(((getUseOutMeshQualityAttrib()==0)))) ) )
282  graph->evalOpParm(myOutMeshQualityAttrib, nodeidx, "outmeshqualityattrib", time, graph->isDirect()?nullptr:depnode);
283 
284  }
285 
286 
287  void loadFromOpSubclass(const LoadParms &loadparms) override
288  {
289  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
290  }
291 
292 
293  void copyFrom(const OP_NodeParms *src) override
294  {
295  *this = *((const SOP_Remesh_2_0Parms *)src);
296  }
297 
298  template <typename T>
299  void
300  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
301  {
302  if (idx.size() < 1)
303  return;
304  UT_ASSERT(idx.size() == instance.size()+1);
305  if (idx.size() != instance.size()+1)
306  return;
307  switch (idx[0])
308  {
309  case 0:
310  coerceValue(value, myGroup);
311  break;
312  case 1:
313  coerceValue(value, myHardEdges);
314  break;
315  case 2:
316  coerceValue(value, myHardPoints);
317  break;
318  case 3:
319  coerceValue(value, myUvseams);
320  break;
321  case 4:
322  coerceValue(value, myUVAttrib);
323  break;
324  case 5:
325  coerceValue(value, myIterations);
326  break;
327  case 6:
328  coerceValue(value, mySmoothing);
329  break;
330  case 7:
331  coerceValue(value, myBoundaryDeviation);
332  break;
333  case 8:
334  coerceValue(value, myEnableBndDev);
335  break;
336  case 9:
337  coerceValue(value, myBndDevAttrib);
338  break;
339  case 10:
340  coerceValue(value, myInputPtsOnly);
341  break;
342  case 11:
343  coerceValue(value, myDetachFromNonGroup);
344  break;
345  case 12:
346  coerceValue(value, myRecomputeNormals);
347  break;
348  case 13:
349  coerceValue(value, mySizing);
350  break;
351  case 14:
352  coerceValue(value, myTargetSize);
353  break;
354  case 15:
355  coerceValue(value, myUseMaxSize);
356  break;
357  case 16:
358  coerceValue(value, myMaxSize);
359  break;
360  case 17:
361  coerceValue(value, myUseMinSize);
362  break;
363  case 18:
364  coerceValue(value, myMinSize);
365  break;
366  case 19:
367  coerceValue(value, myDensity);
368  break;
369  case 20:
370  coerceValue(value, myGradation);
371  break;
372  case 21:
373  coerceValue(value, myUseMeshSizeAttrib);
374  break;
375  case 22:
376  coerceValue(value, myMeshSizeAttrib);
377  break;
378  case 23:
379  coerceValue(value, myUseMinSizeAttrib);
380  break;
381  case 24:
382  coerceValue(value, myMinSizeAttrib);
383  break;
384  case 25:
385  coerceValue(value, myUseMaxSizeAttrib);
386  break;
387  case 26:
388  coerceValue(value, myMaxSizeAttrib);
389  break;
390  case 27:
391  coerceValue(value, myUseOutHardEdgesGroup);
392  break;
393  case 28:
394  coerceValue(value, myOutHardEdgesGroup);
395  break;
396  case 29:
397  coerceValue(value, myUseOutMeshSizeAttrib);
398  break;
399  case 30:
400  coerceValue(value, myOutMeshSizeAttrib);
401  break;
402  case 31:
403  coerceValue(value, myUseOutMeshQualityAttrib);
404  break;
405  case 32:
406  coerceValue(value, myOutMeshQualityAttrib);
407  break;
408 
409  }
410  }
411 
412  bool isParmColorRamp(exint idx) const override
413  {
414  switch (idx)
415  {
416 
417  }
418  return false;
419  }
420 
421  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
422  { doGetParmValue(idx, instance, value); }
423  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
424  { doGetParmValue(idx, instance, value); }
425  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
426  { doGetParmValue(idx, instance, value); }
427  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
428  { doGetParmValue(idx, instance, value); }
429  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
430  { doGetParmValue(idx, instance, value); }
431  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
432  { doGetParmValue(idx, instance, value); }
433  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
434  { doGetParmValue(idx, instance, value); }
435  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
436  { doGetParmValue(idx, instance, value); }
437  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
438  { doGetParmValue(idx, instance, value); }
439  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
440  { doGetParmValue(idx, instance, value); }
441  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
442  { doGetParmValue(idx, instance, value); }
443 
444  template <typename T>
445  void
446  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
447  {
448  if (idx.size() < 1)
449  return;
450  UT_ASSERT(idx.size() == instance.size()+1);
451  if (idx.size() != instance.size()+1)
452  return;
453  switch (idx[0])
454  {
455  case 0:
456  coerceValue(myGroup, ( ( value ) ));
457  break;
458  case 1:
459  coerceValue(myHardEdges, ( ( value ) ));
460  break;
461  case 2:
462  coerceValue(myHardPoints, ( ( value ) ));
463  break;
464  case 3:
465  coerceValue(myUvseams, clampMinValue(0, clampMaxValue(2, value ) ));
466  break;
467  case 4:
468  coerceValue(myUVAttrib, ( ( value ) ));
469  break;
470  case 5:
471  coerceValue(myIterations, clampMinValue(0, ( value ) ));
472  break;
473  case 6:
474  coerceValue(mySmoothing, clampMinValue(0, ( value ) ));
475  break;
476  case 7:
477  coerceValue(myBoundaryDeviation, clampMinValue(0, clampMaxValue(1, value ) ));
478  break;
479  case 8:
480  coerceValue(myEnableBndDev, clampMinValue(0, clampMaxValue(1, value ) ));
481  break;
482  case 9:
483  coerceValue(myBndDevAttrib, ( ( value ) ));
484  break;
485  case 10:
486  coerceValue(myInputPtsOnly, ( ( value ) ));
487  break;
488  case 11:
489  coerceValue(myDetachFromNonGroup, ( ( value ) ));
490  break;
491  case 12:
492  coerceValue(myRecomputeNormals, ( ( value ) ));
493  break;
494  case 13:
495  coerceValue(mySizing, clampMinValue(0, clampMaxValue(1, value ) ));
496  break;
497  case 14:
498  coerceValue(myTargetSize, clampMinValue(0, ( value ) ));
499  break;
500  case 15:
501  coerceValue(myUseMaxSize, ( ( value ) ));
502  break;
503  case 16:
504  coerceValue(myMaxSize, clampMinValue(0, ( value ) ));
505  break;
506  case 17:
507  coerceValue(myUseMinSize, ( ( value ) ));
508  break;
509  case 18:
510  coerceValue(myMinSize, clampMinValue(0, ( value ) ));
511  break;
512  case 19:
513  coerceValue(myDensity, clampMinValue(1.0, ( value ) ));
514  break;
515  case 20:
516  coerceValue(myGradation, clampMinValue(0, clampMaxValue(1, value ) ));
517  break;
518  case 21:
519  coerceValue(myUseMeshSizeAttrib, ( ( value ) ));
520  break;
521  case 22:
522  coerceValue(myMeshSizeAttrib, ( ( value ) ));
523  break;
524  case 23:
525  coerceValue(myUseMinSizeAttrib, ( ( value ) ));
526  break;
527  case 24:
528  coerceValue(myMinSizeAttrib, ( ( value ) ));
529  break;
530  case 25:
531  coerceValue(myUseMaxSizeAttrib, ( ( value ) ));
532  break;
533  case 26:
534  coerceValue(myMaxSizeAttrib, ( ( value ) ));
535  break;
536  case 27:
537  coerceValue(myUseOutHardEdgesGroup, ( ( value ) ));
538  break;
539  case 28:
540  coerceValue(myOutHardEdgesGroup, ( ( value ) ));
541  break;
542  case 29:
543  coerceValue(myUseOutMeshSizeAttrib, ( ( value ) ));
544  break;
545  case 30:
546  coerceValue(myOutMeshSizeAttrib, ( ( value ) ));
547  break;
548  case 31:
549  coerceValue(myUseOutMeshQualityAttrib, ( ( value ) ));
550  break;
551  case 32:
552  coerceValue(myOutMeshQualityAttrib, ( ( value ) ));
553  break;
554 
555  }
556  }
557 
558  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
559  { doSetParmValue(idx, instance, value); }
560  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
561  { doSetParmValue(idx, instance, value); }
562  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
563  { doSetParmValue(idx, instance, value); }
564  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
565  { doSetParmValue(idx, instance, value); }
566  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
567  { doSetParmValue(idx, instance, value); }
568  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
569  { doSetParmValue(idx, instance, value); }
570  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
571  { doSetParmValue(idx, instance, value); }
572  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
573  { doSetParmValue(idx, instance, value); }
574  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
575  { doSetParmValue(idx, instance, value); }
576  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
577  { doSetParmValue(idx, instance, value); }
578  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
579  { doSetParmValue(idx, instance, value); }
580 
581  exint getNestNumParms(TempIndex idx) const override
582  {
583  if (idx.size() == 0)
584  return 33;
585  switch (idx[0])
586  {
587 
588  }
589  // Invalid
590  return 0;
591  }
592 
593  const char *getNestParmName(TempIndex fieldnum) const override
594  {
595  if (fieldnum.size() < 1)
596  return 0;
597  switch (fieldnum[0])
598  {
599  case 0:
600  return "group";
601  case 1:
602  return "hard_edges";
603  case 2:
604  return "hard_points";
605  case 3:
606  return "uvseams";
607  case 4:
608  return "uvattrib";
609  case 5:
610  return "iterations";
611  case 6:
612  return "smoothing";
613  case 7:
614  return "boundarydeviation";
615  case 8:
616  return "enablebnddevattrib";
617  case 9:
618  return "bnddevattrib";
619  case 10:
620  return "inputptsonly";
621  case 11:
622  return "detachfromnongroup";
623  case 12:
624  return "recomputenormals";
625  case 13:
626  return "sizing";
627  case 14:
628  return "targetsize";
629  case 15:
630  return "usemaxsize";
631  case 16:
632  return "maxsize";
633  case 17:
634  return "useminsize";
635  case 18:
636  return "minsize";
637  case 19:
638  return "density";
639  case 20:
640  return "gradation";
641  case 21:
642  return "usemeshsizeattrib";
643  case 22:
644  return "meshsizeattrib";
645  case 23:
646  return "useminsizeattrib";
647  case 24:
648  return "minsizeattrib";
649  case 25:
650  return "usemaxsizeattrib";
651  case 26:
652  return "maxsizeattrib";
653  case 27:
654  return "useouthardedgesgroup";
655  case 28:
656  return "outhardedgesgroup";
657  case 29:
658  return "useoutmeshsizeattrib";
659  case 30:
660  return "outmeshsizeattrib";
661  case 31:
662  return "useoutmeshqualityattrib";
663  case 32:
664  return "outmeshqualityattrib";
665 
666  }
667  return 0;
668  }
669 
670  ParmType getNestParmType(TempIndex fieldnum) const override
671  {
672  if (fieldnum.size() < 1)
673  return PARM_UNSUPPORTED;
674  switch (fieldnum[0])
675  {
676  case 0:
677  return PARM_STRING;
678  case 1:
679  return PARM_STRING;
680  case 2:
681  return PARM_STRING;
682  case 3:
683  return PARM_INTEGER;
684  case 4:
685  return PARM_STRING;
686  case 5:
687  return PARM_INTEGER;
688  case 6:
689  return PARM_FLOAT;
690  case 7:
691  return PARM_FLOAT;
692  case 8:
693  return PARM_INTEGER;
694  case 9:
695  return PARM_STRING;
696  case 10:
697  return PARM_INTEGER;
698  case 11:
699  return PARM_INTEGER;
700  case 12:
701  return PARM_INTEGER;
702  case 13:
703  return PARM_INTEGER;
704  case 14:
705  return PARM_FLOAT;
706  case 15:
707  return PARM_INTEGER;
708  case 16:
709  return PARM_FLOAT;
710  case 17:
711  return PARM_INTEGER;
712  case 18:
713  return PARM_FLOAT;
714  case 19:
715  return PARM_FLOAT;
716  case 20:
717  return PARM_FLOAT;
718  case 21:
719  return PARM_INTEGER;
720  case 22:
721  return PARM_STRING;
722  case 23:
723  return PARM_INTEGER;
724  case 24:
725  return PARM_STRING;
726  case 25:
727  return PARM_INTEGER;
728  case 26:
729  return PARM_STRING;
730  case 27:
731  return PARM_INTEGER;
732  case 28:
733  return PARM_STRING;
734  case 29:
735  return PARM_INTEGER;
736  case 30:
737  return PARM_STRING;
738  case 31:
739  return PARM_INTEGER;
740  case 32:
741  return PARM_STRING;
742 
743  }
744  return PARM_UNSUPPORTED;
745  }
746 
747  // Boiler plate to load individual types.
748  static void loadData(UT_IStream &is, int64 &v)
749  { is.bread(&v, 1); }
750  static void loadData(UT_IStream &is, bool &v)
751  { int64 iv; is.bread(&iv, 1); v = iv; }
752  static void loadData(UT_IStream &is, fpreal64 &v)
753  { is.bread<fpreal64>(&v, 1); }
754  static void loadData(UT_IStream &is, UT_Vector2D &v)
755  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
756  static void loadData(UT_IStream &is, UT_Vector3D &v)
757  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
758  is.bread<fpreal64>(&v.z(), 1); }
759  static void loadData(UT_IStream &is, UT_Vector4D &v)
760  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
761  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
762  static void loadData(UT_IStream &is, UT_Matrix2D &v)
763  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
764  static void loadData(UT_IStream &is, UT_Matrix3D &v)
765  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
766  static void loadData(UT_IStream &is, UT_Matrix4D &v)
767  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
768  static void loadData(UT_IStream &is, UT_Vector2I &v)
769  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
770  static void loadData(UT_IStream &is, UT_Vector3I &v)
771  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
772  is.bread<int64>(&v.z(), 1); }
773  static void loadData(UT_IStream &is, UT_Vector4I &v)
774  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
775  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
777  { is.bread(v); }
779  { UT_StringHolder rampdata;
780  loadData(is, rampdata);
781  if (rampdata.isstring())
782  {
783  v.reset(new UT_Ramp());
784  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
785  v->load(istr);
786  }
787  else v.reset();
788  }
791  loadData(is, data);
792  if (data.isstring())
793  {
794  // Find the data type.
795  const char *colon = UT_StringWrap(data).findChar(':');
796  if (colon)
797  {
798  int typelen = colon - data.buffer();
800  type.strncpy(data.buffer(), typelen);
801  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
802 
803  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
804  }
805  }
806  else v.reset();
807  }
808 
809  static void saveData(std::ostream &os, int64 v)
810  { UTwrite(os, &v); }
811  static void saveData(std::ostream &os, bool v)
812  { int64 iv = v; UTwrite(os, &iv); }
813  static void saveData(std::ostream &os, fpreal64 v)
814  { UTwrite<fpreal64>(os, &v); }
815  static void saveData(std::ostream &os, UT_Vector2D v)
816  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
817  static void saveData(std::ostream &os, UT_Vector3D v)
818  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
819  UTwrite<fpreal64>(os, &v.z()); }
820  static void saveData(std::ostream &os, UT_Vector4D v)
821  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
822  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
823  static void saveData(std::ostream &os, UT_Matrix2D v)
825  static void saveData(std::ostream &os, UT_Matrix3D v)
827  static void saveData(std::ostream &os, UT_Matrix4D v)
829  static void saveData(std::ostream &os, UT_StringHolder s)
830  { UT_StringWrap(s).saveBinary(os); }
831  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
833  UT_OStringStream ostr;
834  if (s) s->save(ostr);
835  result = ostr.str();
836  saveData(os, result);
837  }
838  static void saveData(std::ostream &os, PRM_DataItemHandle s)
840  UT_OStringStream ostr;
841  if (s)
842  {
843  ostr << s->getDataTypeToken();
844  ostr << ":";
845  s->saveBinary(ostr);
846  }
847  result = ostr.str();
848  saveData(os, result);
849  }
850 
851 
852  void save(std::ostream &os) const
853  {
854  int32 v = version();
855  UTwrite(os, &v);
856  saveData(os, myGroup);
857  saveData(os, myHardEdges);
858  saveData(os, myHardPoints);
859  saveData(os, myUvseams);
860  saveData(os, myUVAttrib);
861  saveData(os, myIterations);
862  saveData(os, mySmoothing);
863  saveData(os, myBoundaryDeviation);
864  saveData(os, myEnableBndDev);
865  saveData(os, myBndDevAttrib);
866  saveData(os, myInputPtsOnly);
867  saveData(os, myDetachFromNonGroup);
868  saveData(os, myRecomputeNormals);
869  saveData(os, mySizing);
870  saveData(os, myTargetSize);
871  saveData(os, myUseMaxSize);
872  saveData(os, myMaxSize);
873  saveData(os, myUseMinSize);
874  saveData(os, myMinSize);
875  saveData(os, myDensity);
876  saveData(os, myGradation);
877  saveData(os, myUseMeshSizeAttrib);
878  saveData(os, myMeshSizeAttrib);
879  saveData(os, myUseMinSizeAttrib);
880  saveData(os, myMinSizeAttrib);
881  saveData(os, myUseMaxSizeAttrib);
882  saveData(os, myMaxSizeAttrib);
883  saveData(os, myUseOutHardEdgesGroup);
884  saveData(os, myOutHardEdgesGroup);
885  saveData(os, myUseOutMeshSizeAttrib);
886  saveData(os, myOutMeshSizeAttrib);
887  saveData(os, myUseOutMeshQualityAttrib);
888  saveData(os, myOutMeshQualityAttrib);
889 
890  }
891 
892  bool load(UT_IStream &is)
893  {
894  int32 v;
895  is.bread(&v, 1);
896  if (version() != v)
897  {
898  // Fail incompatible versions
899  return false;
900  }
901  loadData(is, myGroup);
902  loadData(is, myHardEdges);
903  loadData(is, myHardPoints);
904  loadData(is, myUvseams);
905  loadData(is, myUVAttrib);
906  loadData(is, myIterations);
907  loadData(is, mySmoothing);
908  loadData(is, myBoundaryDeviation);
909  loadData(is, myEnableBndDev);
910  loadData(is, myBndDevAttrib);
911  loadData(is, myInputPtsOnly);
912  loadData(is, myDetachFromNonGroup);
913  loadData(is, myRecomputeNormals);
914  loadData(is, mySizing);
915  loadData(is, myTargetSize);
916  loadData(is, myUseMaxSize);
917  loadData(is, myMaxSize);
918  loadData(is, myUseMinSize);
919  loadData(is, myMinSize);
920  loadData(is, myDensity);
921  loadData(is, myGradation);
922  loadData(is, myUseMeshSizeAttrib);
923  loadData(is, myMeshSizeAttrib);
924  loadData(is, myUseMinSizeAttrib);
925  loadData(is, myMinSizeAttrib);
926  loadData(is, myUseMaxSizeAttrib);
927  loadData(is, myMaxSizeAttrib);
928  loadData(is, myUseOutHardEdgesGroup);
929  loadData(is, myOutHardEdgesGroup);
930  loadData(is, myUseOutMeshSizeAttrib);
931  loadData(is, myOutMeshSizeAttrib);
932  loadData(is, myUseOutMeshQualityAttrib);
933  loadData(is, myOutMeshQualityAttrib);
934 
935  return true;
936  }
937 
938  const UT_StringHolder & getGroup() const { return myGroup; }
939  void setGroup(const UT_StringHolder & val) { myGroup = val; }
941  {
942  SOP_Node *thissop = cookparms.getNode();
943  if (!thissop) return getGroup();
945  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
946  return result;
947  }
948  const UT_StringHolder & getHardEdges() const { return myHardEdges; }
949  void setHardEdges(const UT_StringHolder & val) { myHardEdges = val; }
951  {
952  SOP_Node *thissop = cookparms.getNode();
953  if (!thissop) return getHardEdges();
955  OP_Utils::evalOpParm(result, thissop, "hard_edges", cookparms.getCookTime(), 0);
956  return result;
957  }
958  const UT_StringHolder & getHardPoints() const { return myHardPoints; }
959  void setHardPoints(const UT_StringHolder & val) { myHardPoints = val; }
961  {
962  SOP_Node *thissop = cookparms.getNode();
963  if (!thissop) return getHardPoints();
965  OP_Utils::evalOpParm(result, thissop, "hard_points", cookparms.getCookTime(), 0);
966  return result;
967  }
968  Uvseams getUvseams() const { return Uvseams(myUvseams); }
969  void setUvseams(Uvseams val) { myUvseams = int64(val); }
970  Uvseams opUvseams(const SOP_NodeVerb::CookParms &cookparms) const
971  {
972  SOP_Node *thissop = cookparms.getNode();
973  if (!thissop) return getUvseams();
974  int64 result;
975  OP_Utils::evalOpParm(result, thissop, "uvseams", cookparms.getCookTime(), 0);
976  return Uvseams(result);
977  }
978  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
979  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
981  {
982  SOP_Node *thissop = cookparms.getNode();
983  if (!thissop) return getUVAttrib();
985  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
986  return result;
987  }
988  int64 getIterations() const { return myIterations; }
989  void setIterations(int64 val) { myIterations = val; }
991  {
992  SOP_Node *thissop = cookparms.getNode();
993  if (!thissop) return getIterations();
994  int64 result;
995  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
996  return result;
997  }
998  fpreal64 getSmoothing() const { return mySmoothing; }
999  void setSmoothing(fpreal64 val) { mySmoothing = val; }
1001  {
1002  SOP_Node *thissop = cookparms.getNode();
1003  if (!thissop) return getSmoothing();
1004  fpreal64 result;
1005  OP_Utils::evalOpParm(result, thissop, "smoothing", cookparms.getCookTime(), 0);
1006  return result;
1007  }
1008  fpreal64 getBoundaryDeviation() const { return myBoundaryDeviation; }
1009  void setBoundaryDeviation(fpreal64 val) { myBoundaryDeviation = val; }
1011  {
1012  SOP_Node *thissop = cookparms.getNode();
1013  if (!thissop) return getBoundaryDeviation();
1014  fpreal64 result;
1015  OP_Utils::evalOpParm(result, thissop, "boundarydeviation", cookparms.getCookTime(), 0);
1016  return result;
1017  }
1018  EnableBndDev getEnableBndDev() const { return EnableBndDev(myEnableBndDev); }
1019  void setEnableBndDev(EnableBndDev val) { myEnableBndDev = int64(val); }
1021  {
1022  SOP_Node *thissop = cookparms.getNode();
1023  if (!thissop) return getEnableBndDev();
1024  int64 result;
1025  OP_Utils::evalOpParm(result, thissop, "enablebnddevattrib", cookparms.getCookTime(), 0);
1026  return EnableBndDev(result);
1027  }
1028  const UT_StringHolder & getBndDevAttrib() const { return myBndDevAttrib; }
1029  void setBndDevAttrib(const UT_StringHolder & val) { myBndDevAttrib = val; }
1031  {
1032  SOP_Node *thissop = cookparms.getNode();
1033  if (!thissop) return getBndDevAttrib();
1035  OP_Utils::evalOpParm(result, thissop, "bnddevattrib", cookparms.getCookTime(), 0);
1036  return result;
1037  }
1038  bool getInputPtsOnly() const { return myInputPtsOnly; }
1039  void setInputPtsOnly(bool val) { myInputPtsOnly = val; }
1040  bool opInputPtsOnly(const SOP_NodeVerb::CookParms &cookparms) const
1041  {
1042  SOP_Node *thissop = cookparms.getNode();
1043  if (!thissop) return getInputPtsOnly();
1044  bool result;
1045  OP_Utils::evalOpParm(result, thissop, "inputptsonly", cookparms.getCookTime(), 0);
1046  return result;
1047  }
1048  bool getDetachFromNonGroup() const { return myDetachFromNonGroup; }
1049  void setDetachFromNonGroup(bool val) { myDetachFromNonGroup = val; }
1050  bool opDetachFromNonGroup(const SOP_NodeVerb::CookParms &cookparms) const
1051  {
1052  SOP_Node *thissop = cookparms.getNode();
1053  if (!thissop) return getDetachFromNonGroup();
1054  bool result;
1055  OP_Utils::evalOpParm(result, thissop, "detachfromnongroup", cookparms.getCookTime(), 0);
1056  return result;
1057  }
1058  bool getRecomputeNormals() const { return myRecomputeNormals; }
1059  void setRecomputeNormals(bool val) { myRecomputeNormals = val; }
1060  bool opRecomputeNormals(const SOP_NodeVerb::CookParms &cookparms) const
1061  {
1062  SOP_Node *thissop = cookparms.getNode();
1063  if (!thissop) return getRecomputeNormals();
1064  bool result;
1065  OP_Utils::evalOpParm(result, thissop, "recomputenormals", cookparms.getCookTime(), 0);
1066  return result;
1067  }
1068  Sizing getSizing() const { return Sizing(mySizing); }
1069  void setSizing(Sizing val) { mySizing = int64(val); }
1070  Sizing opSizing(const SOP_NodeVerb::CookParms &cookparms) const
1071  {
1072  SOP_Node *thissop = cookparms.getNode();
1073  if (!thissop) return getSizing();
1074  int64 result;
1075  OP_Utils::evalOpParm(result, thissop, "sizing", cookparms.getCookTime(), 0);
1076  return Sizing(result);
1077  }
1078  fpreal64 getTargetSize() const { return myTargetSize; }
1079  void setTargetSize(fpreal64 val) { myTargetSize = val; }
1081  {
1082  SOP_Node *thissop = cookparms.getNode();
1083  if (!thissop) return getTargetSize();
1084  fpreal64 result;
1085  OP_Utils::evalOpParm(result, thissop, "targetsize", cookparms.getCookTime(), 0);
1086  return result;
1087  }
1088  bool getUseMaxSize() const { return myUseMaxSize; }
1089  void setUseMaxSize(bool val) { myUseMaxSize = val; }
1090  bool opUseMaxSize(const SOP_NodeVerb::CookParms &cookparms) const
1091  {
1092  SOP_Node *thissop = cookparms.getNode();
1093  if (!thissop) return getUseMaxSize();
1094  bool result;
1095  OP_Utils::evalOpParm(result, thissop, "usemaxsize", cookparms.getCookTime(), 0);
1096  return result;
1097  }
1098  fpreal64 getMaxSize() const { return myMaxSize; }
1099  void setMaxSize(fpreal64 val) { myMaxSize = val; }
1101  {
1102  SOP_Node *thissop = cookparms.getNode();
1103  if (!thissop) return getMaxSize();
1104  fpreal64 result;
1105  OP_Utils::evalOpParm(result, thissop, "maxsize", cookparms.getCookTime(), 0);
1106  return result;
1107  }
1108  bool getUseMinSize() const { return myUseMinSize; }
1109  void setUseMinSize(bool val) { myUseMinSize = val; }
1110  bool opUseMinSize(const SOP_NodeVerb::CookParms &cookparms) const
1111  {
1112  SOP_Node *thissop = cookparms.getNode();
1113  if (!thissop) return getUseMinSize();
1114  bool result;
1115  OP_Utils::evalOpParm(result, thissop, "useminsize", cookparms.getCookTime(), 0);
1116  return result;
1117  }
1118  fpreal64 getMinSize() const { return myMinSize; }
1119  void setMinSize(fpreal64 val) { myMinSize = val; }
1121  {
1122  SOP_Node *thissop = cookparms.getNode();
1123  if (!thissop) return getMinSize();
1124  fpreal64 result;
1125  OP_Utils::evalOpParm(result, thissop, "minsize", cookparms.getCookTime(), 0);
1126  return result;
1127  }
1128  fpreal64 getDensity() const { return myDensity; }
1129  void setDensity(fpreal64 val) { myDensity = val; }
1131  {
1132  SOP_Node *thissop = cookparms.getNode();
1133  if (!thissop) return getDensity();
1134  fpreal64 result;
1135  OP_Utils::evalOpParm(result, thissop, "density", cookparms.getCookTime(), 0);
1136  return result;
1137  }
1138  fpreal64 getGradation() const { return myGradation; }
1139  void setGradation(fpreal64 val) { myGradation = val; }
1141  {
1142  SOP_Node *thissop = cookparms.getNode();
1143  if (!thissop) return getGradation();
1144  fpreal64 result;
1145  OP_Utils::evalOpParm(result, thissop, "gradation", cookparms.getCookTime(), 0);
1146  return result;
1147  }
1148  bool getUseMeshSizeAttrib() const { return myUseMeshSizeAttrib; }
1149  void setUseMeshSizeAttrib(bool val) { myUseMeshSizeAttrib = val; }
1150  bool opUseMeshSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1151  {
1152  SOP_Node *thissop = cookparms.getNode();
1153  if (!thissop) return getUseMeshSizeAttrib();
1154  bool result;
1155  OP_Utils::evalOpParm(result, thissop, "usemeshsizeattrib", cookparms.getCookTime(), 0);
1156  return result;
1157  }
1158  const UT_StringHolder & getMeshSizeAttrib() const { return myMeshSizeAttrib; }
1159  void setMeshSizeAttrib(const UT_StringHolder & val) { myMeshSizeAttrib = val; }
1161  {
1162  SOP_Node *thissop = cookparms.getNode();
1163  if (!thissop) return getMeshSizeAttrib();
1165  OP_Utils::evalOpParm(result, thissop, "meshsizeattrib", cookparms.getCookTime(), 0);
1166  return result;
1167  }
1168  bool getUseMinSizeAttrib() const { return myUseMinSizeAttrib; }
1169  void setUseMinSizeAttrib(bool val) { myUseMinSizeAttrib = val; }
1170  bool opUseMinSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1171  {
1172  SOP_Node *thissop = cookparms.getNode();
1173  if (!thissop) return getUseMinSizeAttrib();
1174  bool result;
1175  OP_Utils::evalOpParm(result, thissop, "useminsizeattrib", cookparms.getCookTime(), 0);
1176  return result;
1177  }
1178  const UT_StringHolder & getMinSizeAttrib() const { return myMinSizeAttrib; }
1179  void setMinSizeAttrib(const UT_StringHolder & val) { myMinSizeAttrib = val; }
1181  {
1182  SOP_Node *thissop = cookparms.getNode();
1183  if (!thissop) return getMinSizeAttrib();
1185  OP_Utils::evalOpParm(result, thissop, "minsizeattrib", cookparms.getCookTime(), 0);
1186  return result;
1187  }
1188  bool getUseMaxSizeAttrib() const { return myUseMaxSizeAttrib; }
1189  void setUseMaxSizeAttrib(bool val) { myUseMaxSizeAttrib = val; }
1190  bool opUseMaxSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1191  {
1192  SOP_Node *thissop = cookparms.getNode();
1193  if (!thissop) return getUseMaxSizeAttrib();
1194  bool result;
1195  OP_Utils::evalOpParm(result, thissop, "usemaxsizeattrib", cookparms.getCookTime(), 0);
1196  return result;
1197  }
1198  const UT_StringHolder & getMaxSizeAttrib() const { return myMaxSizeAttrib; }
1199  void setMaxSizeAttrib(const UT_StringHolder & val) { myMaxSizeAttrib = val; }
1201  {
1202  SOP_Node *thissop = cookparms.getNode();
1203  if (!thissop) return getMaxSizeAttrib();
1205  OP_Utils::evalOpParm(result, thissop, "maxsizeattrib", cookparms.getCookTime(), 0);
1206  return result;
1207  }
1208  bool getUseOutHardEdgesGroup() const { return myUseOutHardEdgesGroup; }
1209  void setUseOutHardEdgesGroup(bool val) { myUseOutHardEdgesGroup = val; }
1211  {
1212  SOP_Node *thissop = cookparms.getNode();
1213  if (!thissop) return getUseOutHardEdgesGroup();
1214  bool result;
1215  OP_Utils::evalOpParm(result, thissop, "useouthardedgesgroup", cookparms.getCookTime(), 0);
1216  return result;
1217  }
1218  const UT_StringHolder & getOutHardEdgesGroup() const { return myOutHardEdgesGroup; }
1219  void setOutHardEdgesGroup(const UT_StringHolder & val) { myOutHardEdgesGroup = val; }
1221  {
1222  SOP_Node *thissop = cookparms.getNode();
1223  if (!thissop) return getOutHardEdgesGroup();
1225  OP_Utils::evalOpParm(result, thissop, "outhardedgesgroup", cookparms.getCookTime(), 0);
1226  return result;
1227  }
1228  bool getUseOutMeshSizeAttrib() const { return myUseOutMeshSizeAttrib; }
1229  void setUseOutMeshSizeAttrib(bool val) { myUseOutMeshSizeAttrib = val; }
1231  {
1232  SOP_Node *thissop = cookparms.getNode();
1233  if (!thissop) return getUseOutMeshSizeAttrib();
1234  bool result;
1235  OP_Utils::evalOpParm(result, thissop, "useoutmeshsizeattrib", cookparms.getCookTime(), 0);
1236  return result;
1237  }
1238  const UT_StringHolder & getOutMeshSizeAttrib() const { return myOutMeshSizeAttrib; }
1239  void setOutMeshSizeAttrib(const UT_StringHolder & val) { myOutMeshSizeAttrib = val; }
1241  {
1242  SOP_Node *thissop = cookparms.getNode();
1243  if (!thissop) return getOutMeshSizeAttrib();
1245  OP_Utils::evalOpParm(result, thissop, "outmeshsizeattrib", cookparms.getCookTime(), 0);
1246  return result;
1247  }
1248  bool getUseOutMeshQualityAttrib() const { return myUseOutMeshQualityAttrib; }
1249  void setUseOutMeshQualityAttrib(bool val) { myUseOutMeshQualityAttrib = val; }
1251  {
1252  SOP_Node *thissop = cookparms.getNode();
1253  if (!thissop) return getUseOutMeshQualityAttrib();
1254  bool result;
1255  OP_Utils::evalOpParm(result, thissop, "useoutmeshqualityattrib", cookparms.getCookTime(), 0);
1256  return result;
1257  }
1258  const UT_StringHolder & getOutMeshQualityAttrib() const { return myOutMeshQualityAttrib; }
1259  void setOutMeshQualityAttrib(const UT_StringHolder & val) { myOutMeshQualityAttrib = val; }
1261  {
1262  SOP_Node *thissop = cookparms.getNode();
1263  if (!thissop) return getOutMeshQualityAttrib();
1265  OP_Utils::evalOpParm(result, thissop, "outmeshqualityattrib", cookparms.getCookTime(), 0);
1266  return result;
1267  }
1268 
1269 private:
1270  UT_StringHolder myGroup;
1271  UT_StringHolder myHardEdges;
1272  UT_StringHolder myHardPoints;
1273  int64 myUvseams;
1274  UT_StringHolder myUVAttrib;
1275  int64 myIterations;
1276  fpreal64 mySmoothing;
1277  fpreal64 myBoundaryDeviation;
1278  int64 myEnableBndDev;
1279  UT_StringHolder myBndDevAttrib;
1280  bool myInputPtsOnly;
1281  bool myDetachFromNonGroup;
1282  bool myRecomputeNormals;
1283  int64 mySizing;
1284  fpreal64 myTargetSize;
1285  bool myUseMaxSize;
1286  fpreal64 myMaxSize;
1287  bool myUseMinSize;
1288  fpreal64 myMinSize;
1289  fpreal64 myDensity;
1290  fpreal64 myGradation;
1291  bool myUseMeshSizeAttrib;
1292  UT_StringHolder myMeshSizeAttrib;
1293  bool myUseMinSizeAttrib;
1294  UT_StringHolder myMinSizeAttrib;
1295  bool myUseMaxSizeAttrib;
1296  UT_StringHolder myMaxSizeAttrib;
1297  bool myUseOutHardEdgesGroup;
1298  UT_StringHolder myOutHardEdgesGroup;
1299  bool myUseOutMeshSizeAttrib;
1300  UT_StringHolder myOutMeshSizeAttrib;
1301  bool myUseOutMeshQualityAttrib;
1302  UT_StringHolder myOutMeshQualityAttrib;
1303 
1304 };
type
Definition: core.h:556
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
int64 getIterations() const
void setOutMeshSizeAttrib(const UT_StringHolder &val)
Sizing opSizing(const SOP_NodeVerb::CookParms &cookparms) const
void setEnableBndDev(EnableBndDev val)
bool opUseMinSize(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:403
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_StringHolder opOutMeshQualityAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, fpreal64 v)
const char * getNestParmName(TempIndex fieldnum) const override
bool getUseMeshSizeAttrib() const
void setUseMaxSizeAttrib(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal64 opDensity(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
bool getUseOutMeshQualityAttrib() const
bool getDetachFromNonGroup() const
GLboolean * data
Definition: glcorearb.h:131
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:495
fpreal64 getSmoothing() const
static void saveData(std::ostream &os, UT_StringHolder s)
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setHardEdges(const UT_StringHolder &val)
bool opDetachFromNonGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setDensity(fpreal64 val)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
bool opUseOutHardEdgesGroup(const SOP_NodeVerb::CookParms &cookparms) const
EnableBndDev getEnableBndDev() const
void setMinSizeAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_StringHolder & getMinSizeAttrib() const
static void loadData(UT_IStream &is, int64 &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:669
int64 exint
Definition: SYS_Types.h:125
void copyFrom(const OP_NodeParms *src) override
SYS_FORCE_INLINE const char * buffer() const
bool operator!=(const SOP_Remesh_2_0Parms &src) const
void setOutMeshQualityAttrib(const UT_StringHolder &val)
UT_StringHolder opBndDevAttrib(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, bool &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal64 getMinSize() const
const UT_StringHolder & getOutMeshSizeAttrib() const
void setMaxSizeAttrib(const UT_StringHolder &val)
UT_StringHolder opHardEdges(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:622
EnableBndDev opEnableBndDev(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_StringHolder opMinSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setDetachFromNonGroup(bool val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:493
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const UT_StringHolder & getHardPoints() const
Uvseams getUvseams() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:426
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const UT_StringHolder & getOutMeshQualityAttrib() const
bool operator==(const SOP_Remesh_2_0Parms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
void setIterations(int64 val)
void setUvseams(Uvseams val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const UT_StringHolder & getBndDevAttrib() const
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 opSmoothing(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool opUseMaxSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setUseOutMeshSizeAttrib(bool val)
void setGroup(const UT_StringHolder &val)
void setUseMinSizeAttrib(bool val)
exint length() const
bool getUseOutHardEdgesGroup() const
static void saveData(std::ostream &os, UT_Vector4D v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
const UT_StringHolder & getGroup() const
bool getUseOutMeshSizeAttrib() const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:497
void setUVAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector3D v)
UT_StringHolder opOutHardEdgesGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(Uvseams enum_value)
const UT_StringHolder & getMaxSizeAttrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
fpreal64 opTargetSize(const SOP_NodeVerb::CookParms &cookparms) const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setSmoothing(fpreal64 val)
fpreal64 getTargetSize() const
bool opUseOutMeshSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal64 opGradation(const SOP_NodeVerb::CookParms &cookparms) const
bool opInputPtsOnly(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
void setMeshSizeAttrib(const UT_StringHolder &val)
bool opUseMinSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setUseOutMeshQualityAttrib(bool val)
bool opUseOutMeshQualityAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
static void saveData(std::ostream &os, bool v)
bool getUseMaxSizeAttrib() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setBndDevAttrib(const UT_StringHolder &val)
const UT_StringHolder & getUVAttrib() const
void setUseMeshSizeAttrib(bool val)
void setBoundaryDeviation(fpreal64 val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:306
static void saveData(std::ostream &os, int64 v)
Uvseams opUvseams(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getHardEdges() const
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 opBoundaryDeviation(const SOP_NodeVerb::CookParms &cookparms) const
bool getRecomputeNormals() const
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 getGradation() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool opUseMeshSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setInputPtsOnly(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setGradation(fpreal64 val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
fpreal64 fpreal
Definition: SYS_Types.h:283
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool getUseMinSizeAttrib() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void loadData(UT_IStream &is, UT_Vector2D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getOutHardEdgesGroup() const
const UT_StringHolder & getMeshSizeAttrib() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:499
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
#define SOP_API
Definition: SOP_API.h:10
bool opRecomputeNormals(const SOP_NodeVerb::CookParms &cookparms) const
void setUseOutHardEdgesGroup(bool val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setMaxSize(fpreal64 val)
fpreal64 getBoundaryDeviation() const
void setTargetSize(fpreal64 val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:432
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal64 opMaxSize(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
const char * findChar(int c) const
Definition: UT_String.h:1421
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
void setOutHardEdgesGroup(const UT_StringHolder &val)
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setHardPoints(const UT_StringHolder &val)
GLboolean r
Definition: glcorearb.h:1222
exint bread(uint8 *buffer, exint asize=1)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:667
UT_StringHolder opMaxSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_StringHolder opOutMeshSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opMinSize(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_StringHolder opHardPoints(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseMaxSize(const SOP_NodeVerb::CookParms &cookparms) const
void setSizing(Sizing val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:428
SYS_FORCE_INLINE bool isstring() const
void setMinSize(fpreal64 val)
void setRecomputeNormals(bool val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_StringHolder opMeshSizeAttrib(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
fpreal64 getDensity() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:665
fpreal64 getMaxSize() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Matrix3D v)