HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Resample.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_ResampleEnums
22 {
23  enum class Method
24  {
25  DIST = 0,
26  X,
27  Y,
28  Z
29  };
30  enum class Measure
31  {
32  ARC = 0,
33  CHORD
34  };
35  enum class Treatpolysas
36  {
37  STRAIGHT = 0,
38  SUBD,
39  INTERP
40  };
41 }
42 
43 
45 {
46 public:
47  static int version() { return 1; }
48 
50  {
51  myGroup = ""_sh;
52  myLod = 1;
53  myEdge = false;
54  myMethod = 0;
55  myMeasure = 0;
56  myDolength = true;
57  myLength = 0.1;
58  myDosegs = false;
59  mySegs = 10;
60  myUseattribs = true;
61  myAllequal = true;
62  myLast = false;
63  myRandomshift = false;
64  myOnlypoints = false;
65  myTreatpolysas = 0;
66  myOutputsubdpoly = false;
67  myDoptdistattr = false;
68  myPtdistattr = "ptdist"_sh;
69  myDotangentattr = false;
70  myTangentattr = "tangentu"_sh;
71  myDocurveuattr = false;
72  myCurveuattr = "curveu"_sh;
73  myDocurvenumattr = false;
74  myCurvenumattr = "curvenum"_sh;
75 
76  }
77 
78  explicit SOP_ResampleParms(const SOP_ResampleParms &) = default;
79 
80  virtual ~SOP_ResampleParms() {}
81 
82  bool operator==(const SOP_ResampleParms &src) const
83  {
84  if (myGroup != src.myGroup) return false;
85  if (myLod != src.myLod) return false;
86  if (myEdge != src.myEdge) return false;
87  if (myMethod != src.myMethod) return false;
88  if (myMeasure != src.myMeasure) return false;
89  if (myDolength != src.myDolength) return false;
90  if (myLength != src.myLength) return false;
91  if (myDosegs != src.myDosegs) return false;
92  if (mySegs != src.mySegs) return false;
93  if (myUseattribs != src.myUseattribs) return false;
94  if (myAllequal != src.myAllequal) return false;
95  if (myLast != src.myLast) return false;
96  if (myRandomshift != src.myRandomshift) return false;
97  if (myOnlypoints != src.myOnlypoints) return false;
98  if (myTreatpolysas != src.myTreatpolysas) return false;
99  if (myOutputsubdpoly != src.myOutputsubdpoly) return false;
100  if (myDoptdistattr != src.myDoptdistattr) return false;
101  if (myPtdistattr != src.myPtdistattr) return false;
102  if (myDotangentattr != src.myDotangentattr) return false;
103  if (myTangentattr != src.myTangentattr) return false;
104  if (myDocurveuattr != src.myDocurveuattr) return false;
105  if (myCurveuattr != src.myCurveuattr) return false;
106  if (myDocurvenumattr != src.myDocurvenumattr) return false;
107  if (myCurvenumattr != src.myCurvenumattr) return false;
108 
109  return true;
110  }
111  bool operator!=(const SOP_ResampleParms &src) const
112  {
113  return !operator==(src);
114  }
118 
119 
120 
121  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
122  {
123  if (true)
124  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
125  else myGroup = ""_sh;
126  if (true)
127  OP_Utils::evalOpParm(myLod, node, "lod", time, 0);
128  else myLod = 1;
129  if (true)
130  OP_Utils::evalOpParm(myEdge, node, "edge", time, 0);
131  else myEdge = false;
132  if (true)
133  OP_Utils::evalOpParm(myMethod, node, "method", time, 0);
134  else myMethod = 0;
135  if (true)
136  OP_Utils::evalOpParm(myMeasure, node, "measure", time, 0);
137  else myMeasure = 0;
138  if (true)
139  OP_Utils::evalOpParm(myDolength, node, "dolength", time, 0);
140  else myDolength = true;
141  if (true && ( (!(((getDolength()==0)))) ) )
142  OP_Utils::evalOpParm(myLength, node, "length", time, 0);
143  else myLength = 0.1;
144  if (true)
145  OP_Utils::evalOpParm(myDosegs, node, "dosegs", time, 0);
146  else myDosegs = false;
147  if (true && ( (!(((getDosegs()==0)))) ) )
148  OP_Utils::evalOpParm(mySegs, node, "segs", time, 0);
149  else mySegs = 10;
150  if (true)
151  OP_Utils::evalOpParm(myUseattribs, node, "useattribs", time, 0);
152  else myUseattribs = true;
153  if (true && ( (!(((getDolength()==0))||((getEdge()==1))||((int64(getMeasure())!=0))||((int64(getMethod())!=0)))) ) )
154  OP_Utils::evalOpParm(myAllequal, node, "allequal", time, 0);
155  else myAllequal = true;
156  if (true && ( (!(((getDolength()==0))||((getEdge()==1))||((getDolength()==1)&&(getEdge()==0)&&(int64(getMeasure())==0)&&(int64(getMethod())==0)&&(getAllequal()==1)))) ) )
157  OP_Utils::evalOpParm(myLast, node, "last", time, 0);
158  else myLast = false;
159  if (true && ( (!(((getDolength()==0))||((getEdge()==1))||((getDolength()==1)&&(getEdge()==0)&&(int64(getMeasure())==0)&&(int64(getMethod())==0)&&(getAllequal()==1)))) ) )
160  OP_Utils::evalOpParm(myRandomshift, node, "randomshift", time, 0);
161  else myRandomshift = false;
162  if (true)
163  OP_Utils::evalOpParm(myOnlypoints, node, "onlypoints", time, 0);
164  else myOnlypoints = false;
165  if (true)
166  OP_Utils::evalOpParm(myTreatpolysas, node, "treatpolysas", time, 0);
167  else myTreatpolysas = 0;
168  if (true)
169  OP_Utils::evalOpParm(myOutputsubdpoly, node, "outputsubdpoly", time, 0);
170  else myOutputsubdpoly = false;
171  if (true)
172  OP_Utils::evalOpParm(myDoptdistattr, node, "doptdistattr", time, 0);
173  else myDoptdistattr = false;
174  if (true && ( (!(((getDoptdistattr()==0)))) ) )
175  OP_Utils::evalOpParm(myPtdistattr, node, "ptdistattr", time, 0);
176  else myPtdistattr = "ptdist"_sh;
177  if (true)
178  OP_Utils::evalOpParm(myDotangentattr, node, "dotangentattr", time, 0);
179  else myDotangentattr = false;
180  if (true && ( (!(((getDotangentattr()==0)))) ) )
181  OP_Utils::evalOpParm(myTangentattr, node, "tangentattr", time, 0);
182  else myTangentattr = "tangentu"_sh;
183  if (true)
184  OP_Utils::evalOpParm(myDocurveuattr, node, "docurveuattr", time, 0);
185  else myDocurveuattr = false;
186  if (true && ( (!(((getDocurveuattr()==0)))) ) )
187  OP_Utils::evalOpParm(myCurveuattr, node, "curveuattr", time, 0);
188  else myCurveuattr = "curveu"_sh;
189  if (true)
190  OP_Utils::evalOpParm(myDocurvenumattr, node, "docurvenumattr", time, 0);
191  else myDocurvenumattr = false;
192  if (true && ( (!(((getDocurvenumattr()==0)))) ) )
193  OP_Utils::evalOpParm(myCurvenumattr, node, "curvenumattr", time, 0);
194  else myCurvenumattr = "curvenum"_sh;
195 
196  }
197 
198 
199  virtual void loadFromOpSubclass(const LoadParms &loadparms)
200  {
201  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
202  }
203 
204 
205  virtual void copyFrom(const SOP_NodeParms *src)
206  {
207  *this = *((const SOP_ResampleParms *)src);
208  }
209 
210  template <typename T>
211  void
212  doGetParmValue(exint idx, T &value) const
213  {
214  switch (idx)
215  {
216  case 0:
217  coerceValue(value, myGroup);
218  break;
219  case 1:
220  coerceValue(value, myLod);
221  break;
222  case 2:
223  coerceValue(value, myEdge);
224  break;
225  case 3:
226  coerceValue(value, myMethod);
227  break;
228  case 4:
229  coerceValue(value, myMeasure);
230  break;
231  case 5:
232  coerceValue(value, myDolength);
233  break;
234  case 6:
235  coerceValue(value, myLength);
236  break;
237  case 7:
238  coerceValue(value, myDosegs);
239  break;
240  case 8:
241  coerceValue(value, mySegs);
242  break;
243  case 9:
244  coerceValue(value, myUseattribs);
245  break;
246  case 10:
247  coerceValue(value, myAllequal);
248  break;
249  case 11:
250  coerceValue(value, myLast);
251  break;
252  case 12:
253  coerceValue(value, myRandomshift);
254  break;
255  case 13:
256  coerceValue(value, myOnlypoints);
257  break;
258  case 14:
259  coerceValue(value, myTreatpolysas);
260  break;
261  case 15:
262  coerceValue(value, myOutputsubdpoly);
263  break;
264  case 16:
265  coerceValue(value, myDoptdistattr);
266  break;
267  case 17:
268  coerceValue(value, myPtdistattr);
269  break;
270  case 18:
271  coerceValue(value, myDotangentattr);
272  break;
273  case 19:
274  coerceValue(value, myTangentattr);
275  break;
276  case 20:
277  coerceValue(value, myDocurveuattr);
278  break;
279  case 21:
280  coerceValue(value, myCurveuattr);
281  break;
282  case 22:
283  coerceValue(value, myDocurvenumattr);
284  break;
285  case 23:
286  coerceValue(value, myCurvenumattr);
287  break;
288 
289  }
290  }
291 
292  void getParmValue(exint idx, exint &value) const
293  { doGetParmValue(idx, value); }
294  void getParmValue(exint idx, fpreal &value) const
295  { doGetParmValue(idx, value); }
297  { doGetParmValue(idx, value); }
299  { doGetParmValue(idx, value); }
301  { doGetParmValue(idx, value); }
303  { doGetParmValue(idx, value); }
305  { doGetParmValue(idx, value); }
307  { doGetParmValue(idx, value); }
309  { doGetParmValue(idx, value); }
311  { doGetParmValue(idx, value); }
313  { doGetParmValue(idx, value); }
314 
315  template <typename T>
316  void
317  doSetParmValue(exint idx, const T &value)
318  {
319  switch (idx)
320  {
321  case 0:
322  coerceValue(myGroup, value);
323  break;
324  case 1:
325  coerceValue(myLod, value);
326  break;
327  case 2:
328  coerceValue(myEdge, value);
329  break;
330  case 3:
331  coerceValue(myMethod, value);
332  break;
333  case 4:
334  coerceValue(myMeasure, value);
335  break;
336  case 5:
337  coerceValue(myDolength, value);
338  break;
339  case 6:
340  coerceValue(myLength, value);
341  break;
342  case 7:
343  coerceValue(myDosegs, value);
344  break;
345  case 8:
346  coerceValue(mySegs, value);
347  break;
348  case 9:
349  coerceValue(myUseattribs, value);
350  break;
351  case 10:
352  coerceValue(myAllequal, value);
353  break;
354  case 11:
355  coerceValue(myLast, value);
356  break;
357  case 12:
358  coerceValue(myRandomshift, value);
359  break;
360  case 13:
361  coerceValue(myOnlypoints, value);
362  break;
363  case 14:
364  coerceValue(myTreatpolysas, value);
365  break;
366  case 15:
367  coerceValue(myOutputsubdpoly, value);
368  break;
369  case 16:
370  coerceValue(myDoptdistattr, value);
371  break;
372  case 17:
373  coerceValue(myPtdistattr, value);
374  break;
375  case 18:
376  coerceValue(myDotangentattr, value);
377  break;
378  case 19:
379  coerceValue(myTangentattr, value);
380  break;
381  case 20:
382  coerceValue(myDocurveuattr, value);
383  break;
384  case 21:
385  coerceValue(myCurveuattr, value);
386  break;
387  case 22:
388  coerceValue(myDocurvenumattr, value);
389  break;
390  case 23:
391  coerceValue(myCurvenumattr, value);
392  break;
393 
394  }
395  }
396 
397  void setParmValue(exint idx, const exint &value)
398  { doSetParmValue(idx, value); }
399  void setParmValue(exint idx, const fpreal &value)
400  { doSetParmValue(idx, value); }
401  void setParmValue(exint idx, const UT_Vector2D &value)
402  { doSetParmValue(idx, value); }
403  void setParmValue(exint idx, const UT_Vector3D &value)
404  { doSetParmValue(idx, value); }
405  void setParmValue(exint idx, const UT_Vector4D &value)
406  { doSetParmValue(idx, value); }
407  void setParmValue(exint idx, const UT_Matrix2D &value)
408  { doSetParmValue(idx, value); }
409  void setParmValue(exint idx, const UT_Matrix3D &value)
410  { doSetParmValue(idx, value); }
411  void setParmValue(exint idx, const UT_Matrix4D &value)
412  { doSetParmValue(idx, value); }
414  { doSetParmValue(idx, value); }
416  { doSetParmValue(idx, value); }
418  { doSetParmValue(idx, value); }
419 
420  virtual exint getNumParms() const
421  {
422  return 24;
423  }
424 
425  virtual const char *getParmName(exint fieldnum) const
426  {
427  switch (fieldnum)
428  {
429  case 0:
430  return "group";
431  case 1:
432  return "lod";
433  case 2:
434  return "edge";
435  case 3:
436  return "method";
437  case 4:
438  return "measure";
439  case 5:
440  return "dolength";
441  case 6:
442  return "length";
443  case 7:
444  return "dosegs";
445  case 8:
446  return "segs";
447  case 9:
448  return "useattribs";
449  case 10:
450  return "allequal";
451  case 11:
452  return "last";
453  case 12:
454  return "randomshift";
455  case 13:
456  return "onlypoints";
457  case 14:
458  return "treatpolysas";
459  case 15:
460  return "outputsubdpoly";
461  case 16:
462  return "doptdistattr";
463  case 17:
464  return "ptdistattr";
465  case 18:
466  return "dotangentattr";
467  case 19:
468  return "tangentattr";
469  case 20:
470  return "docurveuattr";
471  case 21:
472  return "curveuattr";
473  case 22:
474  return "docurvenumattr";
475  case 23:
476  return "curvenumattr";
477 
478  }
479  return 0;
480  }
481 
482  virtual ParmType getParmType(exint fieldnum) const
483  {
484  switch (fieldnum)
485  {
486  case 0:
487  return PARM_STRING;
488  case 1:
489  return PARM_FLOAT;
490  case 2:
491  return PARM_INTEGER;
492  case 3:
493  return PARM_INTEGER;
494  case 4:
495  return PARM_INTEGER;
496  case 5:
497  return PARM_INTEGER;
498  case 6:
499  return PARM_FLOAT;
500  case 7:
501  return PARM_INTEGER;
502  case 8:
503  return PARM_INTEGER;
504  case 9:
505  return PARM_INTEGER;
506  case 10:
507  return PARM_INTEGER;
508  case 11:
509  return PARM_INTEGER;
510  case 12:
511  return PARM_INTEGER;
512  case 13:
513  return PARM_INTEGER;
514  case 14:
515  return PARM_INTEGER;
516  case 15:
517  return PARM_INTEGER;
518  case 16:
519  return PARM_INTEGER;
520  case 17:
521  return PARM_STRING;
522  case 18:
523  return PARM_INTEGER;
524  case 19:
525  return PARM_STRING;
526  case 20:
527  return PARM_INTEGER;
528  case 21:
529  return PARM_STRING;
530  case 22:
531  return PARM_INTEGER;
532  case 23:
533  return PARM_STRING;
534 
535  }
536  return PARM_UNSUPPORTED;
537  }
538 
539  // Boiler plate to load individual types.
540  static void loadData(UT_IStream &is, int64 &v)
541  { is.bread(&v, 1); }
542  static void loadData(UT_IStream &is, bool &v)
543  { int64 iv; is.bread(&iv, 1); v = iv; }
544  static void loadData(UT_IStream &is, fpreal64 &v)
545  { is.bread<fpreal64>(&v, 1); }
546  static void loadData(UT_IStream &is, UT_Vector2D &v)
547  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
548  static void loadData(UT_IStream &is, UT_Vector3D &v)
549  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
550  is.bread<fpreal64>(&v.z(), 1); }
551  static void loadData(UT_IStream &is, UT_Vector4D &v)
552  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
553  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
554  static void loadData(UT_IStream &is, UT_Matrix2D &v)
555  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
556  static void loadData(UT_IStream &is, UT_Matrix3D &v)
557  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
558  static void loadData(UT_IStream &is, UT_Matrix4D &v)
559  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
560  static void loadData(UT_IStream &is, UT_Vector2I &v)
561  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
562  static void loadData(UT_IStream &is, UT_Vector3I &v)
563  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
564  is.bread<int64>(&v.z(), 1); }
565  static void loadData(UT_IStream &is, UT_Vector4I &v)
566  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
567  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
569  { is.bread(v); }
571  { UT_StringHolder rampdata;
572  loadData(is, rampdata);
573  if (rampdata.isstring())
574  {
575  v.reset(new UT_Ramp());
576  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
577  v->load(istr);
578  }
579  else v.reset();
580  }
583  loadData(is, data);
584  if (data.isstring())
585  {
586  // Find the data type.
587  char *colon = UT_StringWrap(data).findChar(':');
588  if (colon)
589  {
590  int typelen = colon - data.buffer();
592  type.strncpy(data.buffer(), typelen);
593  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
594 
595  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
596  }
597  }
598  else v.reset();
599  }
600 
601  static void saveData(std::ostream &os, int64 v)
602  { UTwrite(os, &v); }
603  static void saveData(std::ostream &os, bool v)
604  { int64 iv = v; UTwrite(os, &iv); }
605  static void saveData(std::ostream &os, fpreal64 v)
606  { UTwrite<fpreal64>(os, &v); }
607  static void saveData(std::ostream &os, UT_Vector2D v)
608  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
609  static void saveData(std::ostream &os, UT_Vector3D v)
610  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
611  UTwrite<fpreal64>(os, &v.z()); }
612  static void saveData(std::ostream &os, UT_Vector4D v)
613  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
614  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
615  static void saveData(std::ostream &os, UT_Matrix2D v)
617  static void saveData(std::ostream &os, UT_Matrix3D v)
619  static void saveData(std::ostream &os, UT_Matrix4D v)
621  static void saveData(std::ostream &os, UT_StringHolder s)
622  { UT_StringWrap(s).saveBinary(os); }
623  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
624  { UT_StringHolder result;
625  UT_OStringStream ostr;
626  if (s) s->save(ostr);
627  result = ostr.str();
628  saveData(os, result);
629  }
630  static void saveData(std::ostream &os, PRM_DataItemHandle s)
631  { UT_StringHolder result;
632  UT_OStringStream ostr;
633  if (s)
634  {
635  ostr << s->getDataTypeToken();
636  ostr << ":";
637  s->saveBinary(ostr);
638  }
639  result = ostr.str();
640  saveData(os, result);
641  }
642 
643 
644  void save(std::ostream &os) const
645  {
646  int32 v = version();
647  UTwrite(os, &v);
648  saveData(os, myGroup);
649  saveData(os, myLod);
650  saveData(os, myEdge);
651  saveData(os, myMethod);
652  saveData(os, myMeasure);
653  saveData(os, myDolength);
654  saveData(os, myLength);
655  saveData(os, myDosegs);
656  saveData(os, mySegs);
657  saveData(os, myUseattribs);
658  saveData(os, myAllequal);
659  saveData(os, myLast);
660  saveData(os, myRandomshift);
661  saveData(os, myOnlypoints);
662  saveData(os, myTreatpolysas);
663  saveData(os, myOutputsubdpoly);
664  saveData(os, myDoptdistattr);
665  saveData(os, myPtdistattr);
666  saveData(os, myDotangentattr);
667  saveData(os, myTangentattr);
668  saveData(os, myDocurveuattr);
669  saveData(os, myCurveuattr);
670  saveData(os, myDocurvenumattr);
671  saveData(os, myCurvenumattr);
672 
673  }
674 
675  bool load(UT_IStream &is)
676  {
677  int32 v;
678  is.bread(&v, 1);
679  if (version() != v)
680  {
681  // Fail incompatible versions
682  return false;
683  }
684  loadData(is, myGroup);
685  loadData(is, myLod);
686  loadData(is, myEdge);
687  loadData(is, myMethod);
688  loadData(is, myMeasure);
689  loadData(is, myDolength);
690  loadData(is, myLength);
691  loadData(is, myDosegs);
692  loadData(is, mySegs);
693  loadData(is, myUseattribs);
694  loadData(is, myAllequal);
695  loadData(is, myLast);
696  loadData(is, myRandomshift);
697  loadData(is, myOnlypoints);
698  loadData(is, myTreatpolysas);
699  loadData(is, myOutputsubdpoly);
700  loadData(is, myDoptdistattr);
701  loadData(is, myPtdistattr);
702  loadData(is, myDotangentattr);
703  loadData(is, myTangentattr);
704  loadData(is, myDocurveuattr);
705  loadData(is, myCurveuattr);
706  loadData(is, myDocurvenumattr);
707  loadData(is, myCurvenumattr);
708 
709  return true;
710  }
711 
712  const UT_StringHolder & getGroup() const { return myGroup; }
713  void setGroup(const UT_StringHolder & val) { myGroup = val; }
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getGroup();
718  UT_StringHolder result;
719  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
720  return result;
721  }
722  fpreal64 getLod() const { return myLod; }
723  void setLod(fpreal64 val) { myLod = val; }
724  fpreal64 opLod(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getLod();
728  fpreal64 result;
729  OP_Utils::evalOpParm(result, thissop, "lod", cookparms.getCookTime(), 0);
730  return result;
731  }
732  bool getEdge() const { return myEdge; }
733  void setEdge(bool val) { myEdge = val; }
734  bool opEdge(const SOP_NodeVerb::CookParms &cookparms) const
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getEdge();
738  bool result;
739  OP_Utils::evalOpParm(result, thissop, "edge", cookparms.getCookTime(), 0);
740  return result;
741  }
742  Method getMethod() const { return Method(myMethod); }
743  void setMethod(Method val) { myMethod = int64(val); }
744  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getMethod();
748  int64 result;
749  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
750  return Method(result);
751  }
752  Measure getMeasure() const { return Measure(myMeasure); }
753  void setMeasure(Measure val) { myMeasure = int64(val); }
754  Measure opMeasure(const SOP_NodeVerb::CookParms &cookparms) const
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getMeasure();
758  int64 result;
759  OP_Utils::evalOpParm(result, thissop, "measure", cookparms.getCookTime(), 0);
760  return Measure(result);
761  }
762  bool getDolength() const { return myDolength; }
763  void setDolength(bool val) { myDolength = val; }
764  bool opDolength(const SOP_NodeVerb::CookParms &cookparms) const
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getDolength();
768  bool result;
769  OP_Utils::evalOpParm(result, thissop, "dolength", cookparms.getCookTime(), 0);
770  return result;
771  }
772  fpreal64 getLength() const { return myLength; }
773  void setLength(fpreal64 val) { myLength = val; }
774  fpreal64 opLength(const SOP_NodeVerb::CookParms &cookparms) const
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getLength();
778  fpreal64 result;
779  OP_Utils::evalOpParm(result, thissop, "length", cookparms.getCookTime(), 0);
780  return result;
781  }
782  bool getDosegs() const { return myDosegs; }
783  void setDosegs(bool val) { myDosegs = val; }
784  bool opDosegs(const SOP_NodeVerb::CookParms &cookparms) const
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getDosegs();
788  bool result;
789  OP_Utils::evalOpParm(result, thissop, "dosegs", cookparms.getCookTime(), 0);
790  return result;
791  }
792  int64 getSegs() const { return mySegs; }
793  void setSegs(int64 val) { mySegs = val; }
794  int64 opSegs(const SOP_NodeVerb::CookParms &cookparms) const
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getSegs();
798  int64 result;
799  OP_Utils::evalOpParm(result, thissop, "segs", cookparms.getCookTime(), 0);
800  return result;
801  }
802  bool getUseattribs() const { return myUseattribs; }
803  void setUseattribs(bool val) { myUseattribs = val; }
804  bool opUseattribs(const SOP_NodeVerb::CookParms &cookparms) const
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getUseattribs();
808  bool result;
809  OP_Utils::evalOpParm(result, thissop, "useattribs", cookparms.getCookTime(), 0);
810  return result;
811  }
812  bool getAllequal() const { return myAllequal; }
813  void setAllequal(bool val) { myAllequal = val; }
814  bool opAllequal(const SOP_NodeVerb::CookParms &cookparms) const
815  {
816  SOP_Node *thissop = cookparms.getNode();
817  if (!thissop) return getAllequal();
818  bool result;
819  OP_Utils::evalOpParm(result, thissop, "allequal", cookparms.getCookTime(), 0);
820  return result;
821  }
822  bool getLast() const { return myLast; }
823  void setLast(bool val) { myLast = val; }
824  bool opLast(const SOP_NodeVerb::CookParms &cookparms) const
825  {
826  SOP_Node *thissop = cookparms.getNode();
827  if (!thissop) return getLast();
828  bool result;
829  OP_Utils::evalOpParm(result, thissop, "last", cookparms.getCookTime(), 0);
830  return result;
831  }
832  bool getRandomshift() const { return myRandomshift; }
833  void setRandomshift(bool val) { myRandomshift = val; }
834  bool opRandomshift(const SOP_NodeVerb::CookParms &cookparms) const
835  {
836  SOP_Node *thissop = cookparms.getNode();
837  if (!thissop) return getRandomshift();
838  bool result;
839  OP_Utils::evalOpParm(result, thissop, "randomshift", cookparms.getCookTime(), 0);
840  return result;
841  }
842  bool getOnlypoints() const { return myOnlypoints; }
843  void setOnlypoints(bool val) { myOnlypoints = val; }
844  bool opOnlypoints(const SOP_NodeVerb::CookParms &cookparms) const
845  {
846  SOP_Node *thissop = cookparms.getNode();
847  if (!thissop) return getOnlypoints();
848  bool result;
849  OP_Utils::evalOpParm(result, thissop, "onlypoints", cookparms.getCookTime(), 0);
850  return result;
851  }
852  Treatpolysas getTreatpolysas() const { return Treatpolysas(myTreatpolysas); }
853  void setTreatpolysas(Treatpolysas val) { myTreatpolysas = int64(val); }
855  {
856  SOP_Node *thissop = cookparms.getNode();
857  if (!thissop) return getTreatpolysas();
858  int64 result;
859  OP_Utils::evalOpParm(result, thissop, "treatpolysas", cookparms.getCookTime(), 0);
860  return Treatpolysas(result);
861  }
862  bool getOutputsubdpoly() const { return myOutputsubdpoly; }
863  void setOutputsubdpoly(bool val) { myOutputsubdpoly = val; }
864  bool opOutputsubdpoly(const SOP_NodeVerb::CookParms &cookparms) const
865  {
866  SOP_Node *thissop = cookparms.getNode();
867  if (!thissop) return getOutputsubdpoly();
868  bool result;
869  OP_Utils::evalOpParm(result, thissop, "outputsubdpoly", cookparms.getCookTime(), 0);
870  return result;
871  }
872  bool getDoptdistattr() const { return myDoptdistattr; }
873  void setDoptdistattr(bool val) { myDoptdistattr = val; }
874  bool opDoptdistattr(const SOP_NodeVerb::CookParms &cookparms) const
875  {
876  SOP_Node *thissop = cookparms.getNode();
877  if (!thissop) return getDoptdistattr();
878  bool result;
879  OP_Utils::evalOpParm(result, thissop, "doptdistattr", cookparms.getCookTime(), 0);
880  return result;
881  }
882  const UT_StringHolder & getPtdistattr() const { return myPtdistattr; }
883  void setPtdistattr(const UT_StringHolder & val) { myPtdistattr = val; }
885  {
886  SOP_Node *thissop = cookparms.getNode();
887  if (!thissop) return getPtdistattr();
888  UT_StringHolder result;
889  OP_Utils::evalOpParm(result, thissop, "ptdistattr", cookparms.getCookTime(), 0);
890  return result;
891  }
892  bool getDotangentattr() const { return myDotangentattr; }
893  void setDotangentattr(bool val) { myDotangentattr = val; }
894  bool opDotangentattr(const SOP_NodeVerb::CookParms &cookparms) const
895  {
896  SOP_Node *thissop = cookparms.getNode();
897  if (!thissop) return getDotangentattr();
898  bool result;
899  OP_Utils::evalOpParm(result, thissop, "dotangentattr", cookparms.getCookTime(), 0);
900  return result;
901  }
902  const UT_StringHolder & getTangentattr() const { return myTangentattr; }
903  void setTangentattr(const UT_StringHolder & val) { myTangentattr = val; }
905  {
906  SOP_Node *thissop = cookparms.getNode();
907  if (!thissop) return getTangentattr();
908  UT_StringHolder result;
909  OP_Utils::evalOpParm(result, thissop, "tangentattr", cookparms.getCookTime(), 0);
910  return result;
911  }
912  bool getDocurveuattr() const { return myDocurveuattr; }
913  void setDocurveuattr(bool val) { myDocurveuattr = val; }
914  bool opDocurveuattr(const SOP_NodeVerb::CookParms &cookparms) const
915  {
916  SOP_Node *thissop = cookparms.getNode();
917  if (!thissop) return getDocurveuattr();
918  bool result;
919  OP_Utils::evalOpParm(result, thissop, "docurveuattr", cookparms.getCookTime(), 0);
920  return result;
921  }
922  const UT_StringHolder & getCurveuattr() const { return myCurveuattr; }
923  void setCurveuattr(const UT_StringHolder & val) { myCurveuattr = val; }
925  {
926  SOP_Node *thissop = cookparms.getNode();
927  if (!thissop) return getCurveuattr();
928  UT_StringHolder result;
929  OP_Utils::evalOpParm(result, thissop, "curveuattr", cookparms.getCookTime(), 0);
930  return result;
931  }
932  bool getDocurvenumattr() const { return myDocurvenumattr; }
933  void setDocurvenumattr(bool val) { myDocurvenumattr = val; }
934  bool opDocurvenumattr(const SOP_NodeVerb::CookParms &cookparms) const
935  {
936  SOP_Node *thissop = cookparms.getNode();
937  if (!thissop) return getDocurvenumattr();
938  bool result;
939  OP_Utils::evalOpParm(result, thissop, "docurvenumattr", cookparms.getCookTime(), 0);
940  return result;
941  }
942  const UT_StringHolder & getCurvenumattr() const { return myCurvenumattr; }
943  void setCurvenumattr(const UT_StringHolder & val) { myCurvenumattr = val; }
945  {
946  SOP_Node *thissop = cookparms.getNode();
947  if (!thissop) return getCurvenumattr();
948  UT_StringHolder result;
949  OP_Utils::evalOpParm(result, thissop, "curvenumattr", cookparms.getCookTime(), 0);
950  return result;
951  }
952 
953 private:
954  UT_StringHolder myGroup;
955  fpreal64 myLod;
956  bool myEdge;
957  int64 myMethod;
958  int64 myMeasure;
959  bool myDolength;
960  fpreal64 myLength;
961  bool myDosegs;
962  int64 mySegs;
963  bool myUseattribs;
964  bool myAllequal;
965  bool myLast;
966  bool myRandomshift;
967  bool myOnlypoints;
968  int64 myTreatpolysas;
969  bool myOutputsubdpoly;
970  bool myDoptdistattr;
971  UT_StringHolder myPtdistattr;
972  bool myDotangentattr;
973  UT_StringHolder myTangentattr;
974  bool myDocurveuattr;
975  UT_StringHolder myCurveuattr;
976  bool myDocurvenumattr;
977  UT_StringHolder myCurvenumattr;
978 
979 };
static void saveData(std::ostream &os, int64 v)
bool opDosegs(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opTangentattr(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, exint &value) const
void doGetParmValue(exint idx, T &value) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
T & z(void)
Definition: UT_Vector4.h:379
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
const UT_StringHolder & getCurveuattr() const
bool getOutputsubdpoly() const
bool opDoptdistattr(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
bool getDolength() const
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
Measure getMeasure() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Treatpolysas getTreatpolysas() const
bool opOutputsubdpoly(const SOP_NodeVerb::CookParms &cookparms) const
bool opOnlypoints(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opLod(const SOP_NodeVerb::CookParms &cookparms) const
bool opDolength(const SOP_NodeVerb::CookParms &cookparms) const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
Treatpolysas opTreatpolysas(const SOP_NodeVerb::CookParms &cookparms) const
bool getDotangentattr() const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
void setMeasure(Measure val)
An output stream object that owns its own string buffer storage.
void setDoptdistattr(bool val)
void setCurveuattr(const UT_StringHolder &val)
fpreal64 getLength() const
void setLod(fpreal64 val)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getParmValue(exint idx, UT_Vector2D &value) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
bool opDocurvenumattr(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
const UT_StringHolder & getPtdistattr() const
void getParmValue(exint idx, PRM_DataItemHandle &value) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setParmValue(exint idx, const UT_Matrix4D &value)
void getParmValue(exint idx, UT_Matrix3D &value) const
bool opDocurveuattr(const SOP_NodeVerb::CookParms &cookparms) const
void setRandomshift(bool val)
static void loadData(UT_IStream &is, fpreal64 &v)
bool opUseattribs(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix4D &value) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
const UT_StringHolder & getCurvenumattr() const
void save(std::ostream &os) const
bool operator==(const SOP_ResampleParms &src) const
void setLength(fpreal64 val)
virtual void copyFrom(const SOP_NodeParms *src)
bool opAllequal(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual const char * getParmName(exint fieldnum) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
int64 exint
Definition: SYS_Types.h:116
void setDolength(bool val)
Measure opMeasure(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
static void saveData(std::ostream &os, UT_Matrix2D v)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
bool getAllequal() const
void setTreatpolysas(Treatpolysas val)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, bool &v)
bool getDocurveuattr() const
GLboolean * data
Definition: glcorearb.h:130
fpreal64 opLength(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool getDocurvenumattr() const
int int32
Definition: SYS_Types.h:35
void setTangentattr(const UT_StringHolder &val)
T & y(void)
Definition: UT_Vector4.h:377
void setParmValue(exint idx, const exint &value)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setDocurveuattr(bool val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
bool opDotangentattr(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_StringHolder &value)
virtual ParmType getParmType(exint fieldnum) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void getParmValue(exint idx, UT_Matrix2D &value) const
void setParmValue(exint idx, const UT_Vector2D &value)
bool getOnlypoints() const
void setDosegs(bool val)
void setPtdistattr(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
bool getDosegs() const
double fpreal
Definition: SYS_Types.h:270
void setLast(bool val)
static void saveData(std::ostream &os, UT_Vector4D v)
void getParmValue(exint idx, fpreal &value) const
void setMethod(Method val)
bool opEdge(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void setCurvenumattr(const UT_StringHolder &val)
int64 getSegs() const
UT_StringHolder opCurvenumattr(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const fpreal &value)
static void saveData(std::ostream &os, fpreal64 v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
virtual exint getNumParms() const
void setUseattribs(bool val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
bool load(UT_IStream &is)
void setParmValue(exint idx, const UT_Vector4D &value)
#define SOP_API
Definition: SOP_API.h:10
void setParmValue(exint idx, const UT_Vector3D &value)
void setOutputsubdpoly(bool val)
const UT_StringHolder & getTangentattr() const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool getDoptdistattr() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
T & x(void)
Definition: UT_Vector4.h:375
Method getMethod() const
void setSegs(int64 val)
void setParmValue(exint idx, const UT_Matrix2D &value)
T & y(void)
Definition: UT_Vector2.h:287
int64 opSegs(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(exint idx, const T &value)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setParmValue(exint idx, const UT_Matrix3D &value)
bool getUseattribs() const
bool getRandomshift() const
void getParmValue(exint idx, UT_Vector4D &value) const
GLboolean r
Definition: glcorearb.h:1221
void setGroup(const UT_StringHolder &val)
virtual ~SOP_ResampleParms()
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setDotangentattr(bool val)
UT_StringHolder opCurveuattr(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_ResampleParms &src) const
T & w(void)
Definition: UT_Vector4.h:381
void setDocurvenumattr(bool val)
bool opLast(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
fpreal64 getLod() const
static void loadData(UT_IStream &is, int64 &v)
void setOnlypoints(bool val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
void getParmValue(exint idx, UT_Vector3D &value) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
void setAllequal(bool val)
UT_StringHolder opPtdistattr(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
void setEdge(bool val)
void getParmValue(exint idx, UT_StringHolder &value) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLenum src
Definition: glcorearb.h:1792
bool opRandomshift(const SOP_NodeVerb::CookParms &cookparms) const