HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolyFill.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_PolyFillEnums
22 {
23  enum class Fillmode
24  {
25  NONE = 0,
26  TRIS,
27  TRIFAN,
28  QUADFAN,
29  QUADS,
30  GRIDQUADS
31  };
32 }
33 
34 
36 {
37 public:
38  static int version() { return 1; }
39 
41  {
42  myGroup = ""_sh;
43  myFillmode = 4;
44  myCompleteloops = true;
45  myReverse = false;
46  myUniquepoints = false;
47  myUpdatenorms = true;
48  myLooptoggle = false;
49  myLoopdistance = 0.25;
50  mySmoothtoggle = true;
51  mySmoothstrength = 50;
52  myCorneroffset = 0;
53  myCustomcornerstoggle = false;
54  myCustomcorners = ""_sh;
55  mySubdivtoggle = true;
56  myTranslate = 0.25;
57  myTangentstrength = 0.4;
58  myPatchgrouptoggle = false;
59  myPatchgroup = "patch"_sh;
60  myLoopgrouptoggle = false;
61  myLoopgroup = "loopgroup"_sh;
62  myGroupappend = false;
63 
64  }
65 
66  explicit SOP_PolyFillParms(const SOP_PolyFillParms &) = default;
67 
68  virtual ~SOP_PolyFillParms() {}
69 
70  bool operator==(const SOP_PolyFillParms &src) const
71  {
72  if (myGroup != src.myGroup) return false;
73  if (myFillmode != src.myFillmode) return false;
74  if (myCompleteloops != src.myCompleteloops) return false;
75  if (myReverse != src.myReverse) return false;
76  if (myUniquepoints != src.myUniquepoints) return false;
77  if (myUpdatenorms != src.myUpdatenorms) return false;
78  if (myLooptoggle != src.myLooptoggle) return false;
79  if (myLoopdistance != src.myLoopdistance) return false;
80  if (mySmoothtoggle != src.mySmoothtoggle) return false;
81  if (mySmoothstrength != src.mySmoothstrength) return false;
82  if (myCorneroffset != src.myCorneroffset) return false;
83  if (myCustomcornerstoggle != src.myCustomcornerstoggle) return false;
84  if (myCustomcorners != src.myCustomcorners) return false;
85  if (mySubdivtoggle != src.mySubdivtoggle) return false;
86  if (myTranslate != src.myTranslate) return false;
87  if (myTangentstrength != src.myTangentstrength) return false;
88  if (myPatchgrouptoggle != src.myPatchgrouptoggle) return false;
89  if (myPatchgroup != src.myPatchgroup) return false;
90  if (myLoopgrouptoggle != src.myLoopgrouptoggle) return false;
91  if (myLoopgroup != src.myLoopgroup) return false;
92  if (myGroupappend != src.myGroupappend) return false;
93 
94  return true;
95  }
96  bool operator!=(const SOP_PolyFillParms &src) const
97  {
98  return !operator==(src);
99  }
101 
102 
103 
104  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
105  {
106  if (true)
107  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
108  else myGroup = ""_sh;
109  if (true)
110  OP_Utils::evalOpParm(myFillmode, node, "fillmode", time, 0);
111  else myFillmode = 4;
112  if (true)
113  OP_Utils::evalOpParm(myCompleteloops, node, "completeloops", time, 0);
114  else myCompleteloops = true;
115  if (true)
116  OP_Utils::evalOpParm(myReverse, node, "reverse", time, 0);
117  else myReverse = false;
118  if (true)
119  OP_Utils::evalOpParm(myUniquepoints, node, "uniquepoints", time, 0);
120  else myUniquepoints = false;
121  if (true)
122  OP_Utils::evalOpParm(myUpdatenorms, node, "updatenorms", time, 0);
123  else myUpdatenorms = true;
124  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1)))) ) )
125  OP_Utils::evalOpParm(myLooptoggle, node, "looptoggle", time, 0);
126  else myLooptoggle = false;
127  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((getLooptoggle()==0)))) ) )
128  OP_Utils::evalOpParm(myLoopdistance, node, "loopdistance", time, 0);
129  else myLoopdistance = 0.25;
130  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==2))||((int64(getFillmode())==3)))) ) )
131  OP_Utils::evalOpParm(mySmoothtoggle, node, "smoothtoggle", time, 0);
132  else mySmoothtoggle = true;
133  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==2))||((int64(getFillmode())==3))||((getSmoothtoggle()==0)))) ) )
134  OP_Utils::evalOpParm(mySmoothstrength, node, "smoothstrength", time, 0);
135  else mySmoothstrength = 50;
136  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==4))||((int64(getFillmode())==2)))) ) )
137  OP_Utils::evalOpParm(myCorneroffset, node, "corneroffset", time, 0);
138  else myCorneroffset = 0;
139  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==4))||((int64(getFillmode())==2)))) ) )
140  OP_Utils::evalOpParm(myCustomcornerstoggle, node, "customcornerstoggle", time, 0);
141  else myCustomcornerstoggle = false;
142  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==4))||((int64(getFillmode())==2))||((getCustomcornerstoggle()==0)))) ) )
143  OP_Utils::evalOpParm(myCustomcorners, node, "customcorners", time, 0);
144  else myCustomcorners = ""_sh;
145  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==4)))) ) )
146  OP_Utils::evalOpParm(mySubdivtoggle, node, "subdivtoggle", time, 0);
147  else mySubdivtoggle = true;
148  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==4))||((getSubdivtoggle()==0)))) ) )
149  OP_Utils::evalOpParm(myTranslate, node, "translate", time, 0);
150  else myTranslate = 0.25;
151  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((int64(getFillmode())==4))||((int64(getFillmode())==2))||((int64(getFillmode())==3))||((getSubdivtoggle()==0)))) ) )
152  OP_Utils::evalOpParm(myTangentstrength, node, "tangentstrength", time, 0);
153  else myTangentstrength = 0.4;
154  if (true)
155  OP_Utils::evalOpParm(myPatchgrouptoggle, node, "patchgrouptoggle", time, 0);
156  else myPatchgrouptoggle = false;
157  if (true && ( (!(((getPatchgrouptoggle()==0)))) ) )
158  OP_Utils::evalOpParm(myPatchgroup, node, "patchgroup", time, 0);
159  else myPatchgroup = "patch"_sh;
160  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((getLooptoggle()==0)))) ) )
161  OP_Utils::evalOpParm(myLoopgrouptoggle, node, "loopgrouptoggle", time, 0);
162  else myLoopgrouptoggle = false;
163  if (true && ( (!(((int64(getFillmode())==0))||((int64(getFillmode())==1))||((getLooptoggle()==0))||((getLoopgrouptoggle()==0)))) ) )
164  OP_Utils::evalOpParm(myLoopgroup, node, "loopgroup", time, 0);
165  else myLoopgroup = "loopgroup"_sh;
166  if (true)
167  OP_Utils::evalOpParm(myGroupappend, node, "groupappend", time, 0);
168  else myGroupappend = false;
169 
170  }
171 
172 
173  virtual void loadFromOpSubclass(const LoadParms &loadparms)
174  {
175  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
176  }
177 
178 
179  virtual void copyFrom(const SOP_NodeParms *src)
180  {
181  *this = *((const SOP_PolyFillParms *)src);
182  }
183 
184  template <typename T>
185  void
186  doGetParmValue(exint idx, T &value) const
187  {
188  switch (idx)
189  {
190  case 0:
191  coerceValue(value, myGroup);
192  break;
193  case 1:
194  coerceValue(value, myFillmode);
195  break;
196  case 2:
197  coerceValue(value, myCompleteloops);
198  break;
199  case 3:
200  coerceValue(value, myReverse);
201  break;
202  case 4:
203  coerceValue(value, myUniquepoints);
204  break;
205  case 5:
206  coerceValue(value, myUpdatenorms);
207  break;
208  case 6:
209  coerceValue(value, myLooptoggle);
210  break;
211  case 7:
212  coerceValue(value, myLoopdistance);
213  break;
214  case 8:
215  coerceValue(value, mySmoothtoggle);
216  break;
217  case 9:
218  coerceValue(value, mySmoothstrength);
219  break;
220  case 10:
221  coerceValue(value, myCorneroffset);
222  break;
223  case 11:
224  coerceValue(value, myCustomcornerstoggle);
225  break;
226  case 12:
227  coerceValue(value, myCustomcorners);
228  break;
229  case 13:
230  coerceValue(value, mySubdivtoggle);
231  break;
232  case 14:
233  coerceValue(value, myTranslate);
234  break;
235  case 15:
236  coerceValue(value, myTangentstrength);
237  break;
238  case 16:
239  coerceValue(value, myPatchgrouptoggle);
240  break;
241  case 17:
242  coerceValue(value, myPatchgroup);
243  break;
244  case 18:
245  coerceValue(value, myLoopgrouptoggle);
246  break;
247  case 19:
248  coerceValue(value, myLoopgroup);
249  break;
250  case 20:
251  coerceValue(value, myGroupappend);
252  break;
253 
254  }
255  }
256 
257  void getParmValue(exint idx, exint &value) const
258  { doGetParmValue(idx, value); }
259  void getParmValue(exint idx, fpreal &value) const
260  { doGetParmValue(idx, value); }
262  { doGetParmValue(idx, value); }
264  { doGetParmValue(idx, value); }
266  { doGetParmValue(idx, value); }
268  { doGetParmValue(idx, value); }
270  { doGetParmValue(idx, value); }
272  { doGetParmValue(idx, value); }
274  { doGetParmValue(idx, value); }
276  { doGetParmValue(idx, value); }
278  { doGetParmValue(idx, value); }
279 
280  template <typename T>
281  void
282  doSetParmValue(exint idx, const T &value)
283  {
284  switch (idx)
285  {
286  case 0:
287  coerceValue(myGroup, value);
288  break;
289  case 1:
290  coerceValue(myFillmode, value);
291  break;
292  case 2:
293  coerceValue(myCompleteloops, value);
294  break;
295  case 3:
296  coerceValue(myReverse, value);
297  break;
298  case 4:
299  coerceValue(myUniquepoints, value);
300  break;
301  case 5:
302  coerceValue(myUpdatenorms, value);
303  break;
304  case 6:
305  coerceValue(myLooptoggle, value);
306  break;
307  case 7:
308  coerceValue(myLoopdistance, value);
309  break;
310  case 8:
311  coerceValue(mySmoothtoggle, value);
312  break;
313  case 9:
314  coerceValue(mySmoothstrength, value);
315  break;
316  case 10:
317  coerceValue(myCorneroffset, value);
318  break;
319  case 11:
320  coerceValue(myCustomcornerstoggle, value);
321  break;
322  case 12:
323  coerceValue(myCustomcorners, value);
324  break;
325  case 13:
326  coerceValue(mySubdivtoggle, value);
327  break;
328  case 14:
329  coerceValue(myTranslate, value);
330  break;
331  case 15:
332  coerceValue(myTangentstrength, value);
333  break;
334  case 16:
335  coerceValue(myPatchgrouptoggle, value);
336  break;
337  case 17:
338  coerceValue(myPatchgroup, value);
339  break;
340  case 18:
341  coerceValue(myLoopgrouptoggle, value);
342  break;
343  case 19:
344  coerceValue(myLoopgroup, value);
345  break;
346  case 20:
347  coerceValue(myGroupappend, value);
348  break;
349 
350  }
351  }
352 
353  void setParmValue(exint idx, const exint &value)
354  { doSetParmValue(idx, value); }
355  void setParmValue(exint idx, const fpreal &value)
356  { doSetParmValue(idx, value); }
357  void setParmValue(exint idx, const UT_Vector2D &value)
358  { doSetParmValue(idx, value); }
359  void setParmValue(exint idx, const UT_Vector3D &value)
360  { doSetParmValue(idx, value); }
361  void setParmValue(exint idx, const UT_Vector4D &value)
362  { doSetParmValue(idx, value); }
363  void setParmValue(exint idx, const UT_Matrix2D &value)
364  { doSetParmValue(idx, value); }
365  void setParmValue(exint idx, const UT_Matrix3D &value)
366  { doSetParmValue(idx, value); }
367  void setParmValue(exint idx, const UT_Matrix4D &value)
368  { doSetParmValue(idx, value); }
370  { doSetParmValue(idx, value); }
372  { doSetParmValue(idx, value); }
374  { doSetParmValue(idx, value); }
375 
376  virtual exint getNumParms() const
377  {
378  return 21;
379  }
380 
381  virtual const char *getParmName(exint fieldnum) const
382  {
383  switch (fieldnum)
384  {
385  case 0:
386  return "group";
387  case 1:
388  return "fillmode";
389  case 2:
390  return "completeloops";
391  case 3:
392  return "reverse";
393  case 4:
394  return "uniquepoints";
395  case 5:
396  return "updatenorms";
397  case 6:
398  return "looptoggle";
399  case 7:
400  return "loopdistance";
401  case 8:
402  return "smoothtoggle";
403  case 9:
404  return "smoothstrength";
405  case 10:
406  return "corneroffset";
407  case 11:
408  return "customcornerstoggle";
409  case 12:
410  return "customcorners";
411  case 13:
412  return "subdivtoggle";
413  case 14:
414  return "translate";
415  case 15:
416  return "tangentstrength";
417  case 16:
418  return "patchgrouptoggle";
419  case 17:
420  return "patchgroup";
421  case 18:
422  return "loopgrouptoggle";
423  case 19:
424  return "loopgroup";
425  case 20:
426  return "groupappend";
427 
428  }
429  return 0;
430  }
431 
432  virtual ParmType getParmType(exint fieldnum) const
433  {
434  switch (fieldnum)
435  {
436  case 0:
437  return PARM_STRING;
438  case 1:
439  return PARM_INTEGER;
440  case 2:
441  return PARM_INTEGER;
442  case 3:
443  return PARM_INTEGER;
444  case 4:
445  return PARM_INTEGER;
446  case 5:
447  return PARM_INTEGER;
448  case 6:
449  return PARM_INTEGER;
450  case 7:
451  return PARM_FLOAT;
452  case 8:
453  return PARM_INTEGER;
454  case 9:
455  return PARM_FLOAT;
456  case 10:
457  return PARM_INTEGER;
458  case 11:
459  return PARM_INTEGER;
460  case 12:
461  return PARM_STRING;
462  case 13:
463  return PARM_INTEGER;
464  case 14:
465  return PARM_FLOAT;
466  case 15:
467  return PARM_FLOAT;
468  case 16:
469  return PARM_INTEGER;
470  case 17:
471  return PARM_STRING;
472  case 18:
473  return PARM_INTEGER;
474  case 19:
475  return PARM_STRING;
476  case 20:
477  return PARM_INTEGER;
478 
479  }
480  return PARM_UNSUPPORTED;
481  }
482 
483  // Boiler plate to load individual types.
484  static void loadData(UT_IStream &is, int64 &v)
485  { is.bread(&v, 1); }
486  static void loadData(UT_IStream &is, bool &v)
487  { int64 iv; is.bread(&iv, 1); v = iv; }
488  static void loadData(UT_IStream &is, fpreal64 &v)
489  { is.bread<fpreal64>(&v, 1); }
490  static void loadData(UT_IStream &is, UT_Vector2D &v)
491  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
492  static void loadData(UT_IStream &is, UT_Vector3D &v)
493  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
494  is.bread<fpreal64>(&v.z(), 1); }
495  static void loadData(UT_IStream &is, UT_Vector4D &v)
496  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
497  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
498  static void loadData(UT_IStream &is, UT_Matrix2D &v)
499  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
500  static void loadData(UT_IStream &is, UT_Matrix3D &v)
501  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
502  static void loadData(UT_IStream &is, UT_Matrix4D &v)
503  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
504  static void loadData(UT_IStream &is, UT_Vector2I &v)
505  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
506  static void loadData(UT_IStream &is, UT_Vector3I &v)
507  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
508  is.bread<int64>(&v.z(), 1); }
509  static void loadData(UT_IStream &is, UT_Vector4I &v)
510  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
511  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
513  { is.bread(v); }
515  { UT_StringHolder rampdata;
516  loadData(is, rampdata);
517  if (rampdata.isstring())
518  {
519  v.reset(new UT_Ramp());
520  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
521  v->load(istr);
522  }
523  else v.reset();
524  }
527  loadData(is, data);
528  if (data.isstring())
529  {
530  // Find the data type.
531  char *colon = UT_StringWrap(data).findChar(':');
532  if (colon)
533  {
534  int typelen = colon - data.buffer();
536  type.strncpy(data.buffer(), typelen);
537  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
538 
539  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
540  }
541  }
542  else v.reset();
543  }
544 
545  static void saveData(std::ostream &os, int64 v)
546  { UTwrite(os, &v); }
547  static void saveData(std::ostream &os, bool v)
548  { int64 iv = v; UTwrite(os, &iv); }
549  static void saveData(std::ostream &os, fpreal64 v)
550  { UTwrite<fpreal64>(os, &v); }
551  static void saveData(std::ostream &os, UT_Vector2D v)
552  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
553  static void saveData(std::ostream &os, UT_Vector3D v)
554  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
555  UTwrite<fpreal64>(os, &v.z()); }
556  static void saveData(std::ostream &os, UT_Vector4D v)
557  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
558  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
559  static void saveData(std::ostream &os, UT_Matrix2D v)
561  static void saveData(std::ostream &os, UT_Matrix3D v)
563  static void saveData(std::ostream &os, UT_Matrix4D v)
565  static void saveData(std::ostream &os, UT_StringHolder s)
566  { UT_StringWrap(s).saveBinary(os); }
567  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
568  { UT_StringHolder result;
569  UT_OStringStream ostr;
570  if (s) s->save(ostr);
571  result = ostr.str();
572  saveData(os, result);
573  }
574  static void saveData(std::ostream &os, PRM_DataItemHandle s)
575  { UT_StringHolder result;
576  UT_OStringStream ostr;
577  if (s)
578  {
579  ostr << s->getDataTypeToken();
580  ostr << ":";
581  s->saveBinary(ostr);
582  }
583  result = ostr.str();
584  saveData(os, result);
585  }
586 
587 
588  void save(std::ostream &os) const
589  {
590  int32 v = version();
591  UTwrite(os, &v);
592  saveData(os, myGroup);
593  saveData(os, myFillmode);
594  saveData(os, myCompleteloops);
595  saveData(os, myReverse);
596  saveData(os, myUniquepoints);
597  saveData(os, myUpdatenorms);
598  saveData(os, myLooptoggle);
599  saveData(os, myLoopdistance);
600  saveData(os, mySmoothtoggle);
601  saveData(os, mySmoothstrength);
602  saveData(os, myCorneroffset);
603  saveData(os, myCustomcornerstoggle);
604  saveData(os, myCustomcorners);
605  saveData(os, mySubdivtoggle);
606  saveData(os, myTranslate);
607  saveData(os, myTangentstrength);
608  saveData(os, myPatchgrouptoggle);
609  saveData(os, myPatchgroup);
610  saveData(os, myLoopgrouptoggle);
611  saveData(os, myLoopgroup);
612  saveData(os, myGroupappend);
613 
614  }
615 
616  bool load(UT_IStream &is)
617  {
618  int32 v;
619  is.bread(&v, 1);
620  if (version() != v)
621  {
622  // Fail incompatible versions
623  return false;
624  }
625  loadData(is, myGroup);
626  loadData(is, myFillmode);
627  loadData(is, myCompleteloops);
628  loadData(is, myReverse);
629  loadData(is, myUniquepoints);
630  loadData(is, myUpdatenorms);
631  loadData(is, myLooptoggle);
632  loadData(is, myLoopdistance);
633  loadData(is, mySmoothtoggle);
634  loadData(is, mySmoothstrength);
635  loadData(is, myCorneroffset);
636  loadData(is, myCustomcornerstoggle);
637  loadData(is, myCustomcorners);
638  loadData(is, mySubdivtoggle);
639  loadData(is, myTranslate);
640  loadData(is, myTangentstrength);
641  loadData(is, myPatchgrouptoggle);
642  loadData(is, myPatchgroup);
643  loadData(is, myLoopgrouptoggle);
644  loadData(is, myLoopgroup);
645  loadData(is, myGroupappend);
646 
647  return true;
648  }
649 
650  const UT_StringHolder & getGroup() const { return myGroup; }
651  void setGroup(const UT_StringHolder & val) { myGroup = val; }
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getGroup();
656  UT_StringHolder result;
657  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
658  return result;
659  }
660  Fillmode getFillmode() const { return Fillmode(myFillmode); }
661  void setFillmode(Fillmode val) { myFillmode = int64(val); }
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getFillmode();
666  int64 result;
667  OP_Utils::evalOpParm(result, thissop, "fillmode", cookparms.getCookTime(), 0);
668  return Fillmode(result);
669  }
670  bool getCompleteloops() const { return myCompleteloops; }
671  void setCompleteloops(bool val) { myCompleteloops = val; }
672  bool opCompleteloops(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getCompleteloops();
676  bool result;
677  OP_Utils::evalOpParm(result, thissop, "completeloops", cookparms.getCookTime(), 0);
678  return result;
679  }
680  bool getReverse() const { return myReverse; }
681  void setReverse(bool val) { myReverse = val; }
682  bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
683  {
684  SOP_Node *thissop = cookparms.getNode();
685  if (!thissop) return getReverse();
686  bool result;
687  OP_Utils::evalOpParm(result, thissop, "reverse", cookparms.getCookTime(), 0);
688  return result;
689  }
690  bool getUniquepoints() const { return myUniquepoints; }
691  void setUniquepoints(bool val) { myUniquepoints = val; }
692  bool opUniquepoints(const SOP_NodeVerb::CookParms &cookparms) const
693  {
694  SOP_Node *thissop = cookparms.getNode();
695  if (!thissop) return getUniquepoints();
696  bool result;
697  OP_Utils::evalOpParm(result, thissop, "uniquepoints", cookparms.getCookTime(), 0);
698  return result;
699  }
700  bool getUpdatenorms() const { return myUpdatenorms; }
701  void setUpdatenorms(bool val) { myUpdatenorms = val; }
702  bool opUpdatenorms(const SOP_NodeVerb::CookParms &cookparms) const
703  {
704  SOP_Node *thissop = cookparms.getNode();
705  if (!thissop) return getUpdatenorms();
706  bool result;
707  OP_Utils::evalOpParm(result, thissop, "updatenorms", cookparms.getCookTime(), 0);
708  return result;
709  }
710  bool getLooptoggle() const { return myLooptoggle; }
711  void setLooptoggle(bool val) { myLooptoggle = val; }
712  bool opLooptoggle(const SOP_NodeVerb::CookParms &cookparms) const
713  {
714  SOP_Node *thissop = cookparms.getNode();
715  if (!thissop) return getLooptoggle();
716  bool result;
717  OP_Utils::evalOpParm(result, thissop, "looptoggle", cookparms.getCookTime(), 0);
718  return result;
719  }
720  fpreal64 getLoopdistance() const { return myLoopdistance; }
721  void setLoopdistance(fpreal64 val) { myLoopdistance = val; }
723  {
724  SOP_Node *thissop = cookparms.getNode();
725  if (!thissop) return getLoopdistance();
726  fpreal64 result;
727  OP_Utils::evalOpParm(result, thissop, "loopdistance", cookparms.getCookTime(), 0);
728  return result;
729  }
730  bool getSmoothtoggle() const { return mySmoothtoggle; }
731  void setSmoothtoggle(bool val) { mySmoothtoggle = val; }
732  bool opSmoothtoggle(const SOP_NodeVerb::CookParms &cookparms) const
733  {
734  SOP_Node *thissop = cookparms.getNode();
735  if (!thissop) return getSmoothtoggle();
736  bool result;
737  OP_Utils::evalOpParm(result, thissop, "smoothtoggle", cookparms.getCookTime(), 0);
738  return result;
739  }
740  fpreal64 getSmoothstrength() const { return mySmoothstrength; }
741  void setSmoothstrength(fpreal64 val) { mySmoothstrength = val; }
743  {
744  SOP_Node *thissop = cookparms.getNode();
745  if (!thissop) return getSmoothstrength();
746  fpreal64 result;
747  OP_Utils::evalOpParm(result, thissop, "smoothstrength", cookparms.getCookTime(), 0);
748  return result;
749  }
750  int64 getCorneroffset() const { return myCorneroffset; }
751  void setCorneroffset(int64 val) { myCorneroffset = val; }
753  {
754  SOP_Node *thissop = cookparms.getNode();
755  if (!thissop) return getCorneroffset();
756  int64 result;
757  OP_Utils::evalOpParm(result, thissop, "corneroffset", cookparms.getCookTime(), 0);
758  return result;
759  }
760  bool getCustomcornerstoggle() const { return myCustomcornerstoggle; }
761  void setCustomcornerstoggle(bool val) { myCustomcornerstoggle = val; }
762  bool opCustomcornerstoggle(const SOP_NodeVerb::CookParms &cookparms) const
763  {
764  SOP_Node *thissop = cookparms.getNode();
765  if (!thissop) return getCustomcornerstoggle();
766  bool result;
767  OP_Utils::evalOpParm(result, thissop, "customcornerstoggle", cookparms.getCookTime(), 0);
768  return result;
769  }
770  const UT_StringHolder & getCustomcorners() const { return myCustomcorners; }
771  void setCustomcorners(const UT_StringHolder & val) { myCustomcorners = val; }
773  {
774  SOP_Node *thissop = cookparms.getNode();
775  if (!thissop) return getCustomcorners();
776  UT_StringHolder result;
777  OP_Utils::evalOpParm(result, thissop, "customcorners", cookparms.getCookTime(), 0);
778  return result;
779  }
780  bool getSubdivtoggle() const { return mySubdivtoggle; }
781  void setSubdivtoggle(bool val) { mySubdivtoggle = val; }
782  bool opSubdivtoggle(const SOP_NodeVerb::CookParms &cookparms) const
783  {
784  SOP_Node *thissop = cookparms.getNode();
785  if (!thissop) return getSubdivtoggle();
786  bool result;
787  OP_Utils::evalOpParm(result, thissop, "subdivtoggle", cookparms.getCookTime(), 0);
788  return result;
789  }
790  fpreal64 getTranslate() const { return myTranslate; }
791  void setTranslate(fpreal64 val) { myTranslate = val; }
793  {
794  SOP_Node *thissop = cookparms.getNode();
795  if (!thissop) return getTranslate();
796  fpreal64 result;
797  OP_Utils::evalOpParm(result, thissop, "translate", cookparms.getCookTime(), 0);
798  return result;
799  }
800  fpreal64 getTangentstrength() const { return myTangentstrength; }
801  void setTangentstrength(fpreal64 val) { myTangentstrength = val; }
803  {
804  SOP_Node *thissop = cookparms.getNode();
805  if (!thissop) return getTangentstrength();
806  fpreal64 result;
807  OP_Utils::evalOpParm(result, thissop, "tangentstrength", cookparms.getCookTime(), 0);
808  return result;
809  }
810  bool getPatchgrouptoggle() const { return myPatchgrouptoggle; }
811  void setPatchgrouptoggle(bool val) { myPatchgrouptoggle = val; }
812  bool opPatchgrouptoggle(const SOP_NodeVerb::CookParms &cookparms) const
813  {
814  SOP_Node *thissop = cookparms.getNode();
815  if (!thissop) return getPatchgrouptoggle();
816  bool result;
817  OP_Utils::evalOpParm(result, thissop, "patchgrouptoggle", cookparms.getCookTime(), 0);
818  return result;
819  }
820  const UT_StringHolder & getPatchgroup() const { return myPatchgroup; }
821  void setPatchgroup(const UT_StringHolder & val) { myPatchgroup = val; }
823  {
824  SOP_Node *thissop = cookparms.getNode();
825  if (!thissop) return getPatchgroup();
826  UT_StringHolder result;
827  OP_Utils::evalOpParm(result, thissop, "patchgroup", cookparms.getCookTime(), 0);
828  return result;
829  }
830  bool getLoopgrouptoggle() const { return myLoopgrouptoggle; }
831  void setLoopgrouptoggle(bool val) { myLoopgrouptoggle = val; }
832  bool opLoopgrouptoggle(const SOP_NodeVerb::CookParms &cookparms) const
833  {
834  SOP_Node *thissop = cookparms.getNode();
835  if (!thissop) return getLoopgrouptoggle();
836  bool result;
837  OP_Utils::evalOpParm(result, thissop, "loopgrouptoggle", cookparms.getCookTime(), 0);
838  return result;
839  }
840  const UT_StringHolder & getLoopgroup() const { return myLoopgroup; }
841  void setLoopgroup(const UT_StringHolder & val) { myLoopgroup = val; }
843  {
844  SOP_Node *thissop = cookparms.getNode();
845  if (!thissop) return getLoopgroup();
846  UT_StringHolder result;
847  OP_Utils::evalOpParm(result, thissop, "loopgroup", cookparms.getCookTime(), 0);
848  return result;
849  }
850  bool getGroupappend() const { return myGroupappend; }
851  void setGroupappend(bool val) { myGroupappend = val; }
852  bool opGroupappend(const SOP_NodeVerb::CookParms &cookparms) const
853  {
854  SOP_Node *thissop = cookparms.getNode();
855  if (!thissop) return getGroupappend();
856  bool result;
857  OP_Utils::evalOpParm(result, thissop, "groupappend", cookparms.getCookTime(), 0);
858  return result;
859  }
860 
861 private:
862  UT_StringHolder myGroup;
863  int64 myFillmode;
864  bool myCompleteloops;
865  bool myReverse;
866  bool myUniquepoints;
867  bool myUpdatenorms;
868  bool myLooptoggle;
869  fpreal64 myLoopdistance;
870  bool mySmoothtoggle;
871  fpreal64 mySmoothstrength;
872  int64 myCorneroffset;
873  bool myCustomcornerstoggle;
874  UT_StringHolder myCustomcorners;
875  bool mySubdivtoggle;
876  fpreal64 myTranslate;
877  fpreal64 myTangentstrength;
878  bool myPatchgrouptoggle;
879  UT_StringHolder myPatchgroup;
880  bool myLoopgrouptoggle;
881  UT_StringHolder myLoopgroup;
882  bool myGroupappend;
883 
884 };
void setSubdivtoggle(bool val)
bool opCompleteloops(const SOP_NodeVerb::CookParms &cookparms) const
void setFillmode(Fillmode val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_StringHolder & getLoopgroup() const
static void loadData(UT_IStream &is, int64 &v)
void setParmValue(exint idx, const UT_Vector4D &value)
void setParmValue(exint idx, const UT_Vector2D &value)
fpreal64 getSmoothstrength() const
bool operator!=(const SOP_PolyFillParms &src) const
bool operator==(const SOP_PolyFillParms &src) const
fpreal64 getLoopdistance() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
T & z(void)
Definition: UT_Vector4.h:379
void getParmValue(exint idx, UT_Matrix3D &value) const
bool opLoopgrouptoggle(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector2D &value) const
bool getSmoothtoggle() const
const UT_StringHolder & getPatchgroup() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
const UT_StringHolder & getCustomcorners() const
static void loadData(UT_IStream &is, fpreal64 &v)
void getParmValue(exint idx, UT_Matrix2D &value) const
void setLoopdistance(fpreal64 val)
void getParmValue(exint idx, UT_Vector4D &value) const
bool opCustomcornerstoggle(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
void setParmValue(exint idx, const UT_StringHolder &value)
An output stream object that owns its own string buffer storage.
void setPatchgrouptoggle(bool val)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_StringHolder s)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void getParmValue(exint idx, PRM_DataItemHandle &value) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
bool getUniquepoints() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool load(UT_IStream &is)
bool getSubdivtoggle() const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setCustomcornerstoggle(bool val)
bool getGroupappend() const
bool opLooptoggle(const SOP_NodeVerb::CookParms &cookparms) const
bool opSmoothtoggle(const SOP_NodeVerb::CookParms &cookparms) const
int64 getCorneroffset() const
void getParmValue(exint idx, exint &value) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setUniquepoints(bool val)
bool getLoopgrouptoggle() const
void setTranslate(fpreal64 val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setSmoothtoggle(bool val)
bool getCustomcornerstoggle() 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
void setLoopgrouptoggle(bool val)
bool getCompleteloops() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool getReverse() const
UT_StringHolder opCustomcorners(const SOP_NodeVerb::CookParms &cookparms) const
void setReverse(bool val)
static void saveData(std::ostream &os, UT_Vector4D v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
bool opUniquepoints(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
int64 exint
Definition: SYS_Types.h:116
bool opSubdivtoggle(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
fpreal64 opSmoothstrength(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, fpreal &value) const
fpreal64 opLoopdistance(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opLoopgroup(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Matrix2D v)
void setCorneroffset(int64 val)
Fillmode getFillmode() const
void setParmValue(exint idx, const exint &value)
static void saveData(std::ostream &os, int64 v)
GLboolean * data
Definition: glcorearb.h:130
void setPatchgroup(const UT_StringHolder &val)
int int32
Definition: SYS_Types.h:35
virtual const char * getParmName(exint fieldnum) const
T & y(void)
Definition: UT_Vector4.h:377
void setLooptoggle(bool val)
fpreal64 opTranslate(const SOP_NodeVerb::CookParms &cookparms) const
void setSmoothstrength(fpreal64 val)
void setLoopgroup(const UT_StringHolder &val)
void setParmValue(exint idx, const UT_Matrix3D &value)
UT_StringHolder opPatchgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void setUpdatenorms(bool val)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void setGroupappend(bool val)
int64 opCorneroffset(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getTangentstrength() const
virtual void copyFrom(const SOP_NodeParms *src)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setCustomcorners(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 getTranslate() const
virtual ParmType getParmType(exint fieldnum) const
void getParmValue(exint idx, UT_StringHolder &value) const
bool opPatchgrouptoggle(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void doSetParmValue(exint idx, const T &value)
bool opUpdatenorms(const SOP_NodeVerb::CookParms &cookparms) const
virtual ~SOP_PolyFillParms()
bool getPatchgrouptoggle() const
void setParmValue(exint idx, const UT_Vector3D &value)
Fillmode opFillmode(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setParmValue(exint idx, const fpreal &value)
GLuint GLfloat * val
Definition: glcorearb.h:1607
static void saveData(std::ostream &os, UT_Matrix4D v)
#define SOP_API
Definition: SOP_API.h:10
void setTangentstrength(fpreal64 val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
static void saveData(std::ostream &os, UT_Vector2D v)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
T & y(void)
Definition: UT_Vector2.h:287
void setCompleteloops(bool val)
void doGetParmValue(exint idx, T &value) const
bool getLooptoggle() const
bool opGroupappend(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1221
virtual exint getNumParms() const
void setParmValue(exint idx, const UT_Matrix2D &value)
void getParmValue(exint idx, UT_Vector3D &value) const
void setParmValue(exint idx, const UT_Matrix4D &value)
T & w(void)
Definition: UT_Vector4.h:381
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
bool getUpdatenorms() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 opTangentstrength(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
void save(std::ostream &os) const
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLenum src
Definition: glcorearb.h:1792
void getParmValue(exint idx, UT_Matrix4D &value) const
static void loadData(UT_IStream &is, UT_Vector3I &v)