HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Facet.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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_FacetEnums
24 {
25  enum class GroupType
26  {
27  GUESS = 0,
28  POINTS,
29  PRIMS
30  };
31 
33  getToken(GroupType enum_value)
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case GroupType::GUESS: return "guess"_sh;
38  case GroupType::POINTS: return "points"_sh;
39  case GroupType::PRIMS: return "prims"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44  enum class Cons
45  {
46  NONE = 0,
47  POINTS,
48  FPOINTS,
49  NORMALS,
50  FNORMALS
51  };
52 
54  getToken(Cons enum_value)
55  {
56  using namespace UT::Literal;
57  switch (enum_value) {
58  case Cons::NONE: return "none"_sh;
59  case Cons::POINTS: return "points"_sh;
60  case Cons::FPOINTS: return "fpoints"_sh;
61  case Cons::NORMALS: return "normals"_sh;
62  case Cons::FNORMALS: return "fnormals"_sh;
63  default: UT_ASSERT(false); return ""_sh;
64  }
65  }
66 
67 }
68 
69 
71 {
72 public:
73  static int version() { return 1; }
74 
76  {
77  myGroup = ""_UTsh;
78  myGroupType = 0;
79  myPrenml = false;
80  myUnit = false;
81  myUnique = false;
82  myCons = 0;
83  myDist = 0.001;
84  myAccurate = true;
85  myInline = false;
86  myInlinedist = 0.001;
87  myOrientpolys = false;
88  myCusp = false;
89  myAngle = 20;
90  myRemove = false;
91  myMkplanar = false;
92  myPostnml = false;
93  myReversenml = false;
94 
95  }
96 
97  explicit SOP_FacetParms(const SOP_FacetParms &) = default;
98  SOP_FacetParms &operator=(const SOP_FacetParms &) = default;
99  SOP_FacetParms(SOP_FacetParms &&) noexcept = default;
100  SOP_FacetParms &operator=(SOP_FacetParms &&) noexcept = default;
101 
102  ~SOP_FacetParms() override {}
103 
104  bool operator==(const SOP_FacetParms &src) const
105  {
106  if (myGroup != src.myGroup) return false;
107  if (myGroupType != src.myGroupType) return false;
108  if (myPrenml != src.myPrenml) return false;
109  if (myUnit != src.myUnit) return false;
110  if (myUnique != src.myUnique) return false;
111  if (myCons != src.myCons) return false;
112  if (myDist != src.myDist) return false;
113  if (myAccurate != src.myAccurate) return false;
114  if (myInline != src.myInline) return false;
115  if (myInlinedist != src.myInlinedist) return false;
116  if (myOrientpolys != src.myOrientpolys) return false;
117  if (myCusp != src.myCusp) return false;
118  if (myAngle != src.myAngle) return false;
119  if (myRemove != src.myRemove) return false;
120  if (myMkplanar != src.myMkplanar) return false;
121  if (myPostnml != src.myPostnml) return false;
122  if (myReversenml != src.myReversenml) return false;
123 
124  return true;
125  }
126  bool operator!=(const SOP_FacetParms &src) const
127  {
128  return !operator==(src);
129  }
132 
133 
134 
135  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
136  {
137  myGroup = ""_UTsh;
138  if (true)
139  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
140  myGroupType = 0;
141  if (true)
142  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, 0);
143  myPrenml = false;
144  if (true)
145  graph->evalOpParm(myPrenml, nodeidx, "prenml", time, 0);
146  myUnit = false;
147  if (true && ( (true&&!(((getPrenml()==1)))) ) )
148  graph->evalOpParm(myUnit, nodeidx, "unit", time, 0);
149  myUnique = false;
150  if (true)
151  graph->evalOpParm(myUnique, nodeidx, "unique", time, 0);
152  myCons = 0;
153  if (true)
154  graph->evalOpParm(myCons, nodeidx, "cons", time, 0);
155  myDist = 0.001;
156  if (true && ( (true&&!(((int64(getCons())==0)))) ) )
157  graph->evalOpParm(myDist, nodeidx, "dist", time, 0);
158  myAccurate = true;
159  if (true && ( (true&&!(((int64(getCons())==0)))) ) )
160  graph->evalOpParm(myAccurate, nodeidx, "accurate", time, 0);
161  myInline = false;
162  if (true)
163  graph->evalOpParm(myInline, nodeidx, "inline", time, 0);
164  myInlinedist = 0.001;
165  if (true && ( (true&&!(((getInline()==0)))) ) )
166  graph->evalOpParm(myInlinedist, nodeidx, "inlinedist", time, 0);
167  myOrientpolys = false;
168  if (true)
169  graph->evalOpParm(myOrientpolys, nodeidx, "orientPolys", time, 0);
170  myCusp = false;
171  if (true)
172  graph->evalOpParm(myCusp, nodeidx, "cusp", time, 0);
173  myAngle = 20;
174  if (true && ( (true&&!(((getCusp()==0)))) ) )
175  graph->evalOpParm(myAngle, nodeidx, "angle", time, 0);
176  myRemove = false;
177  if (true)
178  graph->evalOpParm(myRemove, nodeidx, "remove", time, 0);
179  myMkplanar = false;
180  if (true)
181  graph->evalOpParm(myMkplanar, nodeidx, "mkplanar", time, 0);
182  myPostnml = false;
183  if (true)
184  graph->evalOpParm(myPostnml, nodeidx, "postnml", time, 0);
185  myReversenml = false;
186  if (true)
187  graph->evalOpParm(myReversenml, nodeidx, "reversenml", time, 0);
188 
189  }
190 
191 
192  void loadFromOpSubclass(const LoadParms &loadparms) override
193  {
194  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
195  }
196 
197 
198  void copyFrom(const OP_NodeParms *src) override
199  {
200  *this = *((const SOP_FacetParms *)src);
201  }
202 
203  template <typename T>
204  void
205  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
206  {
207  if (idx.size() < 1)
208  return;
209  UT_ASSERT(idx.size() == instance.size()+1);
210  if (idx.size() != instance.size()+1)
211  return;
212  switch (idx[0])
213  {
214  case 0:
215  coerceValue(value, myGroup);
216  break;
217  case 1:
218  coerceValue(value, myGroupType);
219  break;
220  case 2:
221  coerceValue(value, myPrenml);
222  break;
223  case 3:
224  coerceValue(value, myUnit);
225  break;
226  case 4:
227  coerceValue(value, myUnique);
228  break;
229  case 5:
230  coerceValue(value, myCons);
231  break;
232  case 6:
233  coerceValue(value, myDist);
234  break;
235  case 7:
236  coerceValue(value, myAccurate);
237  break;
238  case 8:
239  coerceValue(value, myInline);
240  break;
241  case 9:
242  coerceValue(value, myInlinedist);
243  break;
244  case 10:
245  coerceValue(value, myOrientpolys);
246  break;
247  case 11:
248  coerceValue(value, myCusp);
249  break;
250  case 12:
251  coerceValue(value, myAngle);
252  break;
253  case 13:
254  coerceValue(value, myRemove);
255  break;
256  case 14:
257  coerceValue(value, myMkplanar);
258  break;
259  case 15:
260  coerceValue(value, myPostnml);
261  break;
262  case 16:
263  coerceValue(value, myReversenml);
264  break;
265 
266  }
267  }
268 
269  bool isParmColorRamp(exint idx) const override
270  {
271  switch (idx)
272  {
273 
274  }
275  return false;
276  }
277 
278  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
279  { doGetParmValue(idx, instance, value); }
280  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
289  { doGetParmValue(idx, instance, value); }
290  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
291  { doGetParmValue(idx, instance, value); }
292  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
299  { doGetParmValue(idx, instance, value); }
300 
301  template <typename T>
302  void
303  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
304  {
305  if (idx.size() < 1)
306  return;
307  UT_ASSERT(idx.size() == instance.size()+1);
308  if (idx.size() != instance.size()+1)
309  return;
310  switch (idx[0])
311  {
312  case 0:
313  coerceValue(myGroup, ( ( value ) ));
314  break;
315  case 1:
316  coerceValue(myGroupType, clampMinValue(0, clampMaxValue(2, value ) ));
317  break;
318  case 2:
319  coerceValue(myPrenml, ( ( value ) ));
320  break;
321  case 3:
322  coerceValue(myUnit, ( ( value ) ));
323  break;
324  case 4:
325  coerceValue(myUnique, ( ( value ) ));
326  break;
327  case 5:
328  coerceValue(myCons, clampMinValue(0, clampMaxValue(4, value ) ));
329  break;
330  case 6:
331  coerceValue(myDist, ( ( value ) ));
332  break;
333  case 7:
334  coerceValue(myAccurate, ( ( value ) ));
335  break;
336  case 8:
337  coerceValue(myInline, ( ( value ) ));
338  break;
339  case 9:
340  coerceValue(myInlinedist, ( ( value ) ));
341  break;
342  case 10:
343  coerceValue(myOrientpolys, ( ( value ) ));
344  break;
345  case 11:
346  coerceValue(myCusp, ( ( value ) ));
347  break;
348  case 12:
349  coerceValue(myAngle, ( ( value ) ));
350  break;
351  case 13:
352  coerceValue(myRemove, ( ( value ) ));
353  break;
354  case 14:
355  coerceValue(myMkplanar, ( ( value ) ));
356  break;
357  case 15:
358  coerceValue(myPostnml, ( ( value ) ));
359  break;
360  case 16:
361  coerceValue(myReversenml, ( ( value ) ));
362  break;
363 
364  }
365  }
366 
367  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
368  { doSetParmValue(idx, instance, value); }
369  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
370  { doSetParmValue(idx, instance, value); }
371  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
372  { doSetParmValue(idx, instance, value); }
373  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
388  { doSetParmValue(idx, instance, value); }
389 
390  exint getNestNumParms(TempIndex idx) const override
391  {
392  if (idx.size() == 0)
393  return 17;
394  switch (idx[0])
395  {
396 
397  }
398  // Invalid
399  return 0;
400  }
401 
402  const char *getNestParmName(TempIndex fieldnum) const override
403  {
404  if (fieldnum.size() < 1)
405  return 0;
406  switch (fieldnum[0])
407  {
408  case 0:
409  return "group";
410  case 1:
411  return "grouptype";
412  case 2:
413  return "prenml";
414  case 3:
415  return "unit";
416  case 4:
417  return "unique";
418  case 5:
419  return "cons";
420  case 6:
421  return "dist";
422  case 7:
423  return "accurate";
424  case 8:
425  return "inline";
426  case 9:
427  return "inlinedist";
428  case 10:
429  return "orientPolys";
430  case 11:
431  return "cusp";
432  case 12:
433  return "angle";
434  case 13:
435  return "remove";
436  case 14:
437  return "mkplanar";
438  case 15:
439  return "postnml";
440  case 16:
441  return "reversenml";
442 
443  }
444  return 0;
445  }
446 
447  ParmType getNestParmType(TempIndex fieldnum) const override
448  {
449  if (fieldnum.size() < 1)
450  return PARM_UNSUPPORTED;
451  switch (fieldnum[0])
452  {
453  case 0:
454  return PARM_STRING;
455  case 1:
456  return PARM_INTEGER;
457  case 2:
458  return PARM_INTEGER;
459  case 3:
460  return PARM_INTEGER;
461  case 4:
462  return PARM_INTEGER;
463  case 5:
464  return PARM_INTEGER;
465  case 6:
466  return PARM_FLOAT;
467  case 7:
468  return PARM_INTEGER;
469  case 8:
470  return PARM_INTEGER;
471  case 9:
472  return PARM_FLOAT;
473  case 10:
474  return PARM_INTEGER;
475  case 11:
476  return PARM_INTEGER;
477  case 12:
478  return PARM_FLOAT;
479  case 13:
480  return PARM_INTEGER;
481  case 14:
482  return PARM_INTEGER;
483  case 15:
484  return PARM_INTEGER;
485  case 16:
486  return PARM_INTEGER;
487 
488  }
489  return PARM_UNSUPPORTED;
490  }
491 
492  // Boiler plate to load individual types.
493  static void loadData(UT_IStream &is, int64 &v)
494  { is.bread(&v, 1); }
495  static void loadData(UT_IStream &is, bool &v)
496  { int64 iv; is.bread(&iv, 1); v = iv; }
497  static void loadData(UT_IStream &is, fpreal64 &v)
498  { is.bread<fpreal64>(&v, 1); }
499  static void loadData(UT_IStream &is, UT_Vector2D &v)
500  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
501  static void loadData(UT_IStream &is, UT_Vector3D &v)
502  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
503  is.bread<fpreal64>(&v.z(), 1); }
504  static void loadData(UT_IStream &is, UT_Vector4D &v)
505  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
506  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
507  static void loadData(UT_IStream &is, UT_Matrix2D &v)
508  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
509  static void loadData(UT_IStream &is, UT_Matrix3D &v)
510  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
511  static void loadData(UT_IStream &is, UT_Matrix4D &v)
512  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
513  static void loadData(UT_IStream &is, UT_Vector2I &v)
514  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
515  static void loadData(UT_IStream &is, UT_Vector3I &v)
516  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
517  is.bread<int64>(&v.z(), 1); }
518  static void loadData(UT_IStream &is, UT_Vector4I &v)
519  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
520  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
522  { is.bread(v); }
524  { UT_StringHolder rampdata;
525  loadData(is, rampdata);
526  if (rampdata.isstring())
527  {
528  v.reset(new UT_Ramp());
529  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
530  v->load(istr);
531  }
532  else v.reset();
533  }
536  loadData(is, data);
537  if (data.isstring())
538  {
539  // Find the data type.
540  const char *colon = UT_StringWrap(data).findChar(':');
541  if (colon)
542  {
543  int typelen = colon - data.buffer();
545  type.strncpy(data.buffer(), typelen);
546  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
547 
548  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
549  }
550  }
551  else v.reset();
552  }
553 
554  static void saveData(std::ostream &os, int64 v)
555  { UTwrite(os, &v); }
556  static void saveData(std::ostream &os, bool v)
557  { int64 iv = v; UTwrite(os, &iv); }
558  static void saveData(std::ostream &os, fpreal64 v)
559  { UTwrite<fpreal64>(os, &v); }
560  static void saveData(std::ostream &os, UT_Vector2D v)
561  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
562  static void saveData(std::ostream &os, UT_Vector3D v)
563  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
564  UTwrite<fpreal64>(os, &v.z()); }
565  static void saveData(std::ostream &os, UT_Vector4D v)
566  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
567  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
568  static void saveData(std::ostream &os, UT_Matrix2D v)
570  static void saveData(std::ostream &os, UT_Matrix3D v)
572  static void saveData(std::ostream &os, UT_Matrix4D v)
574  static void saveData(std::ostream &os, UT_StringHolder s)
575  { UT_StringWrap(s).saveBinary(os); }
576  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
578  UT_OStringStream ostr;
579  if (s) s->save(ostr);
580  result = ostr.str();
581  saveData(os, result);
582  }
583  static void saveData(std::ostream &os, PRM_DataItemHandle s)
585  UT_OStringStream ostr;
586  if (s)
587  {
588  ostr << s->getDataTypeToken();
589  ostr << ":";
590  s->saveBinary(ostr);
591  }
592  result = ostr.str();
593  saveData(os, result);
594  }
595 
596 
597  void save(std::ostream &os) const
598  {
599  int32 v = version();
600  UTwrite(os, &v);
601  saveData(os, myGroup);
602  saveData(os, myGroupType);
603  saveData(os, myPrenml);
604  saveData(os, myUnit);
605  saveData(os, myUnique);
606  saveData(os, myCons);
607  saveData(os, myDist);
608  saveData(os, myAccurate);
609  saveData(os, myInline);
610  saveData(os, myInlinedist);
611  saveData(os, myOrientpolys);
612  saveData(os, myCusp);
613  saveData(os, myAngle);
614  saveData(os, myRemove);
615  saveData(os, myMkplanar);
616  saveData(os, myPostnml);
617  saveData(os, myReversenml);
618 
619  }
620 
621  bool load(UT_IStream &is)
622  {
623  int32 v;
624  is.bread(&v, 1);
625  if (version() != v)
626  {
627  // Fail incompatible versions
628  return false;
629  }
630  loadData(is, myGroup);
631  loadData(is, myGroupType);
632  loadData(is, myPrenml);
633  loadData(is, myUnit);
634  loadData(is, myUnique);
635  loadData(is, myCons);
636  loadData(is, myDist);
637  loadData(is, myAccurate);
638  loadData(is, myInline);
639  loadData(is, myInlinedist);
640  loadData(is, myOrientpolys);
641  loadData(is, myCusp);
642  loadData(is, myAngle);
643  loadData(is, myRemove);
644  loadData(is, myMkplanar);
645  loadData(is, myPostnml);
646  loadData(is, myReversenml);
647 
648  return true;
649  }
650 
651  const UT_StringHolder & getGroup() const { return myGroup; }
652  void setGroup(const UT_StringHolder & val) { myGroup = val; }
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getGroup();
658  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
659  return result;
660  }
661  GroupType getGroupType() const { return GroupType(myGroupType); }
662  void setGroupType(GroupType val) { myGroupType = int64(val); }
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getGroupType();
667  int64 result;
668  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
669  return GroupType(result);
670  }
671  bool getPrenml() const { return myPrenml; }
672  void setPrenml(bool val) { myPrenml = val; }
673  bool opPrenml(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getPrenml();
677  bool result;
678  OP_Utils::evalOpParm(result, thissop, "prenml", cookparms.getCookTime(), 0);
679  return result;
680  }
681  bool getUnit() const { return myUnit; }
682  void setUnit(bool val) { myUnit = val; }
683  bool opUnit(const SOP_NodeVerb::CookParms &cookparms) const
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getUnit();
687  bool result;
688  OP_Utils::evalOpParm(result, thissop, "unit", cookparms.getCookTime(), 0);
689  return result;
690  }
691  bool getUnique() const { return myUnique; }
692  void setUnique(bool val) { myUnique = val; }
693  bool opUnique(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getUnique();
697  bool result;
698  OP_Utils::evalOpParm(result, thissop, "unique", cookparms.getCookTime(), 0);
699  return result;
700  }
701  Cons getCons() const { return Cons(myCons); }
702  void setCons(Cons val) { myCons = int64(val); }
703  Cons opCons(const SOP_NodeVerb::CookParms &cookparms) const
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getCons();
707  int64 result;
708  OP_Utils::evalOpParm(result, thissop, "cons", cookparms.getCookTime(), 0);
709  return Cons(result);
710  }
711  fpreal64 getDist() const { return myDist; }
712  void setDist(fpreal64 val) { myDist = val; }
713  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getDist();
718  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
719  return result;
720  }
721  bool getAccurate() const { return myAccurate; }
722  void setAccurate(bool val) { myAccurate = val; }
723  bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getAccurate();
727  bool result;
728  OP_Utils::evalOpParm(result, thissop, "accurate", cookparms.getCookTime(), 0);
729  return result;
730  }
731  bool getInline() const { return myInline; }
732  void setInline(bool val) { myInline = val; }
733  bool opInline(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getInline();
737  bool result;
738  OP_Utils::evalOpParm(result, thissop, "inline", cookparms.getCookTime(), 0);
739  return result;
740  }
741  fpreal64 getInlinedist() const { return myInlinedist; }
742  void setInlinedist(fpreal64 val) { myInlinedist = val; }
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getInlinedist();
748  OP_Utils::evalOpParm(result, thissop, "inlinedist", cookparms.getCookTime(), 0);
749  return result;
750  }
751  bool getOrientpolys() const { return myOrientpolys; }
752  void setOrientpolys(bool val) { myOrientpolys = val; }
753  bool opOrientpolys(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getOrientpolys();
757  bool result;
758  OP_Utils::evalOpParm(result, thissop, "orientPolys", cookparms.getCookTime(), 0);
759  return result;
760  }
761  bool getCusp() const { return myCusp; }
762  void setCusp(bool val) { myCusp = val; }
763  bool opCusp(const SOP_NodeVerb::CookParms &cookparms) const
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getCusp();
767  bool result;
768  OP_Utils::evalOpParm(result, thissop, "cusp", cookparms.getCookTime(), 0);
769  return result;
770  }
771  fpreal64 getAngle() const { return myAngle; }
772  void setAngle(fpreal64 val) { myAngle = val; }
773  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getAngle();
778  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
779  return result;
780  }
781  bool getRemove() const { return myRemove; }
782  void setRemove(bool val) { myRemove = val; }
783  bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return getRemove();
787  bool result;
788  OP_Utils::evalOpParm(result, thissop, "remove", cookparms.getCookTime(), 0);
789  return result;
790  }
791  bool getMkplanar() const { return myMkplanar; }
792  void setMkplanar(bool val) { myMkplanar = val; }
793  bool opMkplanar(const SOP_NodeVerb::CookParms &cookparms) const
794  {
795  SOP_Node *thissop = cookparms.getNode();
796  if (!thissop) return getMkplanar();
797  bool result;
798  OP_Utils::evalOpParm(result, thissop, "mkplanar", cookparms.getCookTime(), 0);
799  return result;
800  }
801  bool getPostnml() const { return myPostnml; }
802  void setPostnml(bool val) { myPostnml = val; }
803  bool opPostnml(const SOP_NodeVerb::CookParms &cookparms) const
804  {
805  SOP_Node *thissop = cookparms.getNode();
806  if (!thissop) return getPostnml();
807  bool result;
808  OP_Utils::evalOpParm(result, thissop, "postnml", cookparms.getCookTime(), 0);
809  return result;
810  }
811  bool getReversenml() const { return myReversenml; }
812  void setReversenml(bool val) { myReversenml = val; }
813  bool opReversenml(const SOP_NodeVerb::CookParms &cookparms) const
814  {
815  SOP_Node *thissop = cookparms.getNode();
816  if (!thissop) return getReversenml();
817  bool result;
818  OP_Utils::evalOpParm(result, thissop, "reversenml", cookparms.getCookTime(), 0);
819  return result;
820  }
821 
822 private:
823  UT_StringHolder myGroup;
824  int64 myGroupType;
825  bool myPrenml;
826  bool myUnit;
827  bool myUnique;
828  int64 myCons;
829  fpreal64 myDist;
830  bool myAccurate;
831  bool myInline;
832  fpreal64 myInlinedist;
833  bool myOrientpolys;
834  bool myCusp;
835  fpreal64 myAngle;
836  bool myRemove;
837  bool myMkplanar;
838  bool myPostnml;
839  bool myReversenml;
840 
841 };
void save(std::ostream &os) const
bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setRemove(bool val)
GroupType getGroupType() const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool opReversenml(const SOP_NodeVerb::CookParms &cookparms) const
bool getCusp() const
bool getRemove() const
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setInline(bool val)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
bool getMkplanar() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setInlinedist(fpreal64 val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setMkplanar(bool val)
bool opUnique(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool load(UT_IStream &is)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
void setUnit(bool val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GLdouble s
Definition: glad.h:3009
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, fpreal64 &v)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
**But if you need a result
Definition: thread.h:613
void setCusp(bool val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool getReversenml() const
void setGroupType(GroupType val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
bool opUnit(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const SOP_FacetParms &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool getUnit() const
exint length() const
static void saveData(std::ostream &os, UT_Vector2D v)
void setAngle(fpreal64 val)
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opMkplanar(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setOrientpolys(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opInlinedist(const SOP_NodeVerb::CookParms &cookparms) const
Cons opCons(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
long long int64
Definition: SYS_Types.h:116
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool opPostnml(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, fpreal64 v)
static int version()
Cons getCons() const
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void setDist(fpreal64 val)
SYS_FORCE_INLINE UT_StringHolder getToken(GroupType enum_value)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setGroup(const UT_StringHolder &val)
void setPrenml(bool val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void saveData(std::ostream &os, UT_Matrix3D v)
GT_API const UT_StringHolder version
void setPostnml(bool val)
fpreal64 getInlinedist() const
bool getInline() const
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
bool opInline(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool getPostnml() const
fpreal64 getAngle() const
fpreal64 fpreal
Definition: SYS_Types.h:277
static void saveData(std::ostream &os, PRM_DataItemHandle s)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void saveData(std::ostream &os, UT_Vector4D v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool getOrientpolys() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
fpreal64 getDist() const
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
#define SOP_API
Definition: SOP_API.h:10
bool getAccurate() const
bool opOrientpolys(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
bool opCusp(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setCons(Cons val)
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const UT_StringHolder & getGroup() const
void setUnique(bool val)
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setReversenml(bool val)
bool operator!=(const SOP_FacetParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
ParmType getNestParmType(TempIndex fieldnum) const override
type
Definition: core.h:1059
bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
bool getUnique() const
void setAccurate(bool val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
const char * getNestParmName(TempIndex fieldnum) const override
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, bool &v)
bool opPrenml(const SOP_NodeVerb::CookParms &cookparms) const
bool getPrenml() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_StringHolder &v)