HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_SubdivideParms.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 
23 {
24 public:
25  static int version() { return 1; }
26 
28  {
29  myGroup = ""_sh;
30  myCreaseGroup = ""_sh;
31  myDepth = 1;
32  myOverrideCreaseWeight = false;
33  myCreaseWeight = 0;
34  myOutputCreases = 0;
35  myOutputCreaseGroup = "creases"_sh;
36  myCloseCracks = 1;
37  myDivideChoice = 1;
38  myBias = 1;
39  mySmoothVertex = true;
40  myEnforceConsistentTopology = false;
41  myLinearCreases = false;
42  myAlgorithm = 0;
43  myBuildPolygonSoup = false;
44  myTreatCurvesIndependent = false;
45  myUpdateNormals = true;
46  myRemoveHoles = true;
47  myVtxBoundaryInterp = "corner"_sh;
48  myFVarLinearInterp = "corner1"_sh;
49  myCreasingMethod = "uniform"_sh;
50  myTriangleSubd = "catclark"_sh;
51 
52  }
53 
54  explicit SOP_SubdivideParms(const SOP_SubdivideParms &) = default;
55 
56  virtual ~SOP_SubdivideParms() {}
57 
58  bool operator==(const SOP_SubdivideParms &src) const
59  {
60  if (myGroup != src.myGroup) return false;
61  if (myCreaseGroup != src.myCreaseGroup) return false;
62  if (myDepth != src.myDepth) return false;
63  if (myOverrideCreaseWeight != src.myOverrideCreaseWeight) return false;
64  if (myCreaseWeight != src.myCreaseWeight) return false;
65  if (myOutputCreases != src.myOutputCreases) return false;
66  if (myOutputCreaseGroup != src.myOutputCreaseGroup) return false;
67  if (myCloseCracks != src.myCloseCracks) return false;
68  if (myDivideChoice != src.myDivideChoice) return false;
69  if (myBias != src.myBias) return false;
70  if (mySmoothVertex != src.mySmoothVertex) return false;
71  if (myEnforceConsistentTopology != src.myEnforceConsistentTopology) return false;
72  if (myLinearCreases != src.myLinearCreases) return false;
73  if (myAlgorithm != src.myAlgorithm) return false;
74  if (myBuildPolygonSoup != src.myBuildPolygonSoup) return false;
75  if (myTreatCurvesIndependent != src.myTreatCurvesIndependent) return false;
76  if (myUpdateNormals != src.myUpdateNormals) return false;
77  if (myRemoveHoles != src.myRemoveHoles) return false;
78  if (myVtxBoundaryInterp != src.myVtxBoundaryInterp) return false;
79  if (myFVarLinearInterp != src.myFVarLinearInterp) return false;
80  if (myCreasingMethod != src.myCreasingMethod) return false;
81  if (myTriangleSubd != src.myTriangleSubd) return false;
82 
83  return true;
84  }
85  bool operator!=(const SOP_SubdivideParms &src) const
86  {
87  return !operator==(src);
88  }
89 
90 
91 
92  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
93  {
94  if (true)
95  OP_Utils::evalOpParm(myGroup, node, "subdivide", time, 0);
96  else myGroup = ""_sh;
97  if (true)
98  OP_Utils::evalOpParm(myCreaseGroup, node, "creases", time, 0);
99  else myCreaseGroup = ""_sh;
100  if (true)
101  OP_Utils::evalOpParm(myDepth, node, "iterations", time, 0);
102  else myDepth = 1;
103  if (true)
104  OP_Utils::evalOpParm(myOverrideCreaseWeight, node, "overridecrease", time, 0);
105  else myOverrideCreaseWeight = false;
106  if (true)
107  OP_Utils::evalOpParm(myCreaseWeight, node, "creaseweight", time, 0);
108  else myCreaseWeight = 0;
109  if (true)
110  OP_Utils::evalOpParm(myOutputCreases, node, "outputcrease", time, 0);
111  else myOutputCreases = 0;
112  if (true)
113  OP_Utils::evalOpParm(myOutputCreaseGroup, node, "outcreasegroup", time, 0);
114  else myOutputCreaseGroup = "creases"_sh;
115  if (true)
116  OP_Utils::evalOpParm(myCloseCracks, node, "closeholes", time, 0);
117  else myCloseCracks = 1;
118  if (true)
119  OP_Utils::evalOpParm(myDivideChoice, node, "surroundpoly", time, 0);
120  else myDivideChoice = 1;
121  if (true)
122  OP_Utils::evalOpParm(myBias, node, "bias", time, 0);
123  else myBias = 1;
124  if (true)
125  OP_Utils::evalOpParm(mySmoothVertex, node, "smoothvertex", time, 0);
126  else mySmoothVertex = true;
127  if (true)
128  OP_Utils::evalOpParm(myEnforceConsistentTopology, node, "consisttopology", time, 0);
129  else myEnforceConsistentTopology = false;
130  if (true)
131  OP_Utils::evalOpParm(myLinearCreases, node, "linearcreases", time, 0);
132  else myLinearCreases = false;
133  if (true)
134  OP_Utils::evalOpParm(myAlgorithm, node, "algorithm", time, 0);
135  else myAlgorithm = 0;
136  if (true)
137  OP_Utils::evalOpParm(myBuildPolygonSoup, node, "buildpolysoups", time, 0);
138  else myBuildPolygonSoup = false;
139  if (true)
140  OP_Utils::evalOpParm(myTreatCurvesIndependent, node, "indepcurves", time, 0);
141  else myTreatCurvesIndependent = false;
142  if (true)
143  OP_Utils::evalOpParm(myUpdateNormals, node, "updatenmls", time, 0);
144  else myUpdateNormals = true;
145  if (true)
146  OP_Utils::evalOpParm(myRemoveHoles, node, "removeholes", time, 0);
147  else myRemoveHoles = true;
148  if (true)
149  OP_Utils::evalOpParm(myVtxBoundaryInterp, node, "vtxboundary", time, 0);
150  else myVtxBoundaryInterp = "corner"_sh;
151  if (true)
152  OP_Utils::evalOpParm(myFVarLinearInterp, node, "fvarlinear", time, 0);
153  else myFVarLinearInterp = "corner1"_sh;
154  if (true)
155  OP_Utils::evalOpParm(myCreasingMethod, node, "creasemethod", time, 0);
156  else myCreasingMethod = "uniform"_sh;
157  if (true)
158  OP_Utils::evalOpParm(myTriangleSubd, node, "trianglesubd", time, 0);
159  else myTriangleSubd = "catclark"_sh;
160 
161  }
162 
163 
164  virtual void loadFromOpSubclass(const LoadParms &loadparms)
165  {
166  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
167  }
168 
169 
170  virtual void copyFrom(const SOP_NodeParms *src)
171  {
172  *this = *((const SOP_SubdivideParms *)src);
173  }
174 
175  template <typename T>
176  void
177  doGetParmValue(exint idx, T &value) const
178  {
179  switch (idx)
180  {
181  case 0:
182  coerceValue(value, myGroup);
183  break;
184  case 1:
185  coerceValue(value, myCreaseGroup);
186  break;
187  case 2:
188  coerceValue(value, myDepth);
189  break;
190  case 3:
191  coerceValue(value, myOverrideCreaseWeight);
192  break;
193  case 4:
194  coerceValue(value, myCreaseWeight);
195  break;
196  case 5:
197  coerceValue(value, myOutputCreases);
198  break;
199  case 6:
200  coerceValue(value, myOutputCreaseGroup);
201  break;
202  case 7:
203  coerceValue(value, myCloseCracks);
204  break;
205  case 8:
206  coerceValue(value, myDivideChoice);
207  break;
208  case 9:
209  coerceValue(value, myBias);
210  break;
211  case 10:
212  coerceValue(value, mySmoothVertex);
213  break;
214  case 11:
215  coerceValue(value, myEnforceConsistentTopology);
216  break;
217  case 12:
218  coerceValue(value, myLinearCreases);
219  break;
220  case 13:
221  coerceValue(value, myAlgorithm);
222  break;
223  case 14:
224  coerceValue(value, myBuildPolygonSoup);
225  break;
226  case 15:
227  coerceValue(value, myTreatCurvesIndependent);
228  break;
229  case 16:
230  coerceValue(value, myUpdateNormals);
231  break;
232  case 17:
233  coerceValue(value, myRemoveHoles);
234  break;
235  case 18:
236  coerceValue(value, myVtxBoundaryInterp);
237  break;
238  case 19:
239  coerceValue(value, myFVarLinearInterp);
240  break;
241  case 20:
242  coerceValue(value, myCreasingMethod);
243  break;
244  case 21:
245  coerceValue(value, myTriangleSubd);
246  break;
247 
248  }
249  }
250 
251  void getParmValue(exint idx, exint &value) const
252  { doGetParmValue(idx, value); }
253  void getParmValue(exint idx, fpreal &value) const
254  { doGetParmValue(idx, value); }
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); }
273 
274  template <typename T>
275  void
276  doSetParmValue(exint idx, const T &value)
277  {
278  switch (idx)
279  {
280  case 0:
281  coerceValue(myGroup, value);
282  break;
283  case 1:
284  coerceValue(myCreaseGroup, value);
285  break;
286  case 2:
287  coerceValue(myDepth, value);
288  break;
289  case 3:
290  coerceValue(myOverrideCreaseWeight, value);
291  break;
292  case 4:
293  coerceValue(myCreaseWeight, value);
294  break;
295  case 5:
296  coerceValue(myOutputCreases, value);
297  break;
298  case 6:
299  coerceValue(myOutputCreaseGroup, value);
300  break;
301  case 7:
302  coerceValue(myCloseCracks, value);
303  break;
304  case 8:
305  coerceValue(myDivideChoice, value);
306  break;
307  case 9:
308  coerceValue(myBias, value);
309  break;
310  case 10:
311  coerceValue(mySmoothVertex, value);
312  break;
313  case 11:
314  coerceValue(myEnforceConsistentTopology, value);
315  break;
316  case 12:
317  coerceValue(myLinearCreases, value);
318  break;
319  case 13:
320  coerceValue(myAlgorithm, value);
321  break;
322  case 14:
323  coerceValue(myBuildPolygonSoup, value);
324  break;
325  case 15:
326  coerceValue(myTreatCurvesIndependent, value);
327  break;
328  case 16:
329  coerceValue(myUpdateNormals, value);
330  break;
331  case 17:
332  coerceValue(myRemoveHoles, value);
333  break;
334  case 18:
335  coerceValue(myVtxBoundaryInterp, value);
336  break;
337  case 19:
338  coerceValue(myFVarLinearInterp, value);
339  break;
340  case 20:
341  coerceValue(myCreasingMethod, value);
342  break;
343  case 21:
344  coerceValue(myTriangleSubd, value);
345  break;
346 
347  }
348  }
349 
350  void setParmValue(exint idx, const exint &value)
351  { doSetParmValue(idx, value); }
352  void setParmValue(exint idx, const fpreal &value)
353  { doSetParmValue(idx, value); }
354  void setParmValue(exint idx, const UT_Vector2D &value)
355  { doSetParmValue(idx, value); }
356  void setParmValue(exint idx, const UT_Vector3D &value)
357  { doSetParmValue(idx, value); }
358  void setParmValue(exint idx, const UT_Vector4D &value)
359  { doSetParmValue(idx, value); }
360  void setParmValue(exint idx, const UT_Matrix2D &value)
361  { doSetParmValue(idx, value); }
362  void setParmValue(exint idx, const UT_Matrix3D &value)
363  { doSetParmValue(idx, value); }
364  void setParmValue(exint idx, const UT_Matrix4D &value)
365  { doSetParmValue(idx, value); }
367  { doSetParmValue(idx, value); }
369  { doSetParmValue(idx, value); }
371  { doSetParmValue(idx, value); }
372 
373  virtual exint getNumParms() const
374  {
375  return 22;
376  }
377 
378  virtual const char *getParmName(exint fieldnum) const
379  {
380  switch (fieldnum)
381  {
382  case 0:
383  return "subdivide";
384  case 1:
385  return "creases";
386  case 2:
387  return "iterations";
388  case 3:
389  return "overridecrease";
390  case 4:
391  return "creaseweight";
392  case 5:
393  return "outputcrease";
394  case 6:
395  return "outcreasegroup";
396  case 7:
397  return "closeholes";
398  case 8:
399  return "surroundpoly";
400  case 9:
401  return "bias";
402  case 10:
403  return "smoothvertex";
404  case 11:
405  return "consisttopology";
406  case 12:
407  return "linearcreases";
408  case 13:
409  return "algorithm";
410  case 14:
411  return "buildpolysoups";
412  case 15:
413  return "indepcurves";
414  case 16:
415  return "updatenmls";
416  case 17:
417  return "removeholes";
418  case 18:
419  return "vtxboundary";
420  case 19:
421  return "fvarlinear";
422  case 20:
423  return "creasemethod";
424  case 21:
425  return "trianglesubd";
426 
427  }
428  return 0;
429  }
430 
431  virtual ParmType getParmType(exint fieldnum) const
432  {
433  switch (fieldnum)
434  {
435  case 0:
436  return PARM_STRING;
437  case 1:
438  return PARM_STRING;
439  case 2:
440  return PARM_INTEGER;
441  case 3:
442  return PARM_INTEGER;
443  case 4:
444  return PARM_FLOAT;
445  case 5:
446  return PARM_INTEGER;
447  case 6:
448  return PARM_STRING;
449  case 7:
450  return PARM_INTEGER;
451  case 8:
452  return PARM_INTEGER;
453  case 9:
454  return PARM_FLOAT;
455  case 10:
456  return PARM_INTEGER;
457  case 11:
458  return PARM_INTEGER;
459  case 12:
460  return PARM_INTEGER;
461  case 13:
462  return PARM_INTEGER;
463  case 14:
464  return PARM_INTEGER;
465  case 15:
466  return PARM_INTEGER;
467  case 16:
468  return PARM_INTEGER;
469  case 17:
470  return PARM_INTEGER;
471  case 18:
472  return PARM_STRING;
473  case 19:
474  return PARM_STRING;
475  case 20:
476  return PARM_STRING;
477  case 21:
478  return PARM_STRING;
479 
480  }
481  return PARM_UNSUPPORTED;
482  }
483 
484  // Boiler plate to load individual types.
485  static void loadData(UT_IStream &is, int64 &v)
486  { is.bread(&v, 1); }
487  static void loadData(UT_IStream &is, bool &v)
488  { int64 iv; is.bread(&iv, 1); v = iv; }
489  static void loadData(UT_IStream &is, fpreal64 &v)
490  { is.bread<fpreal64>(&v, 1); }
491  static void loadData(UT_IStream &is, UT_Vector2D &v)
492  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
493  static void loadData(UT_IStream &is, UT_Vector3D &v)
494  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
495  is.bread<fpreal64>(&v.z(), 1); }
496  static void loadData(UT_IStream &is, UT_Vector4D &v)
497  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
498  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
499  static void loadData(UT_IStream &is, UT_Matrix2D &v)
500  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
501  static void loadData(UT_IStream &is, UT_Matrix3D &v)
502  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
503  static void loadData(UT_IStream &is, UT_Matrix4D &v)
504  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
505  static void loadData(UT_IStream &is, UT_Vector2I &v)
506  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
507  static void loadData(UT_IStream &is, UT_Vector3I &v)
508  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
509  is.bread<int64>(&v.z(), 1); }
510  static void loadData(UT_IStream &is, UT_Vector4I &v)
511  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
512  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
514  { is.bread(v); }
516  { UT_StringHolder rampdata;
517  loadData(is, rampdata);
518  if (rampdata.isstring())
519  {
520  v.reset(new UT_Ramp());
521  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
522  v->load(istr);
523  }
524  else v.reset();
525  }
528  loadData(is, data);
529  if (data.isstring())
530  {
531  // Find the data type.
532  char *colon = UT_StringWrap(data).findChar(':');
533  if (colon)
534  {
535  int typelen = colon - data.buffer();
537  type.strncpy(data.buffer(), typelen);
538  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
539 
540  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
541  }
542  }
543  else v.reset();
544  }
545 
546  static void saveData(std::ostream &os, int64 v)
547  { UTwrite(os, &v); }
548  static void saveData(std::ostream &os, bool v)
549  { int64 iv = v; UTwrite(os, &iv); }
550  static void saveData(std::ostream &os, fpreal64 v)
551  { UTwrite<fpreal64>(os, &v); }
552  static void saveData(std::ostream &os, UT_Vector2D v)
553  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
554  static void saveData(std::ostream &os, UT_Vector3D v)
555  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
556  UTwrite<fpreal64>(os, &v.z()); }
557  static void saveData(std::ostream &os, UT_Vector4D v)
558  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
559  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
560  static void saveData(std::ostream &os, UT_Matrix2D v)
562  static void saveData(std::ostream &os, UT_Matrix3D v)
564  static void saveData(std::ostream &os, UT_Matrix4D v)
566  static void saveData(std::ostream &os, UT_StringHolder s)
567  { UT_StringWrap(s).saveBinary(os); }
568  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
569  { UT_StringHolder result;
570  UT_OStringStream ostr;
571  if (s) s->save(ostr);
572  result = ostr.str();
573  saveData(os, result);
574  }
575  static void saveData(std::ostream &os, PRM_DataItemHandle s)
576  { UT_StringHolder result;
577  UT_OStringStream ostr;
578  if (s)
579  {
580  ostr << s->getDataTypeToken();
581  ostr << ":";
582  s->saveBinary(ostr);
583  }
584  result = ostr.str();
585  saveData(os, result);
586  }
587 
588 
589  void save(std::ostream &os) const
590  {
591  int32 v = version();
592  UTwrite(os, &v);
593  saveData(os, myGroup);
594  saveData(os, myCreaseGroup);
595  saveData(os, myDepth);
596  saveData(os, myOverrideCreaseWeight);
597  saveData(os, myCreaseWeight);
598  saveData(os, myOutputCreases);
599  saveData(os, myOutputCreaseGroup);
600  saveData(os, myCloseCracks);
601  saveData(os, myDivideChoice);
602  saveData(os, myBias);
603  saveData(os, mySmoothVertex);
604  saveData(os, myEnforceConsistentTopology);
605  saveData(os, myLinearCreases);
606  saveData(os, myAlgorithm);
607  saveData(os, myBuildPolygonSoup);
608  saveData(os, myTreatCurvesIndependent);
609  saveData(os, myUpdateNormals);
610  saveData(os, myRemoveHoles);
611  saveData(os, myVtxBoundaryInterp);
612  saveData(os, myFVarLinearInterp);
613  saveData(os, myCreasingMethod);
614  saveData(os, myTriangleSubd);
615 
616  }
617 
618  bool load(UT_IStream &is)
619  {
620  int32 v;
621  is.bread(&v, 1);
622  if (version() != v)
623  {
624  // Fail incompatible versions
625  return false;
626  }
627  loadData(is, myGroup);
628  loadData(is, myCreaseGroup);
629  loadData(is, myDepth);
630  loadData(is, myOverrideCreaseWeight);
631  loadData(is, myCreaseWeight);
632  loadData(is, myOutputCreases);
633  loadData(is, myOutputCreaseGroup);
634  loadData(is, myCloseCracks);
635  loadData(is, myDivideChoice);
636  loadData(is, myBias);
637  loadData(is, mySmoothVertex);
638  loadData(is, myEnforceConsistentTopology);
639  loadData(is, myLinearCreases);
640  loadData(is, myAlgorithm);
641  loadData(is, myBuildPolygonSoup);
642  loadData(is, myTreatCurvesIndependent);
643  loadData(is, myUpdateNormals);
644  loadData(is, myRemoveHoles);
645  loadData(is, myVtxBoundaryInterp);
646  loadData(is, myFVarLinearInterp);
647  loadData(is, myCreasingMethod);
648  loadData(is, myTriangleSubd);
649 
650  return true;
651  }
652 
653  const UT_StringHolder & getGroup() const { return myGroup; }
654  void setGroup(const UT_StringHolder & val) { myGroup = val; }
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getGroup();
659  UT_StringHolder result;
660  OP_Utils::evalOpParm(result, thissop, "subdivide", cookparms.getCookTime(), 0);
661  return result;
662  }
663  const UT_StringHolder & getCreaseGroup() const { return myCreaseGroup; }
664  void setCreaseGroup(const UT_StringHolder & val) { myCreaseGroup = val; }
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getCreaseGroup();
669  UT_StringHolder result;
670  OP_Utils::evalOpParm(result, thissop, "creases", cookparms.getCookTime(), 0);
671  return result;
672  }
673  int64 getDepth() const { return myDepth; }
674  void setDepth(int64 val) { myDepth = val; }
675  int64 opDepth(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getDepth();
679  int64 result;
680  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
681  return result;
682  }
683  bool getOverrideCreaseWeight() const { return myOverrideCreaseWeight; }
684  void setOverrideCreaseWeight(bool val) { myOverrideCreaseWeight = val; }
685  bool opOverrideCreaseWeight(const SOP_NodeVerb::CookParms &cookparms) const
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getOverrideCreaseWeight();
689  bool result;
690  OP_Utils::evalOpParm(result, thissop, "overridecrease", cookparms.getCookTime(), 0);
691  return result;
692  }
693  fpreal64 getCreaseWeight() const { return myCreaseWeight; }
694  void setCreaseWeight(fpreal64 val) { myCreaseWeight = val; }
696  {
697  SOP_Node *thissop = cookparms.getNode();
698  if (!thissop) return getCreaseWeight();
699  fpreal64 result;
700  OP_Utils::evalOpParm(result, thissop, "creaseweight", cookparms.getCookTime(), 0);
701  return result;
702  }
703  bool getOutputCreases() const { return myOutputCreases; }
704  void setOutputCreases(bool val) { myOutputCreases = val; }
705  bool opOutputCreases(const SOP_NodeVerb::CookParms &cookparms) const
706  {
707  SOP_Node *thissop = cookparms.getNode();
708  if (!thissop) return getOutputCreases();
709  bool result;
710  OP_Utils::evalOpParm(result, thissop, "outputcrease", cookparms.getCookTime(), 0);
711  return result;
712  }
713  const UT_StringHolder & getOutputCreaseGroup() const { return myOutputCreaseGroup; }
714  void setOutputCreaseGroup(const UT_StringHolder & val) { myOutputCreaseGroup = val; }
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getOutputCreaseGroup();
719  UT_StringHolder result;
720  OP_Utils::evalOpParm(result, thissop, "outcreasegroup", cookparms.getCookTime(), 0);
721  return result;
722  }
723  int64 getCloseCracks() const { return myCloseCracks; }
724  void setCloseCracks(int64 val) { myCloseCracks = val; }
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getCloseCracks();
729  int64 result;
730  OP_Utils::evalOpParm(result, thissop, "closeholes", cookparms.getCookTime(), 0);
731  return result;
732  }
733  int64 getDivideChoice() const { return myDivideChoice; }
734  void setDivideChoice(int64 val) { myDivideChoice = val; }
736  {
737  SOP_Node *thissop = cookparms.getNode();
738  if (!thissop) return getDivideChoice();
739  int64 result;
740  OP_Utils::evalOpParm(result, thissop, "surroundpoly", cookparms.getCookTime(), 0);
741  return result;
742  }
743  fpreal64 getBias() const { return myBias; }
744  void setBias(fpreal64 val) { myBias = val; }
745  fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
746  {
747  SOP_Node *thissop = cookparms.getNode();
748  if (!thissop) return getBias();
749  fpreal64 result;
750  OP_Utils::evalOpParm(result, thissop, "bias", cookparms.getCookTime(), 0);
751  return result;
752  }
753  bool getSmoothVertex() const { return mySmoothVertex; }
754  void setSmoothVertex(bool val) { mySmoothVertex = val; }
755  bool opSmoothVertex(const SOP_NodeVerb::CookParms &cookparms) const
756  {
757  SOP_Node *thissop = cookparms.getNode();
758  if (!thissop) return getSmoothVertex();
759  bool result;
760  OP_Utils::evalOpParm(result, thissop, "smoothvertex", cookparms.getCookTime(), 0);
761  return result;
762  }
763  bool getEnforceConsistentTopology() const { return myEnforceConsistentTopology; }
764  void setEnforceConsistentTopology(bool val) { myEnforceConsistentTopology = val; }
766  {
767  SOP_Node *thissop = cookparms.getNode();
768  if (!thissop) return getEnforceConsistentTopology();
769  bool result;
770  OP_Utils::evalOpParm(result, thissop, "consisttopology", cookparms.getCookTime(), 0);
771  return result;
772  }
773  bool getLinearCreases() const { return myLinearCreases; }
774  void setLinearCreases(bool val) { myLinearCreases = val; }
775  bool opLinearCreases(const SOP_NodeVerb::CookParms &cookparms) const
776  {
777  SOP_Node *thissop = cookparms.getNode();
778  if (!thissop) return getLinearCreases();
779  bool result;
780  OP_Utils::evalOpParm(result, thissop, "linearcreases", cookparms.getCookTime(), 0);
781  return result;
782  }
783  int64 getAlgorithm() const { return myAlgorithm; }
784  void setAlgorithm(int64 val) { myAlgorithm = val; }
785  int64 opAlgorithm(const SOP_NodeVerb::CookParms &cookparms) const
786  {
787  SOP_Node *thissop = cookparms.getNode();
788  if (!thissop) return getAlgorithm();
789  int64 result;
790  OP_Utils::evalOpParm(result, thissop, "algorithm", cookparms.getCookTime(), 0);
791  return result;
792  }
793  bool getBuildPolygonSoup() const { return myBuildPolygonSoup; }
794  void setBuildPolygonSoup(bool val) { myBuildPolygonSoup = val; }
795  bool opBuildPolygonSoup(const SOP_NodeVerb::CookParms &cookparms) const
796  {
797  SOP_Node *thissop = cookparms.getNode();
798  if (!thissop) return getBuildPolygonSoup();
799  bool result;
800  OP_Utils::evalOpParm(result, thissop, "buildpolysoups", cookparms.getCookTime(), 0);
801  return result;
802  }
803  bool getTreatCurvesIndependent() const { return myTreatCurvesIndependent; }
804  void setTreatCurvesIndependent(bool val) { myTreatCurvesIndependent = val; }
806  {
807  SOP_Node *thissop = cookparms.getNode();
808  if (!thissop) return getTreatCurvesIndependent();
809  bool result;
810  OP_Utils::evalOpParm(result, thissop, "indepcurves", cookparms.getCookTime(), 0);
811  return result;
812  }
813  bool getUpdateNormals() const { return myUpdateNormals; }
814  void setUpdateNormals(bool val) { myUpdateNormals = val; }
815  bool opUpdateNormals(const SOP_NodeVerb::CookParms &cookparms) const
816  {
817  SOP_Node *thissop = cookparms.getNode();
818  if (!thissop) return getUpdateNormals();
819  bool result;
820  OP_Utils::evalOpParm(result, thissop, "updatenmls", cookparms.getCookTime(), 0);
821  return result;
822  }
823  bool getRemoveHoles() const { return myRemoveHoles; }
824  void setRemoveHoles(bool val) { myRemoveHoles = val; }
825  bool opRemoveHoles(const SOP_NodeVerb::CookParms &cookparms) const
826  {
827  SOP_Node *thissop = cookparms.getNode();
828  if (!thissop) return getRemoveHoles();
829  bool result;
830  OP_Utils::evalOpParm(result, thissop, "removeholes", cookparms.getCookTime(), 0);
831  return result;
832  }
833  const UT_StringHolder & getVtxBoundaryInterp() const { return myVtxBoundaryInterp; }
834  void setVtxBoundaryInterp(const UT_StringHolder & val) { myVtxBoundaryInterp = val; }
836  {
837  SOP_Node *thissop = cookparms.getNode();
838  if (!thissop) return getVtxBoundaryInterp();
839  UT_StringHolder result;
840  OP_Utils::evalOpParm(result, thissop, "vtxboundary", cookparms.getCookTime(), 0);
841  return result;
842  }
843  const UT_StringHolder & getFVarLinearInterp() const { return myFVarLinearInterp; }
844  void setFVarLinearInterp(const UT_StringHolder & val) { myFVarLinearInterp = val; }
846  {
847  SOP_Node *thissop = cookparms.getNode();
848  if (!thissop) return getFVarLinearInterp();
849  UT_StringHolder result;
850  OP_Utils::evalOpParm(result, thissop, "fvarlinear", cookparms.getCookTime(), 0);
851  return result;
852  }
853  const UT_StringHolder & getCreasingMethod() const { return myCreasingMethod; }
854  void setCreasingMethod(const UT_StringHolder & val) { myCreasingMethod = val; }
856  {
857  SOP_Node *thissop = cookparms.getNode();
858  if (!thissop) return getCreasingMethod();
859  UT_StringHolder result;
860  OP_Utils::evalOpParm(result, thissop, "creasemethod", cookparms.getCookTime(), 0);
861  return result;
862  }
863  const UT_StringHolder & getTriangleSubd() const { return myTriangleSubd; }
864  void setTriangleSubd(const UT_StringHolder & val) { myTriangleSubd = val; }
866  {
867  SOP_Node *thissop = cookparms.getNode();
868  if (!thissop) return getTriangleSubd();
869  UT_StringHolder result;
870  OP_Utils::evalOpParm(result, thissop, "trianglesubd", cookparms.getCookTime(), 0);
871  return result;
872  }
873 
874 private:
875  UT_StringHolder myGroup;
876  UT_StringHolder myCreaseGroup;
877  int64 myDepth;
878  bool myOverrideCreaseWeight;
879  fpreal64 myCreaseWeight;
880  bool myOutputCreases;
881  UT_StringHolder myOutputCreaseGroup;
882  int64 myCloseCracks;
883  int64 myDivideChoice;
884  fpreal64 myBias;
885  bool mySmoothVertex;
886  bool myEnforceConsistentTopology;
887  bool myLinearCreases;
888  int64 myAlgorithm;
889  bool myBuildPolygonSoup;
890  bool myTreatCurvesIndependent;
891  bool myUpdateNormals;
892  bool myRemoveHoles;
893  UT_StringHolder myVtxBoundaryInterp;
894  UT_StringHolder myFVarLinearInterp;
895  UT_StringHolder myCreasingMethod;
896  UT_StringHolder myTriangleSubd;
897 
898 };
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool getTreatCurvesIndependent() const
static void saveData(std::ostream &os, bool v)
void setParmValue(exint idx, const UT_Matrix2D &value)
void getParmValue(exint idx, UT_Matrix3D &value) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
int64 opCloseCracks(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getTriangleSubd() const
T & z(void)
Definition: UT_Vector4.h:379
virtual ParmType getParmType(exint fieldnum) const
fpreal64 getCreaseWeight() const
bool operator==(const SOP_SubdivideParms &src) const
void setParmValue(exint idx, const UT_Matrix3D &value)
bool opUpdateNormals(const SOP_NodeVerb::CookParms &cookparms) 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
void setParmValue(exint idx, const UT_Vector2D &value)
bool getOverrideCreaseWeight() const
static void saveData(std::ostream &os, UT_Vector3D v)
bool opBuildPolygonSoup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_StringHolder &value)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
void save(std::ostream &os) const
An output stream object that owns its own string buffer storage.
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
int64 opDivideChoice(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opCreaseGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
void setParmValue(exint idx, const UT_Vector3D &value)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setCreaseGroup(const UT_StringHolder &val)
UT_StringHolder opTriangleSubd(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector4D &value)
void setBuildPolygonSoup(bool val)
void getParmValue(exint idx, exint &value) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void doSetParmValue(exint idx, const T &value)
bool opTreatCurvesIndependent(const SOP_NodeVerb::CookParms &cookparms) const
bool opEnforceConsistentTopology(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
void setTriangleSubd(const UT_StringHolder &val)
bool opOverrideCreaseWeight(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
static void loadData(UT_IStream &is, int64 &v)
void getParmValue(exint idx, UT_Vector2D &value) const
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
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 saveData(std::ostream &os, UT_Matrix4D v)
const UT_StringHolder & getCreasingMethod() const
void getParmValue(exint idx, UT_StringHolder &value) const
int64 exint
Definition: SYS_Types.h:116
virtual void copyFrom(const SOP_NodeParms *src)
static void saveData(std::ostream &os, UT_Vector4D v)
UT_StringHolder opCreasingMethod(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
void setFVarLinearInterp(const UT_StringHolder &val)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
bool opSmoothVertex(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputCreaseGroup() const
void setTreatCurvesIndependent(bool val)
const UT_StringHolder & getFVarLinearInterp() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setEnforceConsistentTopology(bool val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool opLinearCreases(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
GLboolean * data
Definition: glcorearb.h:130
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
void setOutputCreaseGroup(const UT_StringHolder &val)
void setOverrideCreaseWeight(bool val)
void setVtxBoundaryInterp(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Vector4D &value) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void saveData(std::ostream &os, UT_Matrix3D v)
void getParmValue(exint idx, UT_Vector3D &value) const
void setBias(fpreal64 val)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void saveData(std::ostream &os, int64 v)
int64 opDepth(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opCreaseWeight(const SOP_NodeVerb::CookParms &cookparms) const
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_Vector3I &v)
const UT_StringHolder & getCreaseGroup() const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
int64 opAlgorithm(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
virtual exint getNumParms() const
void getParmValue(exint idx, UT_Matrix4D &value) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector2I &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setCreasingMethod(const UT_StringHolder &val)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
bool opOutputCreases(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Vector3D &v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
bool load(UT_IStream &is)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getEnforceConsistentTopology() const
void setCreaseWeight(fpreal64 val)
T & y(void)
Definition: UT_Vector2.h:287
static void loadData(UT_IStream &is, bool &v)
const UT_StringHolder & getVtxBoundaryInterp() const
UT_StringHolder opVtxBoundaryInterp(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(exint idx, T &value) const
GLboolean r
Definition: glcorearb.h:1221
UT_StringHolder opOutputCreaseGroup(const SOP_NodeVerb::CookParms &cookparms) const
T & w(void)
Definition: UT_Vector4.h:381
void setParmValue(exint idx, const UT_Matrix4D &value)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
bool opRemoveHoles(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setParmValue(exint idx, const fpreal &value)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
void getParmValue(exint idx, fpreal &value) const
SYS_FORCE_INLINE bool isstring() const
bool operator!=(const SOP_SubdivideParms &src) const
UT_StringHolder opFVarLinearInterp(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
virtual const char * getParmName(exint fieldnum) const
void setGroup(const UT_StringHolder &val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getParmValue(exint idx, UT_Matrix2D &value) const
void setParmValue(exint idx, const exint &value)
static void loadData(UT_IStream &is, fpreal64 &v)
GLenum src
Definition: glcorearb.h:1792