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