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 <OP/OP_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 
125  if (baseGetSignature() != src.baseGetSignature()) return false;
126 
127  return true;
128  }
129  bool operator!=(const SOP_FacetParms &src) const
130  {
131  return !operator==(src);
132  }
135 
136 
137 
138  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
139  {
140  myGroup = ""_UTsh;
141  if (true)
142  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
143  myGroupType = 0;
144  if (true)
145  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, graph->isDirect()?nullptr:depnode);
146  myPrenml = false;
147  if (true)
148  graph->evalOpParm(myPrenml, nodeidx, "prenml", time, graph->isDirect()?nullptr:depnode);
149  myUnit = false;
150  if (true && ( (true&&!(((getPrenml()==1)))) ) )
151  graph->evalOpParm(myUnit, nodeidx, "unit", time, graph->isDirect()?nullptr:depnode);
152  myUnique = false;
153  if (true)
154  graph->evalOpParm(myUnique, nodeidx, "unique", time, graph->isDirect()?nullptr:depnode);
155  myCons = 0;
156  if (true)
157  graph->evalOpParm(myCons, nodeidx, "cons", time, graph->isDirect()?nullptr:depnode);
158  myDist = 0.001;
159  if (true && ( (true&&!(((int64(getCons())==0)))) ) )
160  graph->evalOpParm(myDist, nodeidx, "dist", time, graph->isDirect()?nullptr:depnode);
161  myAccurate = true;
162  if (true && ( (true&&!(((int64(getCons())==0)))) ) )
163  graph->evalOpParm(myAccurate, nodeidx, "accurate", time, graph->isDirect()?nullptr:depnode);
164  myInline = false;
165  if (true)
166  graph->evalOpParm(myInline, nodeidx, "inline", time, graph->isDirect()?nullptr:depnode);
167  myInlinedist = 0.001;
168  if (true && ( (true&&!(((getInline()==0)))) ) )
169  graph->evalOpParm(myInlinedist, nodeidx, "inlinedist", time, graph->isDirect()?nullptr:depnode);
170  myOrientpolys = false;
171  if (true)
172  graph->evalOpParm(myOrientpolys, nodeidx, "orientPolys", time, graph->isDirect()?nullptr:depnode);
173  myCusp = false;
174  if (true)
175  graph->evalOpParm(myCusp, nodeidx, "cusp", time, graph->isDirect()?nullptr:depnode);
176  myAngle = 20;
177  if (true && ( (true&&!(((getCusp()==0)))) ) )
178  graph->evalOpParm(myAngle, nodeidx, "angle", time, graph->isDirect()?nullptr:depnode);
179  myRemove = false;
180  if (true)
181  graph->evalOpParm(myRemove, nodeidx, "remove", time, graph->isDirect()?nullptr:depnode);
182  myMkplanar = false;
183  if (true)
184  graph->evalOpParm(myMkplanar, nodeidx, "mkplanar", time, graph->isDirect()?nullptr:depnode);
185  myPostnml = false;
186  if (true)
187  graph->evalOpParm(myPostnml, nodeidx, "postnml", time, graph->isDirect()?nullptr:depnode);
188  myReversenml = false;
189  if (true)
190  graph->evalOpParm(myReversenml, nodeidx, "reversenml", time, graph->isDirect()?nullptr:depnode);
191 
192  }
193 
194 
195  void loadFromOpSubclass(const LoadParms &loadparms) override
196  {
197  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
198  }
199 
200 
201  void copyFrom(const OP_NodeParms *src) override
202  {
203  *this = *((const SOP_FacetParms *)src);
204  }
205 
206  template <typename T>
207  void
208  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
209  {
210  if (idx.size() < 1)
211  return;
212  UT_ASSERT(idx.size() == instance.size()+1);
213  if (idx.size() != instance.size()+1)
214  return;
215  switch (idx[0])
216  {
217  case 0:
218  coerceValue(value, myGroup);
219  break;
220  case 1:
221  coerceValue(value, myGroupType);
222  break;
223  case 2:
224  coerceValue(value, myPrenml);
225  break;
226  case 3:
227  coerceValue(value, myUnit);
228  break;
229  case 4:
230  coerceValue(value, myUnique);
231  break;
232  case 5:
233  coerceValue(value, myCons);
234  break;
235  case 6:
236  coerceValue(value, myDist);
237  break;
238  case 7:
239  coerceValue(value, myAccurate);
240  break;
241  case 8:
242  coerceValue(value, myInline);
243  break;
244  case 9:
245  coerceValue(value, myInlinedist);
246  break;
247  case 10:
248  coerceValue(value, myOrientpolys);
249  break;
250  case 11:
251  coerceValue(value, myCusp);
252  break;
253  case 12:
254  coerceValue(value, myAngle);
255  break;
256  case 13:
257  coerceValue(value, myRemove);
258  break;
259  case 14:
260  coerceValue(value, myMkplanar);
261  break;
262  case 15:
263  coerceValue(value, myPostnml);
264  break;
265  case 16:
266  coerceValue(value, myReversenml);
267  break;
268 
269  }
270  }
271 
272  bool isParmColorRamp(exint idx) const override
273  {
274  switch (idx)
275  {
276 
277  }
278  return false;
279  }
280 
281  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
282  { doGetParmValue(idx, instance, value); }
283  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
300  { doGetParmValue(idx, instance, value); }
301  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
302  { doGetParmValue(idx, instance, value); }
303 
304  template <typename T>
305  void
306  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
307  {
308  if (idx.size() < 1)
309  return;
310  UT_ASSERT(idx.size() == instance.size()+1);
311  if (idx.size() != instance.size()+1)
312  return;
313  switch (idx[0])
314  {
315  case 0:
316  coerceValue(myGroup, ( ( value ) ));
317  break;
318  case 1:
319  coerceValue(myGroupType, clampMinValue(0, clampMaxValue(2, value ) ));
320  break;
321  case 2:
322  coerceValue(myPrenml, ( ( value ) ));
323  break;
324  case 3:
325  coerceValue(myUnit, ( ( value ) ));
326  break;
327  case 4:
328  coerceValue(myUnique, ( ( value ) ));
329  break;
330  case 5:
331  coerceValue(myCons, clampMinValue(0, clampMaxValue(4, value ) ));
332  break;
333  case 6:
334  coerceValue(myDist, ( ( value ) ));
335  break;
336  case 7:
337  coerceValue(myAccurate, ( ( value ) ));
338  break;
339  case 8:
340  coerceValue(myInline, ( ( value ) ));
341  break;
342  case 9:
343  coerceValue(myInlinedist, ( ( value ) ));
344  break;
345  case 10:
346  coerceValue(myOrientpolys, ( ( value ) ));
347  break;
348  case 11:
349  coerceValue(myCusp, ( ( value ) ));
350  break;
351  case 12:
352  coerceValue(myAngle, ( ( value ) ));
353  break;
354  case 13:
355  coerceValue(myRemove, ( ( value ) ));
356  break;
357  case 14:
358  coerceValue(myMkplanar, ( ( value ) ));
359  break;
360  case 15:
361  coerceValue(myPostnml, ( ( value ) ));
362  break;
363  case 16:
364  coerceValue(myReversenml, ( ( value ) ));
365  break;
366 
367  }
368  }
369 
370  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
373  { doSetParmValue(idx, instance, value); }
374  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
375  { doSetParmValue(idx, instance, value); }
376  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
377  { doSetParmValue(idx, instance, value); }
378  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
379  { doSetParmValue(idx, instance, value); }
380  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
383  { doSetParmValue(idx, instance, value); }
384  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
385  { doSetParmValue(idx, instance, value); }
386  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
387  { doSetParmValue(idx, instance, value); }
388  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
389  { doSetParmValue(idx, instance, value); }
390  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
391  { doSetParmValue(idx, instance, value); }
392 
393  exint getNestNumParms(TempIndex idx) const override
394  {
395  if (idx.size() == 0)
396  return 17;
397  switch (idx[0])
398  {
399 
400  }
401  // Invalid
402  return 0;
403  }
404 
405  const char *getNestParmName(TempIndex fieldnum) const override
406  {
407  if (fieldnum.size() < 1)
408  return 0;
409  switch (fieldnum[0])
410  {
411  case 0:
412  return "group";
413  case 1:
414  return "grouptype";
415  case 2:
416  return "prenml";
417  case 3:
418  return "unit";
419  case 4:
420  return "unique";
421  case 5:
422  return "cons";
423  case 6:
424  return "dist";
425  case 7:
426  return "accurate";
427  case 8:
428  return "inline";
429  case 9:
430  return "inlinedist";
431  case 10:
432  return "orientPolys";
433  case 11:
434  return "cusp";
435  case 12:
436  return "angle";
437  case 13:
438  return "remove";
439  case 14:
440  return "mkplanar";
441  case 15:
442  return "postnml";
443  case 16:
444  return "reversenml";
445 
446  }
447  return 0;
448  }
449 
450  ParmType getNestParmType(TempIndex fieldnum) const override
451  {
452  if (fieldnum.size() < 1)
453  return PARM_UNSUPPORTED;
454  switch (fieldnum[0])
455  {
456  case 0:
457  return PARM_STRING;
458  case 1:
459  return PARM_INTEGER;
460  case 2:
461  return PARM_INTEGER;
462  case 3:
463  return PARM_INTEGER;
464  case 4:
465  return PARM_INTEGER;
466  case 5:
467  return PARM_INTEGER;
468  case 6:
469  return PARM_FLOAT;
470  case 7:
471  return PARM_INTEGER;
472  case 8:
473  return PARM_INTEGER;
474  case 9:
475  return PARM_FLOAT;
476  case 10:
477  return PARM_INTEGER;
478  case 11:
479  return PARM_INTEGER;
480  case 12:
481  return PARM_FLOAT;
482  case 13:
483  return PARM_INTEGER;
484  case 14:
485  return PARM_INTEGER;
486  case 15:
487  return PARM_INTEGER;
488  case 16:
489  return PARM_INTEGER;
490 
491  }
492  return PARM_UNSUPPORTED;
493  }
494 
495  // Boiler plate to load individual types.
496  static void loadData(UT_IStream &is, int64 &v)
497  { is.bread(&v, 1); }
498  static void loadData(UT_IStream &is, bool &v)
499  { int64 iv; is.bread(&iv, 1); v = iv; }
500  static void loadData(UT_IStream &is, fpreal64 &v)
501  { is.bread<fpreal64>(&v, 1); }
502  static void loadData(UT_IStream &is, UT_Vector2D &v)
503  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
504  static void loadData(UT_IStream &is, UT_Vector3D &v)
505  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
506  is.bread<fpreal64>(&v.z(), 1); }
507  static void loadData(UT_IStream &is, UT_Vector4D &v)
508  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
509  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
510  static void loadData(UT_IStream &is, UT_Matrix2D &v)
511  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
512  static void loadData(UT_IStream &is, UT_Matrix3D &v)
513  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
514  static void loadData(UT_IStream &is, UT_Matrix4D &v)
515  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
516  static void loadData(UT_IStream &is, UT_Vector2I &v)
517  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
518  static void loadData(UT_IStream &is, UT_Vector3I &v)
519  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
520  is.bread<int64>(&v.z(), 1); }
521  static void loadData(UT_IStream &is, UT_Vector4I &v)
522  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
523  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
525  { is.bread(v); }
527  { UT_StringHolder rampdata;
528  loadData(is, rampdata);
529  if (rampdata.isstring())
530  {
531  v.reset(new UT_Ramp());
532  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
533  v->load(istr);
534  }
535  else v.reset();
536  }
539  loadData(is, data);
540  if (data.isstring())
541  {
542  // Find the data type.
543  const char *colon = UT_StringWrap(data).findChar(':');
544  if (colon)
545  {
546  int typelen = colon - data.buffer();
548  type.strncpy(data.buffer(), typelen);
549  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
550 
551  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
552  }
553  }
554  else v.reset();
555  }
556 
557  static void saveData(std::ostream &os, int64 v)
558  { UTwrite(os, &v); }
559  static void saveData(std::ostream &os, bool v)
560  { int64 iv = v; UTwrite(os, &iv); }
561  static void saveData(std::ostream &os, fpreal64 v)
562  { UTwrite<fpreal64>(os, &v); }
563  static void saveData(std::ostream &os, UT_Vector2D v)
564  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
565  static void saveData(std::ostream &os, UT_Vector3D v)
566  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
567  UTwrite<fpreal64>(os, &v.z()); }
568  static void saveData(std::ostream &os, UT_Vector4D v)
569  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
570  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
571  static void saveData(std::ostream &os, UT_Matrix2D v)
573  static void saveData(std::ostream &os, UT_Matrix3D v)
575  static void saveData(std::ostream &os, UT_Matrix4D v)
577  static void saveData(std::ostream &os, UT_StringHolder s)
578  { UT_StringWrap(s).saveBinary(os); }
579  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
581  UT_OStringStream ostr;
582  if (s) s->save(ostr);
583  result = ostr.str();
584  saveData(os, result);
585  }
586  static void saveData(std::ostream &os, PRM_DataItemHandle s)
588  UT_OStringStream ostr;
589  if (s)
590  {
591  ostr << s->getDataTypeToken();
592  ostr << ":";
593  s->saveBinary(ostr);
594  }
595  result = ostr.str();
596  saveData(os, result);
597  }
598 
599 
600  void save(std::ostream &os) const
601  {
602  int32 v = version();
603  UTwrite(os, &v);
604  saveData(os, myGroup);
605  saveData(os, myGroupType);
606  saveData(os, myPrenml);
607  saveData(os, myUnit);
608  saveData(os, myUnique);
609  saveData(os, myCons);
610  saveData(os, myDist);
611  saveData(os, myAccurate);
612  saveData(os, myInline);
613  saveData(os, myInlinedist);
614  saveData(os, myOrientpolys);
615  saveData(os, myCusp);
616  saveData(os, myAngle);
617  saveData(os, myRemove);
618  saveData(os, myMkplanar);
619  saveData(os, myPostnml);
620  saveData(os, myReversenml);
621 
622  }
623 
624  bool load(UT_IStream &is)
625  {
626  int32 v;
627  is.bread(&v, 1);
628  if (version() != v)
629  {
630  // Fail incompatible versions
631  return false;
632  }
633  loadData(is, myGroup);
634  loadData(is, myGroupType);
635  loadData(is, myPrenml);
636  loadData(is, myUnit);
637  loadData(is, myUnique);
638  loadData(is, myCons);
639  loadData(is, myDist);
640  loadData(is, myAccurate);
641  loadData(is, myInline);
642  loadData(is, myInlinedist);
643  loadData(is, myOrientpolys);
644  loadData(is, myCusp);
645  loadData(is, myAngle);
646  loadData(is, myRemove);
647  loadData(is, myMkplanar);
648  loadData(is, myPostnml);
649  loadData(is, myReversenml);
650 
651  return true;
652  }
653 
654  const UT_StringHolder & getGroup() const { return myGroup; }
655  void setGroup(const UT_StringHolder & val) { myGroup = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getGroup();
661  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
662  return result;
663  }
664  GroupType getGroupType() const { return GroupType(myGroupType); }
665  void setGroupType(GroupType val) { myGroupType = int64(val); }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getGroupType();
670  int64 result;
671  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
672  return GroupType(result);
673  }
674  bool getPrenml() const { return myPrenml; }
675  void setPrenml(bool val) { myPrenml = val; }
676  bool opPrenml(const SOP_NodeVerb::CookParms &cookparms) const
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getPrenml();
680  bool result;
681  OP_Utils::evalOpParm(result, thissop, "prenml", cookparms.getCookTime(), 0);
682  return result;
683  }
684  bool getUnit() const { return myUnit; }
685  void setUnit(bool val) { myUnit = val; }
686  bool opUnit(const SOP_NodeVerb::CookParms &cookparms) const
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getUnit();
690  bool result;
691  OP_Utils::evalOpParm(result, thissop, "unit", cookparms.getCookTime(), 0);
692  return result;
693  }
694  bool getUnique() const { return myUnique; }
695  void setUnique(bool val) { myUnique = val; }
696  bool opUnique(const SOP_NodeVerb::CookParms &cookparms) const
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getUnique();
700  bool result;
701  OP_Utils::evalOpParm(result, thissop, "unique", cookparms.getCookTime(), 0);
702  return result;
703  }
704  Cons getCons() const { return Cons(myCons); }
705  void setCons(Cons val) { myCons = int64(val); }
706  Cons opCons(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getCons();
710  int64 result;
711  OP_Utils::evalOpParm(result, thissop, "cons", cookparms.getCookTime(), 0);
712  return Cons(result);
713  }
714  fpreal64 getDist() const { return myDist; }
715  void setDist(fpreal64 val) { myDist = val; }
716  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getDist();
721  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
722  return result;
723  }
724  bool getAccurate() const { return myAccurate; }
725  void setAccurate(bool val) { myAccurate = val; }
726  bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
727  {
728  SOP_Node *thissop = cookparms.getNode();
729  if (!thissop) return getAccurate();
730  bool result;
731  OP_Utils::evalOpParm(result, thissop, "accurate", cookparms.getCookTime(), 0);
732  return result;
733  }
734  bool getInline() const { return myInline; }
735  void setInline(bool val) { myInline = val; }
736  bool opInline(const SOP_NodeVerb::CookParms &cookparms) const
737  {
738  SOP_Node *thissop = cookparms.getNode();
739  if (!thissop) return getInline();
740  bool result;
741  OP_Utils::evalOpParm(result, thissop, "inline", cookparms.getCookTime(), 0);
742  return result;
743  }
744  fpreal64 getInlinedist() const { return myInlinedist; }
745  void setInlinedist(fpreal64 val) { myInlinedist = val; }
747  {
748  SOP_Node *thissop = cookparms.getNode();
749  if (!thissop) return getInlinedist();
751  OP_Utils::evalOpParm(result, thissop, "inlinedist", cookparms.getCookTime(), 0);
752  return result;
753  }
754  bool getOrientpolys() const { return myOrientpolys; }
755  void setOrientpolys(bool val) { myOrientpolys = val; }
756  bool opOrientpolys(const SOP_NodeVerb::CookParms &cookparms) const
757  {
758  SOP_Node *thissop = cookparms.getNode();
759  if (!thissop) return getOrientpolys();
760  bool result;
761  OP_Utils::evalOpParm(result, thissop, "orientPolys", cookparms.getCookTime(), 0);
762  return result;
763  }
764  bool getCusp() const { return myCusp; }
765  void setCusp(bool val) { myCusp = val; }
766  bool opCusp(const SOP_NodeVerb::CookParms &cookparms) const
767  {
768  SOP_Node *thissop = cookparms.getNode();
769  if (!thissop) return getCusp();
770  bool result;
771  OP_Utils::evalOpParm(result, thissop, "cusp", cookparms.getCookTime(), 0);
772  return result;
773  }
774  fpreal64 getAngle() const { return myAngle; }
775  void setAngle(fpreal64 val) { myAngle = val; }
776  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
777  {
778  SOP_Node *thissop = cookparms.getNode();
779  if (!thissop) return getAngle();
781  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
782  return result;
783  }
784  bool getRemove() const { return myRemove; }
785  void setRemove(bool val) { myRemove = val; }
786  bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
787  {
788  SOP_Node *thissop = cookparms.getNode();
789  if (!thissop) return getRemove();
790  bool result;
791  OP_Utils::evalOpParm(result, thissop, "remove", cookparms.getCookTime(), 0);
792  return result;
793  }
794  bool getMkplanar() const { return myMkplanar; }
795  void setMkplanar(bool val) { myMkplanar = val; }
796  bool opMkplanar(const SOP_NodeVerb::CookParms &cookparms) const
797  {
798  SOP_Node *thissop = cookparms.getNode();
799  if (!thissop) return getMkplanar();
800  bool result;
801  OP_Utils::evalOpParm(result, thissop, "mkplanar", cookparms.getCookTime(), 0);
802  return result;
803  }
804  bool getPostnml() const { return myPostnml; }
805  void setPostnml(bool val) { myPostnml = val; }
806  bool opPostnml(const SOP_NodeVerb::CookParms &cookparms) const
807  {
808  SOP_Node *thissop = cookparms.getNode();
809  if (!thissop) return getPostnml();
810  bool result;
811  OP_Utils::evalOpParm(result, thissop, "postnml", cookparms.getCookTime(), 0);
812  return result;
813  }
814  bool getReversenml() const { return myReversenml; }
815  void setReversenml(bool val) { myReversenml = val; }
816  bool opReversenml(const SOP_NodeVerb::CookParms &cookparms) const
817  {
818  SOP_Node *thissop = cookparms.getNode();
819  if (!thissop) return getReversenml();
820  bool result;
821  OP_Utils::evalOpParm(result, thissop, "reversenml", cookparms.getCookTime(), 0);
822  return result;
823  }
824 
825 private:
826  UT_StringHolder myGroup;
827  int64 myGroupType;
828  bool myPrenml;
829  bool myUnit;
830  bool myUnique;
831  int64 myCons;
832  fpreal64 myDist;
833  bool myAccurate;
834  bool myInline;
835  fpreal64 myInlinedist;
836  bool myOrientpolys;
837  bool myCusp;
838  fpreal64 myAngle;
839  bool myRemove;
840  bool myMkplanar;
841  bool myPostnml;
842  bool myReversenml;
843 
844 };
type
Definition: core.h:556
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:63
bool getMkplanar() const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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:372
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:1401
#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)
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
bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
bool getUnique() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setAccurate(bool val)
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)