HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Measure-2.0.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_Measure_2_0Enums
24 {
25  enum class GroupType
26  {
27  POINTS = 0,
28  PRIMS
29  };
30  enum class Measure
31  {
32  PERIMETER = 0,
33  AREA,
34  VOLUME,
35  CENTROID,
36  CURVATURE,
37  GRADIENT,
38  LAPLACIAN,
41  };
42  enum class CurvatureType
43  {
44  GAUSSIAN = 0,
45  MEAN,
46  PRINCIPAL,
48  };
49  enum class PrincipalType
50  {
51  MIN = 0,
52  MAX
53  };
54  enum class PrincipalSign
55  {
56  SIGNED = 0,
57  ABSOLUTE
58  };
59  enum class PrincipalReportAs
60  {
61  SCALAR = 0,
62  DIRECTION,
63  VECTOR
64  };
65  enum class IntegrationMode
66  {
67  COMPONENTWISE = 0,
68  TANGENT,
69  NORMAL
70  };
71  enum class SrcComp
72  {
73  X = 0,
74  Y,
75  Z,
76  XYZ
77  };
78  enum class IntegrationDomain
79  {
80  ELEMENT = 0,
81  PIECE,
83  };
84  enum class WidthScale
85  {
86  UNIT = 0,
87  SD,
88  MAD
89  };
90  enum class CenterType
91  {
92  FIXED = 0,
93  MEAN,
94  MEDIAN
95  };
96 }
97 
98 
100 {
101 public:
102  static int version() { return 1; }
103 
105  {
106  myGroup = ""_sh;
107  myGroupType = 1;
108  myMeasure = 1;
109  myCurvatureType = 3;
110  myPrincipalType = 0;
111  myPrincipalSign = 0;
112  myPrincipalReportAs = 0;
113  myUmbilicCutoff = 0;
114  myIntegrationMode = 0;
115  mySrcAttrib = "P"_sh;
116  mySrcComp = 0;
117  myScaleNormalize = true;
118  myIntegrationDomain = 0;
119  myPieceAttrib = "class"_sh;
120  myUseCustomPos = false;
121  myPosAttrib = "P"_sh;
122  myUseRangeMin = false;
123  myRangeMin = -1;
124  myUseRangeMax = false;
125  myRangeMax = 1;
126  myUseCenterWidth = true;
127  myWidth = 6;
128  myWidthScale = 2;
129  myCenterType = 2;
130  myFixedCenter = 0;
131  myColorramp = UT_SharedPtr<UT_Ramp>(0);
132  myVectorScale = 1;
133  myAttribName = "area"_sh;
134  myUseTotalAttrib = false;
135  myTotalAttribName = "totalarea"_sh;
136  myUseRangeGroup = false;
137  myRangeGroup = "inrange"_sh;
138  myBakeIntoOutput = false;
139  myUseRemapRange = false;
140  myRemapRange = UT_Vector2D(0,1);
141 
142  }
143 
144  explicit SOP_Measure_2_0Parms(const SOP_Measure_2_0Parms &) = default;
145 
146  ~SOP_Measure_2_0Parms() override {}
147 
149  {
150  if (myGroup != src.myGroup) return false;
151  if (myGroupType != src.myGroupType) return false;
152  if (myMeasure != src.myMeasure) return false;
153  if (myCurvatureType != src.myCurvatureType) return false;
154  if (myPrincipalType != src.myPrincipalType) return false;
155  if (myPrincipalSign != src.myPrincipalSign) return false;
156  if (myPrincipalReportAs != src.myPrincipalReportAs) return false;
157  if (myUmbilicCutoff != src.myUmbilicCutoff) return false;
158  if (myIntegrationMode != src.myIntegrationMode) return false;
159  if (mySrcAttrib != src.mySrcAttrib) return false;
160  if (mySrcComp != src.mySrcComp) return false;
161  if (myScaleNormalize != src.myScaleNormalize) return false;
162  if (myIntegrationDomain != src.myIntegrationDomain) return false;
163  if (myPieceAttrib != src.myPieceAttrib) return false;
164  if (myUseCustomPos != src.myUseCustomPos) return false;
165  if (myPosAttrib != src.myPosAttrib) return false;
166  if (myUseRangeMin != src.myUseRangeMin) return false;
167  if (myRangeMin != src.myRangeMin) return false;
168  if (myUseRangeMax != src.myUseRangeMax) return false;
169  if (myRangeMax != src.myRangeMax) return false;
170  if (myUseCenterWidth != src.myUseCenterWidth) return false;
171  if (myWidth != src.myWidth) return false;
172  if (myWidthScale != src.myWidthScale) return false;
173  if (myCenterType != src.myCenterType) return false;
174  if (myFixedCenter != src.myFixedCenter) return false;
175  if (myColorramp != src.myColorramp) return false;
176  if (myVectorScale != src.myVectorScale) return false;
177  if (myAttribName != src.myAttribName) return false;
178  if (myUseTotalAttrib != src.myUseTotalAttrib) return false;
179  if (myTotalAttribName != src.myTotalAttribName) return false;
180  if (myUseRangeGroup != src.myUseRangeGroup) return false;
181  if (myRangeGroup != src.myRangeGroup) return false;
182  if (myBakeIntoOutput != src.myBakeIntoOutput) return false;
183  if (myUseRemapRange != src.myUseRemapRange) return false;
184  if (myRemapRange != src.myRemapRange) return false;
185 
186  return true;
187  }
189  {
190  return !operator==(src);
191  }
203 
204 
205 
206  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
207  {
208  myGroup = ""_sh;
209  if (true)
210  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
211  myGroupType = 1;
212  if (true)
213  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, 0);
214  myMeasure = 1;
215  if (true)
216  graph->evalOpParm(myMeasure, nodeidx, "measure", time, 0);
217  myCurvatureType = 3;
218  if (true && ( (!(((int64(getMeasure())!=4)))) ) )
219  graph->evalOpParm(myCurvatureType, nodeidx, "curvaturetype", time, 0);
220  myPrincipalType = 0;
221  if (true && ( (!(((int64(getMeasure())!=4))||((int64(getCurvatureType())!=2)))) ) )
222  graph->evalOpParm(myPrincipalType, nodeidx, "principaltype", time, 0);
223  myPrincipalSign = 0;
224  if (true && ( (!(((int64(getMeasure())!=4))||((int64(getCurvatureType())!=2)))) ) )
225  graph->evalOpParm(myPrincipalSign, nodeidx, "principalsign", time, 0);
226  myPrincipalReportAs = 0;
227  if (true && ( (!(((int64(getMeasure())!=4))||((int64(getCurvatureType())!=2)))) ) )
228  graph->evalOpParm(myPrincipalReportAs, nodeidx, "principalreportas", time, 0);
229  myUmbilicCutoff = 0;
230  if (true && ( (!(((int64(getMeasure())!=4))||((int64(getCurvatureType())!=2))||((int64(getPrincipalReportAs())==0)))) ) )
231  graph->evalOpParm(myUmbilicCutoff, nodeidx, "umbiliccutoff", time, 0);
232  myIntegrationMode = 0;
233  if (true && ( (!(((int64(getMeasure())!=7)&&(int64(getMeasure())!=8)))) ) )
234  graph->evalOpParm(myIntegrationMode, nodeidx, "integrationmode", time, 0);
235  mySrcAttrib = "P"_sh;
236  if (true && ( (!(((int64(getMeasure())==4))||((int64(getMeasure())==2))||((int64(getMeasure())==0))||((int64(getMeasure())==1))||((int64(getMeasure())==3)))) ) )
237  graph->evalOpParm(mySrcAttrib, nodeidx, "srcattrib", time, 0);
238  mySrcComp = 0;
239  if (true && ( (!(((int64(getMeasure())==4))||((int64(getMeasure())==2))||((int64(getMeasure())==0))||((int64(getMeasure())==1))||((int64(getMeasure())==3)))) ) )
240  graph->evalOpParm(mySrcComp, nodeidx, "srccomp", time, 0);
241  myScaleNormalize = true;
242  if (true && ( (!(((int64(getMeasure())!=4)&&(int64(getMeasure())!=5)&&(int64(getMeasure())!=6)&&(int64(getMeasure())!=8))||((int64(getMeasure())==4)&&(int64(getCurvatureType())==0)))) ) )
243  graph->evalOpParm(myScaleNormalize, nodeidx, "scalenormalize", time, 0);
244  myIntegrationDomain = 0;
245  if (true)
246  graph->evalOpParm(myIntegrationDomain, nodeidx, "integrationdomain", time, 0);
247  myPieceAttrib = "class"_sh;
248  if (true && ( (!(((int64(getIntegrationDomain())!=1)))) ) )
249  graph->evalOpParm(myPieceAttrib, nodeidx, "pieceattrib", time, 0);
250  myUseCustomPos = false;
251  if (true)
252  graph->evalOpParm(myUseCustomPos, nodeidx, "usecustompos", time, 0);
253  myPosAttrib = "P"_sh;
254  if (true && ( (!(((getUseCustomPos()==0)))) ) )
255  graph->evalOpParm(myPosAttrib, nodeidx, "posattrib", time, 0);
256  myUseRangeMin = false;
257  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1)))) ) )
258  graph->evalOpParm(myUseRangeMin, nodeidx, "userangemin", time, 0);
259  myRangeMin = -1;
260  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseRangeMin()==0)))) ) )
261  graph->evalOpParm(myRangeMin, nodeidx, "rangemin", time, 0);
262  myUseRangeMax = false;
263  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1)))) ) )
264  graph->evalOpParm(myUseRangeMax, nodeidx, "userangemax", time, 0);
265  myRangeMax = 1;
266  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseRangeMax()==0)))) ) )
267  graph->evalOpParm(myRangeMax, nodeidx, "rangemax", time, 0);
268  myUseCenterWidth = true;
269  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1)))) ) )
270  graph->evalOpParm(myUseCenterWidth, nodeidx, "usecenterwidth", time, 0);
271  myWidth = 6;
272  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseCenterWidth()==0)))) ) )
273  graph->evalOpParm(myWidth, nodeidx, "width", time, 0);
274  myWidthScale = 2;
275  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseCenterWidth()==0)))) ) )
276  graph->evalOpParm(myWidthScale, nodeidx, "widthscale", time, 0);
277  myCenterType = 2;
278  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseCenterWidth()==0)))) ) )
279  graph->evalOpParm(myCenterType, nodeidx, "centertype", time, 0);
280  myFixedCenter = 0;
281  if (true && ( (!(((int64(getCenterType())!=0))||((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseCenterWidth()==0)))) ) )
282  graph->evalOpParm(myFixedCenter, nodeidx, "fixedcenter", time, 0);
283  myColorramp = UT_SharedPtr<UT_Ramp>(0);
284  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1)))) ) )
285  graph->evalOpParm(myColorramp, nodeidx, "colorramp", time, 0);
286  myVectorScale = 1;
287  if (true && ( (!(((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==0))||((int64(getMeasure())==2))||((int64(getMeasure())==0))||((int64(getMeasure())==1))||((int64(getMeasure())==3))||((int64(getMeasure())==6)&&(int64(getSrcComp())!=3))||((int64(getMeasure())==8)&&(int64(getSrcComp())!=3))||((int64(getMeasure())==7)&&(int64(getSrcComp())!=3)))) ) )
288  graph->evalOpParm(myVectorScale, nodeidx, "vectorscale", time, 0);
289  myAttribName = "area"_sh;
290  if (true)
291  graph->evalOpParm(myAttribName, nodeidx, "attribname", time, 0);
292  myUseTotalAttrib = false;
293  if (true)
294  graph->evalOpParm(myUseTotalAttrib, nodeidx, "usetotalattrib", time, 0);
295  myTotalAttribName = "totalarea"_sh;
296  if (true && ( (!(((getUseTotalAttrib()==0)))) ) )
297  graph->evalOpParm(myTotalAttribName, nodeidx, "totalattribname", time, 0);
298  myUseRangeGroup = false;
299  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseRangeMin()==0)&&(getUseRangeMax()==0)&&(getUseCenterWidth()==0)))) ) )
300  graph->evalOpParm(myUseRangeGroup, nodeidx, "userangegroup", time, 0);
301  myRangeGroup = "inrange"_sh;
302  if (true && ( (!(((getUseRangeGroup()==0)))) ) )
303  graph->evalOpParm(myRangeGroup, nodeidx, "rangegroup", time, 0);
304  myBakeIntoOutput = false;
305  if (true && ( (!(((int64(getMeasure())==3))||((int64(getMeasure())==4)&&(int64(getPrincipalReportAs())==1))||((getUseRangeMin()==0)&&(getUseRangeMax()==0)&&(getUseCenterWidth()==0)))) ) )
306  graph->evalOpParm(myBakeIntoOutput, nodeidx, "bakeintooutput", time, 0);
307  myUseRemapRange = false;
308  if (true && ( (!(((getBakeIntoOutput()==0)))) ) )
309  graph->evalOpParm(myUseRemapRange, nodeidx, "useremaprange", time, 0);
310  myRemapRange = UT_Vector2D(0,1);
311  if (true && ( (!(((getBakeIntoOutput()==0))||((getUseRemapRange()==0)))) ) )
312  graph->evalOpParm(myRemapRange, nodeidx, "remaprange", time, 0);
313 
314  }
315 
316 
317  void loadFromOpSubclass(const LoadParms &loadparms) override
318  {
319  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
320  }
321 
322 
323  void copyFrom(const SOP_NodeParms *src) override
324  {
325  *this = *((const SOP_Measure_2_0Parms *)src);
326  }
327 
328  template <typename T>
329  void
330  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
331  {
332  if (idx.size() < 1)
333  return;
334  UT_ASSERT(idx.size() == instance.size()+1);
335  if (idx.size() != instance.size()+1)
336  return;
337  switch (idx[0])
338  {
339  case 0:
340  coerceValue(value, myGroup);
341  break;
342  case 1:
343  coerceValue(value, myGroupType);
344  break;
345  case 2:
346  coerceValue(value, myMeasure);
347  break;
348  case 3:
349  coerceValue(value, myCurvatureType);
350  break;
351  case 4:
352  coerceValue(value, myPrincipalType);
353  break;
354  case 5:
355  coerceValue(value, myPrincipalSign);
356  break;
357  case 6:
358  coerceValue(value, myPrincipalReportAs);
359  break;
360  case 7:
361  coerceValue(value, myUmbilicCutoff);
362  break;
363  case 8:
364  coerceValue(value, myIntegrationMode);
365  break;
366  case 9:
367  coerceValue(value, mySrcAttrib);
368  break;
369  case 10:
370  coerceValue(value, mySrcComp);
371  break;
372  case 11:
373  coerceValue(value, myScaleNormalize);
374  break;
375  case 12:
376  coerceValue(value, myIntegrationDomain);
377  break;
378  case 13:
379  coerceValue(value, myPieceAttrib);
380  break;
381  case 14:
382  coerceValue(value, myUseCustomPos);
383  break;
384  case 15:
385  coerceValue(value, myPosAttrib);
386  break;
387  case 16:
388  coerceValue(value, myUseRangeMin);
389  break;
390  case 17:
391  coerceValue(value, myRangeMin);
392  break;
393  case 18:
394  coerceValue(value, myUseRangeMax);
395  break;
396  case 19:
397  coerceValue(value, myRangeMax);
398  break;
399  case 20:
400  coerceValue(value, myUseCenterWidth);
401  break;
402  case 21:
403  coerceValue(value, myWidth);
404  break;
405  case 22:
406  coerceValue(value, myWidthScale);
407  break;
408  case 23:
409  coerceValue(value, myCenterType);
410  break;
411  case 24:
412  coerceValue(value, myFixedCenter);
413  break;
414  case 25:
415  coerceValue(value, myColorramp);
416  break;
417  case 26:
418  coerceValue(value, myVectorScale);
419  break;
420  case 27:
421  coerceValue(value, myAttribName);
422  break;
423  case 28:
424  coerceValue(value, myUseTotalAttrib);
425  break;
426  case 29:
427  coerceValue(value, myTotalAttribName);
428  break;
429  case 30:
430  coerceValue(value, myUseRangeGroup);
431  break;
432  case 31:
433  coerceValue(value, myRangeGroup);
434  break;
435  case 32:
436  coerceValue(value, myBakeIntoOutput);
437  break;
438  case 33:
439  coerceValue(value, myUseRemapRange);
440  break;
441  case 34:
442  coerceValue(value, myRemapRange);
443  break;
444 
445  }
446  }
447 
448  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
449  { doGetParmValue(idx, instance, value); }
450  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
451  { doGetParmValue(idx, instance, value); }
452  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
453  { doGetParmValue(idx, instance, value); }
454  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
455  { doGetParmValue(idx, instance, value); }
456  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
457  { doGetParmValue(idx, instance, value); }
458  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
459  { doGetParmValue(idx, instance, value); }
460  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
461  { doGetParmValue(idx, instance, value); }
462  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
463  { doGetParmValue(idx, instance, value); }
464  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
465  { doGetParmValue(idx, instance, value); }
466  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
467  { doGetParmValue(idx, instance, value); }
468  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
469  { doGetParmValue(idx, instance, value); }
470 
471  template <typename T>
472  void
473  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
474  {
475  if (idx.size() < 1)
476  return;
477  UT_ASSERT(idx.size() == instance.size()+1);
478  if (idx.size() != instance.size()+1)
479  return;
480  switch (idx[0])
481  {
482  case 0:
483  coerceValue(myGroup, value);
484  break;
485  case 1:
486  coerceValue(myGroupType, value);
487  break;
488  case 2:
489  coerceValue(myMeasure, value);
490  break;
491  case 3:
492  coerceValue(myCurvatureType, value);
493  break;
494  case 4:
495  coerceValue(myPrincipalType, value);
496  break;
497  case 5:
498  coerceValue(myPrincipalSign, value);
499  break;
500  case 6:
501  coerceValue(myPrincipalReportAs, value);
502  break;
503  case 7:
504  coerceValue(myUmbilicCutoff, value);
505  break;
506  case 8:
507  coerceValue(myIntegrationMode, value);
508  break;
509  case 9:
510  coerceValue(mySrcAttrib, value);
511  break;
512  case 10:
513  coerceValue(mySrcComp, value);
514  break;
515  case 11:
516  coerceValue(myScaleNormalize, value);
517  break;
518  case 12:
519  coerceValue(myIntegrationDomain, value);
520  break;
521  case 13:
522  coerceValue(myPieceAttrib, value);
523  break;
524  case 14:
525  coerceValue(myUseCustomPos, value);
526  break;
527  case 15:
528  coerceValue(myPosAttrib, value);
529  break;
530  case 16:
531  coerceValue(myUseRangeMin, value);
532  break;
533  case 17:
534  coerceValue(myRangeMin, value);
535  break;
536  case 18:
537  coerceValue(myUseRangeMax, value);
538  break;
539  case 19:
540  coerceValue(myRangeMax, value);
541  break;
542  case 20:
543  coerceValue(myUseCenterWidth, value);
544  break;
545  case 21:
546  coerceValue(myWidth, value);
547  break;
548  case 22:
549  coerceValue(myWidthScale, value);
550  break;
551  case 23:
552  coerceValue(myCenterType, value);
553  break;
554  case 24:
555  coerceValue(myFixedCenter, value);
556  break;
557  case 25:
558  coerceValue(myColorramp, value);
559  break;
560  case 26:
561  coerceValue(myVectorScale, value);
562  break;
563  case 27:
564  coerceValue(myAttribName, value);
565  break;
566  case 28:
567  coerceValue(myUseTotalAttrib, value);
568  break;
569  case 29:
570  coerceValue(myTotalAttribName, value);
571  break;
572  case 30:
573  coerceValue(myUseRangeGroup, value);
574  break;
575  case 31:
576  coerceValue(myRangeGroup, value);
577  break;
578  case 32:
579  coerceValue(myBakeIntoOutput, value);
580  break;
581  case 33:
582  coerceValue(myUseRemapRange, value);
583  break;
584  case 34:
585  coerceValue(myRemapRange, value);
586  break;
587 
588  }
589  }
590 
591  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
592  { doSetParmValue(idx, instance, value); }
593  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
594  { doSetParmValue(idx, instance, value); }
595  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
596  { doSetParmValue(idx, instance, value); }
597  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
598  { doSetParmValue(idx, instance, value); }
599  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
600  { doSetParmValue(idx, instance, value); }
601  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
602  { doSetParmValue(idx, instance, value); }
603  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
604  { doSetParmValue(idx, instance, value); }
605  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
606  { doSetParmValue(idx, instance, value); }
607  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
608  { doSetParmValue(idx, instance, value); }
609  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
610  { doSetParmValue(idx, instance, value); }
611  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
612  { doSetParmValue(idx, instance, value); }
613 
614  exint getNestNumParms(TempIndex idx) const override
615  {
616  if (idx.size() == 0)
617  return 35;
618  switch (idx[0])
619  {
620 
621  }
622  // Invalid
623  return 0;
624  }
625 
626  const char *getNestParmName(TempIndex fieldnum) const override
627  {
628  if (fieldnum.size() < 1)
629  return 0;
630  switch (fieldnum[0])
631  {
632  case 0:
633  return "group";
634  case 1:
635  return "grouptype";
636  case 2:
637  return "measure";
638  case 3:
639  return "curvaturetype";
640  case 4:
641  return "principaltype";
642  case 5:
643  return "principalsign";
644  case 6:
645  return "principalreportas";
646  case 7:
647  return "umbiliccutoff";
648  case 8:
649  return "integrationmode";
650  case 9:
651  return "srcattrib";
652  case 10:
653  return "srccomp";
654  case 11:
655  return "scalenormalize";
656  case 12:
657  return "integrationdomain";
658  case 13:
659  return "pieceattrib";
660  case 14:
661  return "usecustompos";
662  case 15:
663  return "posattrib";
664  case 16:
665  return "userangemin";
666  case 17:
667  return "rangemin";
668  case 18:
669  return "userangemax";
670  case 19:
671  return "rangemax";
672  case 20:
673  return "usecenterwidth";
674  case 21:
675  return "width";
676  case 22:
677  return "widthscale";
678  case 23:
679  return "centertype";
680  case 24:
681  return "fixedcenter";
682  case 25:
683  return "colorramp";
684  case 26:
685  return "vectorscale";
686  case 27:
687  return "attribname";
688  case 28:
689  return "usetotalattrib";
690  case 29:
691  return "totalattribname";
692  case 30:
693  return "userangegroup";
694  case 31:
695  return "rangegroup";
696  case 32:
697  return "bakeintooutput";
698  case 33:
699  return "useremaprange";
700  case 34:
701  return "remaprange";
702 
703  }
704  return 0;
705  }
706 
707  ParmType getNestParmType(TempIndex fieldnum) const override
708  {
709  if (fieldnum.size() < 1)
710  return PARM_UNSUPPORTED;
711  switch (fieldnum[0])
712  {
713  case 0:
714  return PARM_STRING;
715  case 1:
716  return PARM_INTEGER;
717  case 2:
718  return PARM_INTEGER;
719  case 3:
720  return PARM_INTEGER;
721  case 4:
722  return PARM_INTEGER;
723  case 5:
724  return PARM_INTEGER;
725  case 6:
726  return PARM_INTEGER;
727  case 7:
728  return PARM_FLOAT;
729  case 8:
730  return PARM_INTEGER;
731  case 9:
732  return PARM_STRING;
733  case 10:
734  return PARM_INTEGER;
735  case 11:
736  return PARM_INTEGER;
737  case 12:
738  return PARM_INTEGER;
739  case 13:
740  return PARM_STRING;
741  case 14:
742  return PARM_INTEGER;
743  case 15:
744  return PARM_STRING;
745  case 16:
746  return PARM_INTEGER;
747  case 17:
748  return PARM_FLOAT;
749  case 18:
750  return PARM_INTEGER;
751  case 19:
752  return PARM_FLOAT;
753  case 20:
754  return PARM_INTEGER;
755  case 21:
756  return PARM_FLOAT;
757  case 22:
758  return PARM_INTEGER;
759  case 23:
760  return PARM_INTEGER;
761  case 24:
762  return PARM_FLOAT;
763  case 25:
764  return PARM_RAMP;
765  case 26:
766  return PARM_FLOAT;
767  case 27:
768  return PARM_STRING;
769  case 28:
770  return PARM_INTEGER;
771  case 29:
772  return PARM_STRING;
773  case 30:
774  return PARM_INTEGER;
775  case 31:
776  return PARM_STRING;
777  case 32:
778  return PARM_INTEGER;
779  case 33:
780  return PARM_INTEGER;
781  case 34:
782  return PARM_VECTOR2;
783 
784  }
785  return PARM_UNSUPPORTED;
786  }
787 
788  // Boiler plate to load individual types.
789  static void loadData(UT_IStream &is, int64 &v)
790  { is.bread(&v, 1); }
791  static void loadData(UT_IStream &is, bool &v)
792  { int64 iv; is.bread(&iv, 1); v = iv; }
793  static void loadData(UT_IStream &is, fpreal64 &v)
794  { is.bread<fpreal64>(&v, 1); }
795  static void loadData(UT_IStream &is, UT_Vector2D &v)
796  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
797  static void loadData(UT_IStream &is, UT_Vector3D &v)
798  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
799  is.bread<fpreal64>(&v.z(), 1); }
800  static void loadData(UT_IStream &is, UT_Vector4D &v)
801  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
802  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
803  static void loadData(UT_IStream &is, UT_Matrix2D &v)
804  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
805  static void loadData(UT_IStream &is, UT_Matrix3D &v)
806  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
807  static void loadData(UT_IStream &is, UT_Matrix4D &v)
808  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
809  static void loadData(UT_IStream &is, UT_Vector2I &v)
810  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
811  static void loadData(UT_IStream &is, UT_Vector3I &v)
812  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
813  is.bread<int64>(&v.z(), 1); }
814  static void loadData(UT_IStream &is, UT_Vector4I &v)
815  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
816  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
818  { is.bread(v); }
820  { UT_StringHolder rampdata;
821  loadData(is, rampdata);
822  if (rampdata.isstring())
823  {
824  v.reset(new UT_Ramp());
825  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
826  v->load(istr);
827  }
828  else v.reset();
829  }
832  loadData(is, data);
833  if (data.isstring())
834  {
835  // Find the data type.
836  const char *colon = UT_StringWrap(data).findChar(':');
837  if (colon)
838  {
839  int typelen = colon - data.buffer();
841  type.strncpy(data.buffer(), typelen);
842  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
843 
844  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
845  }
846  }
847  else v.reset();
848  }
849 
850  static void saveData(std::ostream &os, int64 v)
851  { UTwrite(os, &v); }
852  static void saveData(std::ostream &os, bool v)
853  { int64 iv = v; UTwrite(os, &iv); }
854  static void saveData(std::ostream &os, fpreal64 v)
855  { UTwrite<fpreal64>(os, &v); }
856  static void saveData(std::ostream &os, UT_Vector2D v)
857  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
858  static void saveData(std::ostream &os, UT_Vector3D v)
859  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
860  UTwrite<fpreal64>(os, &v.z()); }
861  static void saveData(std::ostream &os, UT_Vector4D v)
862  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
863  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
864  static void saveData(std::ostream &os, UT_Matrix2D v)
866  static void saveData(std::ostream &os, UT_Matrix3D v)
868  static void saveData(std::ostream &os, UT_Matrix4D v)
870  static void saveData(std::ostream &os, UT_StringHolder s)
871  { UT_StringWrap(s).saveBinary(os); }
872  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
874  UT_OStringStream ostr;
875  if (s) s->save(ostr);
876  result = ostr.str();
877  saveData(os, result);
878  }
879  static void saveData(std::ostream &os, PRM_DataItemHandle s)
881  UT_OStringStream ostr;
882  if (s)
883  {
884  ostr << s->getDataTypeToken();
885  ostr << ":";
886  s->saveBinary(ostr);
887  }
888  result = ostr.str();
889  saveData(os, result);
890  }
891 
892 
893  void save(std::ostream &os) const
894  {
895  int32 v = version();
896  UTwrite(os, &v);
897  saveData(os, myGroup);
898  saveData(os, myGroupType);
899  saveData(os, myMeasure);
900  saveData(os, myCurvatureType);
901  saveData(os, myPrincipalType);
902  saveData(os, myPrincipalSign);
903  saveData(os, myPrincipalReportAs);
904  saveData(os, myUmbilicCutoff);
905  saveData(os, myIntegrationMode);
906  saveData(os, mySrcAttrib);
907  saveData(os, mySrcComp);
908  saveData(os, myScaleNormalize);
909  saveData(os, myIntegrationDomain);
910  saveData(os, myPieceAttrib);
911  saveData(os, myUseCustomPos);
912  saveData(os, myPosAttrib);
913  saveData(os, myUseRangeMin);
914  saveData(os, myRangeMin);
915  saveData(os, myUseRangeMax);
916  saveData(os, myRangeMax);
917  saveData(os, myUseCenterWidth);
918  saveData(os, myWidth);
919  saveData(os, myWidthScale);
920  saveData(os, myCenterType);
921  saveData(os, myFixedCenter);
922  saveData(os, myColorramp);
923  saveData(os, myVectorScale);
924  saveData(os, myAttribName);
925  saveData(os, myUseTotalAttrib);
926  saveData(os, myTotalAttribName);
927  saveData(os, myUseRangeGroup);
928  saveData(os, myRangeGroup);
929  saveData(os, myBakeIntoOutput);
930  saveData(os, myUseRemapRange);
931  saveData(os, myRemapRange);
932 
933  }
934 
935  bool load(UT_IStream &is)
936  {
937  int32 v;
938  is.bread(&v, 1);
939  if (version() != v)
940  {
941  // Fail incompatible versions
942  return false;
943  }
944  loadData(is, myGroup);
945  loadData(is, myGroupType);
946  loadData(is, myMeasure);
947  loadData(is, myCurvatureType);
948  loadData(is, myPrincipalType);
949  loadData(is, myPrincipalSign);
950  loadData(is, myPrincipalReportAs);
951  loadData(is, myUmbilicCutoff);
952  loadData(is, myIntegrationMode);
953  loadData(is, mySrcAttrib);
954  loadData(is, mySrcComp);
955  loadData(is, myScaleNormalize);
956  loadData(is, myIntegrationDomain);
957  loadData(is, myPieceAttrib);
958  loadData(is, myUseCustomPos);
959  loadData(is, myPosAttrib);
960  loadData(is, myUseRangeMin);
961  loadData(is, myRangeMin);
962  loadData(is, myUseRangeMax);
963  loadData(is, myRangeMax);
964  loadData(is, myUseCenterWidth);
965  loadData(is, myWidth);
966  loadData(is, myWidthScale);
967  loadData(is, myCenterType);
968  loadData(is, myFixedCenter);
969  loadData(is, myColorramp);
970  loadData(is, myVectorScale);
971  loadData(is, myAttribName);
972  loadData(is, myUseTotalAttrib);
973  loadData(is, myTotalAttribName);
974  loadData(is, myUseRangeGroup);
975  loadData(is, myRangeGroup);
976  loadData(is, myBakeIntoOutput);
977  loadData(is, myUseRemapRange);
978  loadData(is, myRemapRange);
979 
980  return true;
981  }
982 
983  const UT_StringHolder & getGroup() const { return myGroup; }
984  void setGroup(const UT_StringHolder & val) { myGroup = val; }
986  {
987  SOP_Node *thissop = cookparms.getNode();
988  if (!thissop) return getGroup();
990  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
991  return result;
992  }
993  GroupType getGroupType() const { return GroupType(myGroupType); }
994  void setGroupType(GroupType val) { myGroupType = int64(val); }
996  {
997  SOP_Node *thissop = cookparms.getNode();
998  if (!thissop) return getGroupType();
999  int64 result;
1000  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
1001  return GroupType(result);
1002  }
1003  Measure getMeasure() const { return Measure(myMeasure); }
1004  void setMeasure(Measure val) { myMeasure = int64(val); }
1006  {
1007  SOP_Node *thissop = cookparms.getNode();
1008  if (!thissop) return getMeasure();
1009  int64 result;
1010  OP_Utils::evalOpParm(result, thissop, "measure", cookparms.getCookTime(), 0);
1011  return Measure(result);
1012  }
1013  CurvatureType getCurvatureType() const { return CurvatureType(myCurvatureType); }
1014  void setCurvatureType(CurvatureType val) { myCurvatureType = int64(val); }
1016  {
1017  SOP_Node *thissop = cookparms.getNode();
1018  if (!thissop) return getCurvatureType();
1019  int64 result;
1020  OP_Utils::evalOpParm(result, thissop, "curvaturetype", cookparms.getCookTime(), 0);
1021  return CurvatureType(result);
1022  }
1023  PrincipalType getPrincipalType() const { return PrincipalType(myPrincipalType); }
1024  void setPrincipalType(PrincipalType val) { myPrincipalType = int64(val); }
1026  {
1027  SOP_Node *thissop = cookparms.getNode();
1028  if (!thissop) return getPrincipalType();
1029  int64 result;
1030  OP_Utils::evalOpParm(result, thissop, "principaltype", cookparms.getCookTime(), 0);
1031  return PrincipalType(result);
1032  }
1033  PrincipalSign getPrincipalSign() const { return PrincipalSign(myPrincipalSign); }
1034  void setPrincipalSign(PrincipalSign val) { myPrincipalSign = int64(val); }
1036  {
1037  SOP_Node *thissop = cookparms.getNode();
1038  if (!thissop) return getPrincipalSign();
1039  int64 result;
1040  OP_Utils::evalOpParm(result, thissop, "principalsign", cookparms.getCookTime(), 0);
1041  return PrincipalSign(result);
1042  }
1043  PrincipalReportAs getPrincipalReportAs() const { return PrincipalReportAs(myPrincipalReportAs); }
1044  void setPrincipalReportAs(PrincipalReportAs val) { myPrincipalReportAs = int64(val); }
1046  {
1047  SOP_Node *thissop = cookparms.getNode();
1048  if (!thissop) return getPrincipalReportAs();
1049  int64 result;
1050  OP_Utils::evalOpParm(result, thissop, "principalreportas", cookparms.getCookTime(), 0);
1051  return PrincipalReportAs(result);
1052  }
1053  fpreal64 getUmbilicCutoff() const { return myUmbilicCutoff; }
1054  void setUmbilicCutoff(fpreal64 val) { myUmbilicCutoff = val; }
1056  {
1057  SOP_Node *thissop = cookparms.getNode();
1058  if (!thissop) return getUmbilicCutoff();
1059  fpreal64 result;
1060  OP_Utils::evalOpParm(result, thissop, "umbiliccutoff", cookparms.getCookTime(), 0);
1061  return result;
1062  }
1063  IntegrationMode getIntegrationMode() const { return IntegrationMode(myIntegrationMode); }
1064  void setIntegrationMode(IntegrationMode val) { myIntegrationMode = int64(val); }
1066  {
1067  SOP_Node *thissop = cookparms.getNode();
1068  if (!thissop) return getIntegrationMode();
1069  int64 result;
1070  OP_Utils::evalOpParm(result, thissop, "integrationmode", cookparms.getCookTime(), 0);
1071  return IntegrationMode(result);
1072  }
1073  const UT_StringHolder & getSrcAttrib() const { return mySrcAttrib; }
1074  void setSrcAttrib(const UT_StringHolder & val) { mySrcAttrib = val; }
1076  {
1077  SOP_Node *thissop = cookparms.getNode();
1078  if (!thissop) return getSrcAttrib();
1080  OP_Utils::evalOpParm(result, thissop, "srcattrib", cookparms.getCookTime(), 0);
1081  return result;
1082  }
1083  SrcComp getSrcComp() const { return SrcComp(mySrcComp); }
1084  void setSrcComp(SrcComp val) { mySrcComp = int64(val); }
1086  {
1087  SOP_Node *thissop = cookparms.getNode();
1088  if (!thissop) return getSrcComp();
1089  int64 result;
1090  OP_Utils::evalOpParm(result, thissop, "srccomp", cookparms.getCookTime(), 0);
1091  return SrcComp(result);
1092  }
1093  bool getScaleNormalize() const { return myScaleNormalize; }
1094  void setScaleNormalize(bool val) { myScaleNormalize = val; }
1095  bool opScaleNormalize(const SOP_NodeVerb::CookParms &cookparms) const
1096  {
1097  SOP_Node *thissop = cookparms.getNode();
1098  if (!thissop) return getScaleNormalize();
1099  bool result;
1100  OP_Utils::evalOpParm(result, thissop, "scalenormalize", cookparms.getCookTime(), 0);
1101  return result;
1102  }
1103  IntegrationDomain getIntegrationDomain() const { return IntegrationDomain(myIntegrationDomain); }
1104  void setIntegrationDomain(IntegrationDomain val) { myIntegrationDomain = int64(val); }
1106  {
1107  SOP_Node *thissop = cookparms.getNode();
1108  if (!thissop) return getIntegrationDomain();
1109  int64 result;
1110  OP_Utils::evalOpParm(result, thissop, "integrationdomain", cookparms.getCookTime(), 0);
1111  return IntegrationDomain(result);
1112  }
1113  const UT_StringHolder & getPieceAttrib() const { return myPieceAttrib; }
1114  void setPieceAttrib(const UT_StringHolder & val) { myPieceAttrib = val; }
1116  {
1117  SOP_Node *thissop = cookparms.getNode();
1118  if (!thissop) return getPieceAttrib();
1120  OP_Utils::evalOpParm(result, thissop, "pieceattrib", cookparms.getCookTime(), 0);
1121  return result;
1122  }
1123  bool getUseCustomPos() const { return myUseCustomPos; }
1124  void setUseCustomPos(bool val) { myUseCustomPos = val; }
1125  bool opUseCustomPos(const SOP_NodeVerb::CookParms &cookparms) const
1126  {
1127  SOP_Node *thissop = cookparms.getNode();
1128  if (!thissop) return getUseCustomPos();
1129  bool result;
1130  OP_Utils::evalOpParm(result, thissop, "usecustompos", cookparms.getCookTime(), 0);
1131  return result;
1132  }
1133  const UT_StringHolder & getPosAttrib() const { return myPosAttrib; }
1134  void setPosAttrib(const UT_StringHolder & val) { myPosAttrib = val; }
1136  {
1137  SOP_Node *thissop = cookparms.getNode();
1138  if (!thissop) return getPosAttrib();
1140  OP_Utils::evalOpParm(result, thissop, "posattrib", cookparms.getCookTime(), 0);
1141  return result;
1142  }
1143  bool getUseRangeMin() const { return myUseRangeMin; }
1144  void setUseRangeMin(bool val) { myUseRangeMin = val; }
1145  bool opUseRangeMin(const SOP_NodeVerb::CookParms &cookparms) const
1146  {
1147  SOP_Node *thissop = cookparms.getNode();
1148  if (!thissop) return getUseRangeMin();
1149  bool result;
1150  OP_Utils::evalOpParm(result, thissop, "userangemin", cookparms.getCookTime(), 0);
1151  return result;
1152  }
1153  fpreal64 getRangeMin() const { return myRangeMin; }
1154  void setRangeMin(fpreal64 val) { myRangeMin = val; }
1156  {
1157  SOP_Node *thissop = cookparms.getNode();
1158  if (!thissop) return getRangeMin();
1159  fpreal64 result;
1160  OP_Utils::evalOpParm(result, thissop, "rangemin", cookparms.getCookTime(), 0);
1161  return result;
1162  }
1163  bool getUseRangeMax() const { return myUseRangeMax; }
1164  void setUseRangeMax(bool val) { myUseRangeMax = val; }
1165  bool opUseRangeMax(const SOP_NodeVerb::CookParms &cookparms) const
1166  {
1167  SOP_Node *thissop = cookparms.getNode();
1168  if (!thissop) return getUseRangeMax();
1169  bool result;
1170  OP_Utils::evalOpParm(result, thissop, "userangemax", cookparms.getCookTime(), 0);
1171  return result;
1172  }
1173  fpreal64 getRangeMax() const { return myRangeMax; }
1174  void setRangeMax(fpreal64 val) { myRangeMax = val; }
1176  {
1177  SOP_Node *thissop = cookparms.getNode();
1178  if (!thissop) return getRangeMax();
1179  fpreal64 result;
1180  OP_Utils::evalOpParm(result, thissop, "rangemax", cookparms.getCookTime(), 0);
1181  return result;
1182  }
1183  bool getUseCenterWidth() const { return myUseCenterWidth; }
1184  void setUseCenterWidth(bool val) { myUseCenterWidth = val; }
1185  bool opUseCenterWidth(const SOP_NodeVerb::CookParms &cookparms) const
1186  {
1187  SOP_Node *thissop = cookparms.getNode();
1188  if (!thissop) return getUseCenterWidth();
1189  bool result;
1190  OP_Utils::evalOpParm(result, thissop, "usecenterwidth", cookparms.getCookTime(), 0);
1191  return result;
1192  }
1193  fpreal64 getWidth() const { return myWidth; }
1194  void setWidth(fpreal64 val) { myWidth = val; }
1195  fpreal64 opWidth(const SOP_NodeVerb::CookParms &cookparms) const
1196  {
1197  SOP_Node *thissop = cookparms.getNode();
1198  if (!thissop) return getWidth();
1199  fpreal64 result;
1200  OP_Utils::evalOpParm(result, thissop, "width", cookparms.getCookTime(), 0);
1201  return result;
1202  }
1203  WidthScale getWidthScale() const { return WidthScale(myWidthScale); }
1204  void setWidthScale(WidthScale val) { myWidthScale = int64(val); }
1206  {
1207  SOP_Node *thissop = cookparms.getNode();
1208  if (!thissop) return getWidthScale();
1209  int64 result;
1210  OP_Utils::evalOpParm(result, thissop, "widthscale", cookparms.getCookTime(), 0);
1211  return WidthScale(result);
1212  }
1213  CenterType getCenterType() const { return CenterType(myCenterType); }
1214  void setCenterType(CenterType val) { myCenterType = int64(val); }
1216  {
1217  SOP_Node *thissop = cookparms.getNode();
1218  if (!thissop) return getCenterType();
1219  int64 result;
1220  OP_Utils::evalOpParm(result, thissop, "centertype", cookparms.getCookTime(), 0);
1221  return CenterType(result);
1222  }
1223  fpreal64 getFixedCenter() const { return myFixedCenter; }
1224  void setFixedCenter(fpreal64 val) { myFixedCenter = val; }
1226  {
1227  SOP_Node *thissop = cookparms.getNode();
1228  if (!thissop) return getFixedCenter();
1229  fpreal64 result;
1230  OP_Utils::evalOpParm(result, thissop, "fixedcenter", cookparms.getCookTime(), 0);
1231  return result;
1232  }
1233  UT_SharedPtr<UT_Ramp> getColorramp() const { return myColorramp; }
1234  void setColorramp(UT_SharedPtr<UT_Ramp> val) { myColorramp = val; }
1236  {
1237  SOP_Node *thissop = cookparms.getNode();
1238  if (!thissop) return getColorramp();
1240  OP_Utils::evalOpParm(result, thissop, "colorramp", cookparms.getCookTime(), 0);
1241  return result;
1242  }
1243  fpreal64 getVectorScale() const { return myVectorScale; }
1244  void setVectorScale(fpreal64 val) { myVectorScale = val; }
1246  {
1247  SOP_Node *thissop = cookparms.getNode();
1248  if (!thissop) return getVectorScale();
1249  fpreal64 result;
1250  OP_Utils::evalOpParm(result, thissop, "vectorscale", cookparms.getCookTime(), 0);
1251  return result;
1252  }
1253  const UT_StringHolder & getAttribName() const { return myAttribName; }
1254  void setAttribName(const UT_StringHolder & val) { myAttribName = val; }
1256  {
1257  SOP_Node *thissop = cookparms.getNode();
1258  if (!thissop) return getAttribName();
1260  OP_Utils::evalOpParm(result, thissop, "attribname", cookparms.getCookTime(), 0);
1261  return result;
1262  }
1263  bool getUseTotalAttrib() const { return myUseTotalAttrib; }
1264  void setUseTotalAttrib(bool val) { myUseTotalAttrib = val; }
1265  bool opUseTotalAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1266  {
1267  SOP_Node *thissop = cookparms.getNode();
1268  if (!thissop) return getUseTotalAttrib();
1269  bool result;
1270  OP_Utils::evalOpParm(result, thissop, "usetotalattrib", cookparms.getCookTime(), 0);
1271  return result;
1272  }
1273  const UT_StringHolder & getTotalAttribName() const { return myTotalAttribName; }
1274  void setTotalAttribName(const UT_StringHolder & val) { myTotalAttribName = val; }
1276  {
1277  SOP_Node *thissop = cookparms.getNode();
1278  if (!thissop) return getTotalAttribName();
1280  OP_Utils::evalOpParm(result, thissop, "totalattribname", cookparms.getCookTime(), 0);
1281  return result;
1282  }
1283  bool getUseRangeGroup() const { return myUseRangeGroup; }
1284  void setUseRangeGroup(bool val) { myUseRangeGroup = val; }
1285  bool opUseRangeGroup(const SOP_NodeVerb::CookParms &cookparms) const
1286  {
1287  SOP_Node *thissop = cookparms.getNode();
1288  if (!thissop) return getUseRangeGroup();
1289  bool result;
1290  OP_Utils::evalOpParm(result, thissop, "userangegroup", cookparms.getCookTime(), 0);
1291  return result;
1292  }
1293  const UT_StringHolder & getRangeGroup() const { return myRangeGroup; }
1294  void setRangeGroup(const UT_StringHolder & val) { myRangeGroup = val; }
1296  {
1297  SOP_Node *thissop = cookparms.getNode();
1298  if (!thissop) return getRangeGroup();
1300  OP_Utils::evalOpParm(result, thissop, "rangegroup", cookparms.getCookTime(), 0);
1301  return result;
1302  }
1303  bool getBakeIntoOutput() const { return myBakeIntoOutput; }
1304  void setBakeIntoOutput(bool val) { myBakeIntoOutput = val; }
1305  bool opBakeIntoOutput(const SOP_NodeVerb::CookParms &cookparms) const
1306  {
1307  SOP_Node *thissop = cookparms.getNode();
1308  if (!thissop) return getBakeIntoOutput();
1309  bool result;
1310  OP_Utils::evalOpParm(result, thissop, "bakeintooutput", cookparms.getCookTime(), 0);
1311  return result;
1312  }
1313  bool getUseRemapRange() const { return myUseRemapRange; }
1314  void setUseRemapRange(bool val) { myUseRemapRange = val; }
1315  bool opUseRemapRange(const SOP_NodeVerb::CookParms &cookparms) const
1316  {
1317  SOP_Node *thissop = cookparms.getNode();
1318  if (!thissop) return getUseRemapRange();
1319  bool result;
1320  OP_Utils::evalOpParm(result, thissop, "useremaprange", cookparms.getCookTime(), 0);
1321  return result;
1322  }
1323  UT_Vector2D getRemapRange() const { return myRemapRange; }
1324  void setRemapRange(UT_Vector2D val) { myRemapRange = val; }
1326  {
1327  SOP_Node *thissop = cookparms.getNode();
1328  if (!thissop) return getRemapRange();
1330  OP_Utils::evalOpParm(result, thissop, "remaprange", cookparms.getCookTime(), 0);
1331  return result;
1332  }
1333 
1334 private:
1335  UT_StringHolder myGroup;
1336  int64 myGroupType;
1337  int64 myMeasure;
1338  int64 myCurvatureType;
1339  int64 myPrincipalType;
1340  int64 myPrincipalSign;
1341  int64 myPrincipalReportAs;
1342  fpreal64 myUmbilicCutoff;
1343  int64 myIntegrationMode;
1344  UT_StringHolder mySrcAttrib;
1345  int64 mySrcComp;
1346  bool myScaleNormalize;
1347  int64 myIntegrationDomain;
1348  UT_StringHolder myPieceAttrib;
1349  bool myUseCustomPos;
1350  UT_StringHolder myPosAttrib;
1351  bool myUseRangeMin;
1352  fpreal64 myRangeMin;
1353  bool myUseRangeMax;
1354  fpreal64 myRangeMax;
1355  bool myUseCenterWidth;
1356  fpreal64 myWidth;
1357  int64 myWidthScale;
1358  int64 myCenterType;
1359  fpreal64 myFixedCenter;
1360  UT_SharedPtr<UT_Ramp> myColorramp;
1361  fpreal64 myVectorScale;
1362  UT_StringHolder myAttribName;
1363  bool myUseTotalAttrib;
1364  UT_StringHolder myTotalAttribName;
1365  bool myUseRangeGroup;
1366  UT_StringHolder myRangeGroup;
1367  bool myBakeIntoOutput;
1368  bool myUseRemapRange;
1369  UT_Vector2D myRemapRange;
1370 
1371 };
const UT_StringHolder & getPieceAttrib() const
GLdouble s
Definition: glew.h:1390
Measure opMeasure(const SOP_NodeVerb::CookParms &cookparms) const
CenterType opCenterType(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
bool opUseRangeGroup(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getAttribName() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opPieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
PrincipalType getPrincipalType() const
SrcComp opSrcComp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void setWidth(fpreal64 val)
static void loadData(UT_IStream &is, bool &v)
fpreal64 opWidth(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setPrincipalReportAs(PrincipalReportAs val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setRangeMax(fpreal64 val)
bool opBakeIntoOutput(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< UT_Ramp > getColorramp() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
CurvatureType getCurvatureType() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool opUseRangeMin(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector2T< fpreal64 > UT_Vector2D
WidthScale opWidthScale(const SOP_NodeVerb::CookParms &cookparms) const
GLuint const GLfloat * val
Definition: glew.h:2794
IntegrationMode opIntegrationMode(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_StringHolder & getTotalAttribName() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setIntegrationMode(IntegrationMode val)
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
PrincipalReportAs opPrincipalReportAs(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
void copyFrom(const SOP_NodeParms *src) override
IntegrationDomain opIntegrationDomain(const SOP_NodeVerb::CookParms &cookparms) const
CenterType getCenterType() const
const GLdouble * v
Definition: glew.h:1391
UT_SharedPtr< UT_Ramp > opColorramp(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opVectorScale(const SOP_NodeVerb::CookParms &cookparms) const
void setUmbilicCutoff(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector2D v)
IntegrationDomain getIntegrationDomain() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
GroupType getGroupType() const
CurvatureType opCurvatureType(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSrcAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setPosAttrib(const UT_StringHolder &val)
IntegrationMode getIntegrationMode() const
bool opUseCenterWidth(const SOP_NodeVerb::CookParms &cookparms) const
void setIntegrationDomain(IntegrationDomain val)
UT_StringHolder opRangeGroup(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
bool opUseRemapRange(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSrcAttrib(const SOP_NodeVerb::CookParms &cookparms) const
PrincipalType opPrincipalType(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector2D getRemapRange() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool opUseTotalAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setMeasure(Measure val)
void setVectorScale(fpreal64 val)
exint length() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setRemapRange(UT_Vector2D val)
void setRangeGroup(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
PrincipalSign getPrincipalSign() const
void setPrincipalType(PrincipalType val)
void setGroup(const UT_StringHolder &val)
PrincipalSign opPrincipalSign(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setTotalAttribName(const UT_StringHolder &val)
bool operator==(const SOP_Measure_2_0Parms &src) const
void setColorramp(UT_SharedPtr< UT_Ramp > val)
bool opUseRangeMax(const SOP_NodeVerb::CookParms &cookparms) const
const GLfloat * c
Definition: glew.h:16296
fpreal64 opFixedCenter(const SOP_NodeVerb::CookParms &cookparms) const
void setPieceAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
long long int64
Definition: SYS_Types.h:116
fpreal64 opRangeMin(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opRangeMax(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
fpreal64 getVectorScale() const
void setAttribName(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
void setRangeMin(fpreal64 val)
void save(std::ostream &os) const
fpreal64 getRangeMin() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void setFixedCenter(fpreal64 val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_Vector2D opRemapRange(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opUseCustomPos(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
#define SCALAR(T)
Simplify checking for scalar types.
Definition: GA_Handle.h:412
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opPosAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
void setGroupType(GroupType val)
WidthScale getWidthScale() const
void setCurvatureType(CurvatureType val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
#define SOP_API
Definition: SOP_API.h:10
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Vector3D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
const UT_StringHolder & getRangeGroup() const
GLuint64EXT * result
Definition: glew.h:14007
void setPrincipalSign(PrincipalSign val)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
fpreal64 opUmbilicCutoff(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_StringHolder opTotalAttribName(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getFixedCenter() const
UT_StringHolder opAttribName(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getUmbilicCutoff() const
void setCenterType(CenterType val)
bool opScaleNormalize(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
PrincipalReportAs getPrincipalReportAs() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setSrcAttrib(const UT_StringHolder &val)
GLsizei const GLfloat * value
Definition: glew.h:1849
static void loadData(UT_IStream &is, UT_Matrix2D &v)
fpreal64 getRangeMax() const
bool operator!=(const SOP_Measure_2_0Parms &src) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
static void saveData(std::ostream &os, int64 v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void loadFromOpSubclass(const LoadParms &loadparms) override
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getPosAttrib() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void setSrcComp(SrcComp val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
void setWidthScale(WidthScale val)