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