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