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