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 <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_FacetEnums
22 {
23  enum class Cons
24  {
25  NONE = 0,
26  POINTS,
27  FPOINTS,
28  NORMALS,
29  FNORMALS
30  };
31 }
32 
33 
35 {
36 public:
37  static int version() { return 1; }
38 
40  {
41  myGroup = ""_sh;
42  myPrenml = false;
43  myUnit = false;
44  myUnique = false;
45  myCons = 0;
46  myDist = 0.001;
47  myAccurate = true;
48  myInline = false;
49  myInlinedist = 0.001;
50  myOrientpolys = false;
51  myCusp = false;
52  myAngle = 20;
53  myRemove = false;
54  myMkplanar = false;
55  myPostnml = false;
56  myReversenml = false;
57 
58  }
59 
60  explicit SOP_FacetParms(const SOP_FacetParms &) = default;
61 
62  virtual ~SOP_FacetParms() {}
63 
64  bool operator==(const SOP_FacetParms &src) const
65  {
66  if (myGroup != src.myGroup) return false;
67  if (myPrenml != src.myPrenml) return false;
68  if (myUnit != src.myUnit) return false;
69  if (myUnique != src.myUnique) return false;
70  if (myCons != src.myCons) return false;
71  if (myDist != src.myDist) return false;
72  if (myAccurate != src.myAccurate) return false;
73  if (myInline != src.myInline) return false;
74  if (myInlinedist != src.myInlinedist) return false;
75  if (myOrientpolys != src.myOrientpolys) return false;
76  if (myCusp != src.myCusp) return false;
77  if (myAngle != src.myAngle) return false;
78  if (myRemove != src.myRemove) return false;
79  if (myMkplanar != src.myMkplanar) return false;
80  if (myPostnml != src.myPostnml) return false;
81  if (myReversenml != src.myReversenml) return false;
82 
83  return true;
84  }
85  bool operator!=(const SOP_FacetParms &src) const
86  {
87  return !operator==(src);
88  }
90 
91 
92 
93  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
94  {
95  if (true)
96  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
97  else myGroup = ""_sh;
98  if (true)
99  OP_Utils::evalOpParm(myPrenml, node, "prenml", time, 0);
100  else myPrenml = false;
101  if (true && ( (!(((getPrenml()==1)))) ) )
102  OP_Utils::evalOpParm(myUnit, node, "unit", time, 0);
103  else myUnit = false;
104  if (true)
105  OP_Utils::evalOpParm(myUnique, node, "unique", time, 0);
106  else myUnique = false;
107  if (true)
108  OP_Utils::evalOpParm(myCons, node, "cons", time, 0);
109  else myCons = 0;
110  if (true && ( (!(((int64(getCons())==0)))) ) )
111  OP_Utils::evalOpParm(myDist, node, "dist", time, 0);
112  else myDist = 0.001;
113  if (true && ( (!(((int64(getCons())==0)))) ) )
114  OP_Utils::evalOpParm(myAccurate, node, "accurate", time, 0);
115  else myAccurate = true;
116  if (true)
117  OP_Utils::evalOpParm(myInline, node, "inline", time, 0);
118  else myInline = false;
119  if (true && ( (!(((getInline()==0)))) ) )
120  OP_Utils::evalOpParm(myInlinedist, node, "inlinedist", time, 0);
121  else myInlinedist = 0.001;
122  if (true)
123  OP_Utils::evalOpParm(myOrientpolys, node, "orientPolys", time, 0);
124  else myOrientpolys = false;
125  if (true)
126  OP_Utils::evalOpParm(myCusp, node, "cusp", time, 0);
127  else myCusp = false;
128  if (true && ( (!(((getCusp()==0)))) ) )
129  OP_Utils::evalOpParm(myAngle, node, "angle", time, 0);
130  else myAngle = 20;
131  if (true)
132  OP_Utils::evalOpParm(myRemove, node, "remove", time, 0);
133  else myRemove = false;
134  if (true)
135  OP_Utils::evalOpParm(myMkplanar, node, "mkplanar", time, 0);
136  else myMkplanar = false;
137  if (true)
138  OP_Utils::evalOpParm(myPostnml, node, "postnml", time, 0);
139  else myPostnml = false;
140  if (true)
141  OP_Utils::evalOpParm(myReversenml, node, "reversenml", time, 0);
142  else myReversenml = false;
143 
144  }
145 
146 
147  virtual void loadFromOpSubclass(const LoadParms &loadparms)
148  {
149  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
150  }
151 
152 
153  virtual void copyFrom(const SOP_NodeParms *src)
154  {
155  *this = *((const SOP_FacetParms *)src);
156  }
157 
158  template <typename T>
159  void
160  doGetParmValue(exint idx, T &value) const
161  {
162  switch (idx)
163  {
164  case 0:
165  coerceValue(value, myGroup);
166  break;
167  case 1:
168  coerceValue(value, myPrenml);
169  break;
170  case 2:
171  coerceValue(value, myUnit);
172  break;
173  case 3:
174  coerceValue(value, myUnique);
175  break;
176  case 4:
177  coerceValue(value, myCons);
178  break;
179  case 5:
180  coerceValue(value, myDist);
181  break;
182  case 6:
183  coerceValue(value, myAccurate);
184  break;
185  case 7:
186  coerceValue(value, myInline);
187  break;
188  case 8:
189  coerceValue(value, myInlinedist);
190  break;
191  case 9:
192  coerceValue(value, myOrientpolys);
193  break;
194  case 10:
195  coerceValue(value, myCusp);
196  break;
197  case 11:
198  coerceValue(value, myAngle);
199  break;
200  case 12:
201  coerceValue(value, myRemove);
202  break;
203  case 13:
204  coerceValue(value, myMkplanar);
205  break;
206  case 14:
207  coerceValue(value, myPostnml);
208  break;
209  case 15:
210  coerceValue(value, myReversenml);
211  break;
212 
213  }
214  }
215 
216  void getParmValue(exint idx, exint &value) const
217  { doGetParmValue(idx, value); }
218  void getParmValue(exint idx, fpreal &value) const
219  { doGetParmValue(idx, value); }
221  { doGetParmValue(idx, value); }
223  { doGetParmValue(idx, value); }
225  { doGetParmValue(idx, value); }
227  { doGetParmValue(idx, value); }
229  { doGetParmValue(idx, value); }
231  { doGetParmValue(idx, value); }
233  { doGetParmValue(idx, value); }
235  { doGetParmValue(idx, value); }
237  { doGetParmValue(idx, value); }
238 
239  template <typename T>
240  void
241  doSetParmValue(exint idx, const T &value)
242  {
243  switch (idx)
244  {
245  case 0:
246  coerceValue(myGroup, value);
247  break;
248  case 1:
249  coerceValue(myPrenml, value);
250  break;
251  case 2:
252  coerceValue(myUnit, value);
253  break;
254  case 3:
255  coerceValue(myUnique, value);
256  break;
257  case 4:
258  coerceValue(myCons, value);
259  break;
260  case 5:
261  coerceValue(myDist, value);
262  break;
263  case 6:
264  coerceValue(myAccurate, value);
265  break;
266  case 7:
267  coerceValue(myInline, value);
268  break;
269  case 8:
270  coerceValue(myInlinedist, value);
271  break;
272  case 9:
273  coerceValue(myOrientpolys, value);
274  break;
275  case 10:
276  coerceValue(myCusp, value);
277  break;
278  case 11:
279  coerceValue(myAngle, value);
280  break;
281  case 12:
282  coerceValue(myRemove, value);
283  break;
284  case 13:
285  coerceValue(myMkplanar, value);
286  break;
287  case 14:
288  coerceValue(myPostnml, value);
289  break;
290  case 15:
291  coerceValue(myReversenml, value);
292  break;
293 
294  }
295  }
296 
297  void setParmValue(exint idx, const exint &value)
298  { doSetParmValue(idx, value); }
299  void setParmValue(exint idx, const fpreal &value)
300  { doSetParmValue(idx, value); }
301  void setParmValue(exint idx, const UT_Vector2D &value)
302  { doSetParmValue(idx, value); }
303  void setParmValue(exint idx, const UT_Vector3D &value)
304  { doSetParmValue(idx, value); }
305  void setParmValue(exint idx, const UT_Vector4D &value)
306  { doSetParmValue(idx, value); }
307  void setParmValue(exint idx, const UT_Matrix2D &value)
308  { doSetParmValue(idx, value); }
309  void setParmValue(exint idx, const UT_Matrix3D &value)
310  { doSetParmValue(idx, value); }
311  void setParmValue(exint idx, const UT_Matrix4D &value)
312  { doSetParmValue(idx, value); }
314  { doSetParmValue(idx, value); }
316  { doSetParmValue(idx, value); }
318  { doSetParmValue(idx, value); }
319 
320  virtual exint getNumParms() const
321  {
322  return 16;
323  }
324 
325  virtual const char *getParmName(exint fieldnum) const
326  {
327  switch (fieldnum)
328  {
329  case 0:
330  return "group";
331  case 1:
332  return "prenml";
333  case 2:
334  return "unit";
335  case 3:
336  return "unique";
337  case 4:
338  return "cons";
339  case 5:
340  return "dist";
341  case 6:
342  return "accurate";
343  case 7:
344  return "inline";
345  case 8:
346  return "inlinedist";
347  case 9:
348  return "orientPolys";
349  case 10:
350  return "cusp";
351  case 11:
352  return "angle";
353  case 12:
354  return "remove";
355  case 13:
356  return "mkplanar";
357  case 14:
358  return "postnml";
359  case 15:
360  return "reversenml";
361 
362  }
363  return 0;
364  }
365 
366  virtual ParmType getParmType(exint fieldnum) const
367  {
368  switch (fieldnum)
369  {
370  case 0:
371  return PARM_STRING;
372  case 1:
373  return PARM_INTEGER;
374  case 2:
375  return PARM_INTEGER;
376  case 3:
377  return PARM_INTEGER;
378  case 4:
379  return PARM_INTEGER;
380  case 5:
381  return PARM_FLOAT;
382  case 6:
383  return PARM_INTEGER;
384  case 7:
385  return PARM_INTEGER;
386  case 8:
387  return PARM_FLOAT;
388  case 9:
389  return PARM_INTEGER;
390  case 10:
391  return PARM_INTEGER;
392  case 11:
393  return PARM_FLOAT;
394  case 12:
395  return PARM_INTEGER;
396  case 13:
397  return PARM_INTEGER;
398  case 14:
399  return PARM_INTEGER;
400  case 15:
401  return PARM_INTEGER;
402 
403  }
404  return PARM_UNSUPPORTED;
405  }
406 
407  // Boiler plate to load individual types.
408  static void loadData(UT_IStream &is, int64 &v)
409  { is.bread(&v, 1); }
410  static void loadData(UT_IStream &is, bool &v)
411  { int64 iv; is.bread(&iv, 1); v = iv; }
412  static void loadData(UT_IStream &is, fpreal64 &v)
413  { is.bread<fpreal64>(&v, 1); }
414  static void loadData(UT_IStream &is, UT_Vector2D &v)
415  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
416  static void loadData(UT_IStream &is, UT_Vector3D &v)
417  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
418  is.bread<fpreal64>(&v.z(), 1); }
419  static void loadData(UT_IStream &is, UT_Vector4D &v)
420  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
421  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
422  static void loadData(UT_IStream &is, UT_Matrix2D &v)
423  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
424  static void loadData(UT_IStream &is, UT_Matrix3D &v)
425  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
426  static void loadData(UT_IStream &is, UT_Matrix4D &v)
427  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
428  static void loadData(UT_IStream &is, UT_Vector2I &v)
429  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
430  static void loadData(UT_IStream &is, UT_Vector3I &v)
431  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
432  is.bread<int64>(&v.z(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector4I &v)
434  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
435  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
437  { is.bread(v); }
439  { UT_StringHolder rampdata;
440  loadData(is, rampdata);
441  if (rampdata.isstring())
442  {
443  v.reset(new UT_Ramp());
444  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
445  v->load(istr);
446  }
447  else v.reset();
448  }
451  loadData(is, data);
452  if (data.isstring())
453  {
454  // Find the data type.
455  char *colon = UT_StringWrap(data).findChar(':');
456  if (colon)
457  {
458  int typelen = colon - data.buffer();
460  type.strncpy(data.buffer(), typelen);
461  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
462 
463  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
464  }
465  }
466  else v.reset();
467  }
468 
469  static void saveData(std::ostream &os, int64 v)
470  { UTwrite(os, &v); }
471  static void saveData(std::ostream &os, bool v)
472  { int64 iv = v; UTwrite(os, &iv); }
473  static void saveData(std::ostream &os, fpreal64 v)
474  { UTwrite<fpreal64>(os, &v); }
475  static void saveData(std::ostream &os, UT_Vector2D v)
476  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
477  static void saveData(std::ostream &os, UT_Vector3D v)
478  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
479  UTwrite<fpreal64>(os, &v.z()); }
480  static void saveData(std::ostream &os, UT_Vector4D v)
481  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
482  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
483  static void saveData(std::ostream &os, UT_Matrix2D v)
485  static void saveData(std::ostream &os, UT_Matrix3D v)
487  static void saveData(std::ostream &os, UT_Matrix4D v)
489  static void saveData(std::ostream &os, UT_StringHolder s)
490  { UT_StringWrap(s).saveBinary(os); }
491  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
492  { UT_StringHolder result;
493  UT_OStringStream ostr;
494  if (s) s->save(ostr);
495  result = ostr.str();
496  saveData(os, result);
497  }
498  static void saveData(std::ostream &os, PRM_DataItemHandle s)
499  { UT_StringHolder result;
500  UT_OStringStream ostr;
501  if (s)
502  {
503  ostr << s->getDataTypeToken();
504  ostr << ":";
505  s->saveBinary(ostr);
506  }
507  result = ostr.str();
508  saveData(os, result);
509  }
510 
511 
512  void save(std::ostream &os) const
513  {
514  int32 v = version();
515  UTwrite(os, &v);
516  saveData(os, myGroup);
517  saveData(os, myPrenml);
518  saveData(os, myUnit);
519  saveData(os, myUnique);
520  saveData(os, myCons);
521  saveData(os, myDist);
522  saveData(os, myAccurate);
523  saveData(os, myInline);
524  saveData(os, myInlinedist);
525  saveData(os, myOrientpolys);
526  saveData(os, myCusp);
527  saveData(os, myAngle);
528  saveData(os, myRemove);
529  saveData(os, myMkplanar);
530  saveData(os, myPostnml);
531  saveData(os, myReversenml);
532 
533  }
534 
535  bool load(UT_IStream &is)
536  {
537  int32 v;
538  is.bread(&v, 1);
539  if (version() != v)
540  {
541  // Fail incompatible versions
542  return false;
543  }
544  loadData(is, myGroup);
545  loadData(is, myPrenml);
546  loadData(is, myUnit);
547  loadData(is, myUnique);
548  loadData(is, myCons);
549  loadData(is, myDist);
550  loadData(is, myAccurate);
551  loadData(is, myInline);
552  loadData(is, myInlinedist);
553  loadData(is, myOrientpolys);
554  loadData(is, myCusp);
555  loadData(is, myAngle);
556  loadData(is, myRemove);
557  loadData(is, myMkplanar);
558  loadData(is, myPostnml);
559  loadData(is, myReversenml);
560 
561  return true;
562  }
563 
564  const UT_StringHolder & getGroup() const { return myGroup; }
565  void setGroup(const UT_StringHolder & val) { myGroup = val; }
567  {
568  SOP_Node *thissop = cookparms.getNode();
569  if (!thissop) return getGroup();
570  UT_StringHolder result;
571  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
572  return result;
573  }
574  bool getPrenml() const { return myPrenml; }
575  void setPrenml(bool val) { myPrenml = val; }
576  bool opPrenml(const SOP_NodeVerb::CookParms &cookparms) const
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getPrenml();
580  bool result;
581  OP_Utils::evalOpParm(result, thissop, "prenml", cookparms.getCookTime(), 0);
582  return result;
583  }
584  bool getUnit() const { return myUnit; }
585  void setUnit(bool val) { myUnit = val; }
586  bool opUnit(const SOP_NodeVerb::CookParms &cookparms) const
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getUnit();
590  bool result;
591  OP_Utils::evalOpParm(result, thissop, "unit", cookparms.getCookTime(), 0);
592  return result;
593  }
594  bool getUnique() const { return myUnique; }
595  void setUnique(bool val) { myUnique = val; }
596  bool opUnique(const SOP_NodeVerb::CookParms &cookparms) const
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getUnique();
600  bool result;
601  OP_Utils::evalOpParm(result, thissop, "unique", cookparms.getCookTime(), 0);
602  return result;
603  }
604  Cons getCons() const { return Cons(myCons); }
605  void setCons(Cons val) { myCons = int64(val); }
606  Cons opCons(const SOP_NodeVerb::CookParms &cookparms) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getCons();
610  int64 result;
611  OP_Utils::evalOpParm(result, thissop, "cons", cookparms.getCookTime(), 0);
612  return Cons(result);
613  }
614  fpreal64 getDist() const { return myDist; }
615  void setDist(fpreal64 val) { myDist = val; }
616  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getDist();
620  fpreal64 result;
621  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
622  return result;
623  }
624  bool getAccurate() const { return myAccurate; }
625  void setAccurate(bool val) { myAccurate = val; }
626  bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getAccurate();
630  bool result;
631  OP_Utils::evalOpParm(result, thissop, "accurate", cookparms.getCookTime(), 0);
632  return result;
633  }
634  bool getInline() const { return myInline; }
635  void setInline(bool val) { myInline = val; }
636  bool opInline(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getInline();
640  bool result;
641  OP_Utils::evalOpParm(result, thissop, "inline", cookparms.getCookTime(), 0);
642  return result;
643  }
644  fpreal64 getInlinedist() const { return myInlinedist; }
645  void setInlinedist(fpreal64 val) { myInlinedist = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getInlinedist();
650  fpreal64 result;
651  OP_Utils::evalOpParm(result, thissop, "inlinedist", cookparms.getCookTime(), 0);
652  return result;
653  }
654  bool getOrientpolys() const { return myOrientpolys; }
655  void setOrientpolys(bool val) { myOrientpolys = val; }
656  bool opOrientpolys(const SOP_NodeVerb::CookParms &cookparms) const
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getOrientpolys();
660  bool result;
661  OP_Utils::evalOpParm(result, thissop, "orientPolys", cookparms.getCookTime(), 0);
662  return result;
663  }
664  bool getCusp() const { return myCusp; }
665  void setCusp(bool val) { myCusp = val; }
666  bool opCusp(const SOP_NodeVerb::CookParms &cookparms) const
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getCusp();
670  bool result;
671  OP_Utils::evalOpParm(result, thissop, "cusp", cookparms.getCookTime(), 0);
672  return result;
673  }
674  fpreal64 getAngle() const { return myAngle; }
675  void setAngle(fpreal64 val) { myAngle = val; }
676  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getAngle();
680  fpreal64 result;
681  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
682  return result;
683  }
684  bool getRemove() const { return myRemove; }
685  void setRemove(bool val) { myRemove = val; }
686  bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getRemove();
690  bool result;
691  OP_Utils::evalOpParm(result, thissop, "remove", cookparms.getCookTime(), 0);
692  return result;
693  }
694  bool getMkplanar() const { return myMkplanar; }
695  void setMkplanar(bool val) { myMkplanar = val; }
696  bool opMkplanar(const SOP_NodeVerb::CookParms &cookparms) const
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getMkplanar();
700  bool result;
701  OP_Utils::evalOpParm(result, thissop, "mkplanar", cookparms.getCookTime(), 0);
702  return result;
703  }
704  bool getPostnml() const { return myPostnml; }
705  void setPostnml(bool val) { myPostnml = val; }
706  bool opPostnml(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getPostnml();
710  bool result;
711  OP_Utils::evalOpParm(result, thissop, "postnml", cookparms.getCookTime(), 0);
712  return result;
713  }
714  bool getReversenml() const { return myReversenml; }
715  void setReversenml(bool val) { myReversenml = val; }
716  bool opReversenml(const SOP_NodeVerb::CookParms &cookparms) const
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getReversenml();
720  bool result;
721  OP_Utils::evalOpParm(result, thissop, "reversenml", cookparms.getCookTime(), 0);
722  return result;
723  }
724 
725 private:
726  UT_StringHolder myGroup;
727  bool myPrenml;
728  bool myUnit;
729  bool myUnique;
730  int64 myCons;
731  fpreal64 myDist;
732  bool myAccurate;
733  bool myInline;
734  fpreal64 myInlinedist;
735  bool myOrientpolys;
736  bool myCusp;
737  fpreal64 myAngle;
738  bool myRemove;
739  bool myMkplanar;
740  bool myPostnml;
741  bool myReversenml;
742 
743 };
void save(std::ostream &os) const
void setParmValue(exint idx, const exint &value)
bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void getParmValue(exint idx, UT_Matrix4D &value) const
void setRemove(bool val)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
void doSetParmValue(exint idx, const T &value)
T & z(void)
Definition: UT_Vector4.h:379
bool opReversenml(const SOP_NodeVerb::CookParms &cookparms) const
bool getCusp() const
bool getRemove() const
void setParmValue(exint idx, const UT_StringHolder &value)
static void saveData(std::ostream &os, int64 v)
void setInline(bool val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void setParmValue(exint idx, const UT_Vector4D &value)
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
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)
void getParmValue(exint idx, UT_Vector3D &value) const
bool opUnique(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool load(UT_IStream &is)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
void setUnit(bool val)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setCusp(bool val)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
virtual const char * getParmName(exint fieldnum) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool getReversenml() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual void copyFrom(const SOP_NodeParms *src)
bool opUnit(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const SOP_FacetParms &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
void setParmValue(exint idx, const fpreal &value)
void getParmValue(exint idx, UT_StringHolder &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool getUnit() const
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
static void saveData(std::ostream &os, UT_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
void getParmValue(exint idx, UT_Vector2D &value) const
int64 exint
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Matrix4D &v)
virtual ~SOP_FacetParms()
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
bool opMkplanar(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setOrientpolys(bool val)
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)
bool opPostnml(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
void getParmValue(exint idx, UT_Vector4D &value) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
virtual ParmType getParmType(exint fieldnum) const
static void saveData(std::ostream &os, fpreal64 v)
void getParmValue(exint idx, exint &value) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
GLboolean * data
Definition: glcorearb.h:130
static int version()
Cons getCons() const
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:35
void setDist(fpreal64 val)
T & y(void)
Definition: UT_Vector4.h:377
void setParmValue(exint idx, const UT_Matrix4D &value)
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)
void setParmValue(exint idx, const UT_Matrix3D &value)
void getParmValue(exint idx, UT_Matrix2D &value) const
void getParmValue(exint idx, PRM_DataItemHandle &value) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
virtual exint getNumParms() const
void setPostnml(bool val)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
fpreal64 getInlinedist() const
double fpreal
Definition: SYS_Types.h:270
bool getInline() const
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
bool opInline(const SOP_NodeVerb::CookParms &cookparms) const
bool getPostnml() const
void setParmValue(exint idx, const UT_Matrix2D &value)
fpreal64 getAngle() const
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)
bool getOrientpolys() const
fpreal64 getDist() const
GLuint GLfloat * val
Definition: glcorearb.h:1607
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
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
T & y(void)
Definition: UT_Vector2.h:287
bool opCusp(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setCons(Cons val)
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getGroup() const
void setUnique(bool val)
GLboolean r
Definition: glcorearb.h:1221
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void setReversenml(bool val)
void setParmValue(exint idx, const UT_Vector3D &value)
void getParmValue(exint idx, UT_Matrix3D &value) const
T & w(void)
Definition: UT_Vector4.h:381
bool operator!=(const SOP_FacetParms &src) const
bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
bool getUnique() const
void getParmValue(exint idx, fpreal &value) const
void setAccurate(bool val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
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)
void doGetParmValue(exint idx, T &value) const
GLenum src
Definition: glcorearb.h:1792
static void loadData(UT_IStream &is, UT_StringHolder &v)