HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Fuse.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_FuseEnums
22 {
23  enum class Grouppropagation
24  {
25  LEASTPOINTNUMBER = 0,
26  UNION,
27  INTERSECT
28  };
29  enum class Snaptype
30  {
31  AVERAGE = 0,
32  LOWEST,
33  HIGHEST
34  };
35  enum class Gridtype
36  {
37  SPACING = 0,
38  LINES,
39  POW2
40  };
41  enum class Gridround
42  {
43  NEAREST = 0,
44  DOWN,
45  UP
46  };
47 }
48 
49 
51 {
52 public:
53  static int version() { return 1; }
54 
56  {
57  myGroup = ""_sh;
58  myUsedist = false;
59  myDist = 0.001;
60  myDeldegen = false;
61  myKeepunusedpoints = false;
62  myKeepconsolidatedpoints = false;
63  myGrouppropagation = 0;
64  mySwitcher = 0;
65  mySnaptype = 0;
66  myTol3d = 0.001;
67  mySnappointpos = false;
68  mySnappointattribs = false;
69  myPointattribnames = ""_sh;
70  mySnapswitcher = 0;
71  myGridtype = 0;
72  myGridspacing = UT_Vector3D(0.1,0.1,0.1);
73  myGridlines = UT_Vector3D(10,10,10);
74  myGridpow2 = UT_Vector3I(3,3,3);
75  myGridoffset = UT_Vector3D(0,0,0);
76  myGridround = 0;
77  myGridtol = 10;
78  myUpdatenml = false;
79  myAccurate = false;
80 
81  }
82 
83  explicit SOP_FuseParms(const SOP_FuseParms &) = default;
84 
85  virtual ~SOP_FuseParms() {}
86 
87  bool operator==(const SOP_FuseParms &src) const
88  {
89  if (myGroup != src.myGroup) return false;
90  if (myUsedist != src.myUsedist) return false;
91  if (myDist != src.myDist) return false;
92  if (myDeldegen != src.myDeldegen) return false;
93  if (myKeepunusedpoints != src.myKeepunusedpoints) return false;
94  if (myKeepconsolidatedpoints != src.myKeepconsolidatedpoints) return false;
95  if (myGrouppropagation != src.myGrouppropagation) return false;
96  if (mySwitcher != src.mySwitcher) return false;
97  if (mySnaptype != src.mySnaptype) return false;
98  if (myTol3d != src.myTol3d) return false;
99  if (mySnappointpos != src.mySnappointpos) return false;
100  if (mySnappointattribs != src.mySnappointattribs) return false;
101  if (myPointattribnames != src.myPointattribnames) return false;
102  if (mySnapswitcher != src.mySnapswitcher) return false;
103  if (myGridtype != src.myGridtype) return false;
104  if (myGridspacing != src.myGridspacing) return false;
105  if (myGridlines != src.myGridlines) return false;
106  if (myGridpow2 != src.myGridpow2) return false;
107  if (myGridoffset != src.myGridoffset) return false;
108  if (myGridround != src.myGridround) return false;
109  if (myGridtol != src.myGridtol) return false;
110  if (myUpdatenml != src.myUpdatenml) return false;
111  if (myAccurate != src.myAccurate) return false;
112 
113  return true;
114  }
115  bool operator!=(const SOP_FuseParms &src) const
116  {
117  return !operator==(src);
118  }
123 
124 
125 
126  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
127  {
128  if (true)
129  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
130  else myGroup = ""_sh;
131  if (true)
132  OP_Utils::evalOpParm(myUsedist, node, "usedist", time, 0);
133  else myUsedist = false;
134  if (true && ( (!(((getUsedist()==0)))) ) )
135  OP_Utils::evalOpParm(myDist, node, "dist", time, 0);
136  else myDist = 0.001;
137  if (true)
138  OP_Utils::evalOpParm(myDeldegen, node, "deldegen", time, 0);
139  else myDeldegen = false;
140  if (true)
141  OP_Utils::evalOpParm(myKeepunusedpoints, node, "keepunusedpoints", time, 0);
142  else myKeepunusedpoints = false;
143  if (true)
144  OP_Utils::evalOpParm(myKeepconsolidatedpoints, node, "keepconsolidatedpoints", time, 0);
145  else myKeepconsolidatedpoints = false;
146  if (true)
147  OP_Utils::evalOpParm(myGrouppropagation, node, "grouppropagation", time, 0);
148  else myGrouppropagation = 0;
149  if (true)
150  OP_Utils::evalOpParm(mySwitcher, node, "switcher", time, 0);
151  else mySwitcher = 0;
152  if (true)
153  OP_Utils::evalOpParm(mySnaptype, node, "snaptype", time, 0);
154  else mySnaptype = 0;
155  if (true)
156  OP_Utils::evalOpParm(myTol3d, node, "tol3d", time, 0);
157  else myTol3d = 0.001;
158  if (true)
159  OP_Utils::evalOpParm(mySnappointpos, node, "snappointpos", time, 0);
160  else mySnappointpos = false;
161  if (true)
162  OP_Utils::evalOpParm(mySnappointattribs, node, "snappointattribs", time, 0);
163  else mySnappointattribs = false;
164  if (true && ( (!(((getSnappointattribs()==0)))) ) )
165  OP_Utils::evalOpParm(myPointattribnames, node, "pointattribnames", time, 0);
166  else myPointattribnames = ""_sh;
167  if (true)
168  OP_Utils::evalOpParm(mySnapswitcher, node, "snapswitcher", time, 0);
169  else mySnapswitcher = 0;
170  if (true)
171  OP_Utils::evalOpParm(myGridtype, node, "gridtype", time, 0);
172  else myGridtype = 0;
173  if (true && ( (!(((int64(getGridtype())!=0)))) ) )
174  OP_Utils::evalOpParm(myGridspacing, node, "gridspacing", time, 0);
175  else myGridspacing = UT_Vector3D(0.1,0.1,0.1);
176  if (true && ( (!(((int64(getGridtype())!=1)))) ) )
177  OP_Utils::evalOpParm(myGridlines, node, "gridlines", time, 0);
178  else myGridlines = UT_Vector3D(10,10,10);
179  if (true && ( (!(((int64(getGridtype())!=2)))) ) )
180  OP_Utils::evalOpParm(myGridpow2, node, "gridpow2", time, 0);
181  else myGridpow2 = UT_Vector3I(3,3,3);
182  if (true)
183  OP_Utils::evalOpParm(myGridoffset, node, "gridoffset", time, 0);
184  else myGridoffset = UT_Vector3D(0,0,0);
185  if (true)
186  OP_Utils::evalOpParm(myGridround, node, "gridround", time, 0);
187  else myGridround = 0;
188  if (true)
189  OP_Utils::evalOpParm(myGridtol, node, "gridtol", time, 0);
190  else myGridtol = 10;
191  if (true)
192  OP_Utils::evalOpParm(myUpdatenml, node, "updatenml", time, 0);
193  else myUpdatenml = false;
194  if (true && ( (!(((int64(getSwitcher())==1))||((int64(getSwitcher())==2)&&(int64(getSnapswitcher())!=0)))) ) )
195  OP_Utils::evalOpParm(myAccurate, node, "accurate", time, 0);
196  else myAccurate = false;
197 
198  }
199 
200 
201  virtual void loadFromOpSubclass(const LoadParms &loadparms)
202  {
203  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
204  }
205 
206 
207  virtual void copyFrom(const SOP_NodeParms *src)
208  {
209  *this = *((const SOP_FuseParms *)src);
210  }
211 
212  template <typename T>
213  void
214  doGetParmValue(exint idx, T &value) const
215  {
216  switch (idx)
217  {
218  case 0:
219  coerceValue(value, myGroup);
220  break;
221  case 1:
222  coerceValue(value, myUsedist);
223  break;
224  case 2:
225  coerceValue(value, myDist);
226  break;
227  case 3:
228  coerceValue(value, myDeldegen);
229  break;
230  case 4:
231  coerceValue(value, myKeepunusedpoints);
232  break;
233  case 5:
234  coerceValue(value, myKeepconsolidatedpoints);
235  break;
236  case 6:
237  coerceValue(value, myGrouppropagation);
238  break;
239  case 7:
240  coerceValue(value, mySwitcher);
241  break;
242  case 8:
243  coerceValue(value, mySnaptype);
244  break;
245  case 9:
246  coerceValue(value, myTol3d);
247  break;
248  case 10:
249  coerceValue(value, mySnappointpos);
250  break;
251  case 11:
252  coerceValue(value, mySnappointattribs);
253  break;
254  case 12:
255  coerceValue(value, myPointattribnames);
256  break;
257  case 13:
258  coerceValue(value, mySnapswitcher);
259  break;
260  case 14:
261  coerceValue(value, myGridtype);
262  break;
263  case 15:
264  coerceValue(value, myGridspacing);
265  break;
266  case 16:
267  coerceValue(value, myGridlines);
268  break;
269  case 17:
270  coerceValue(value, myGridpow2);
271  break;
272  case 18:
273  coerceValue(value, myGridoffset);
274  break;
275  case 19:
276  coerceValue(value, myGridround);
277  break;
278  case 20:
279  coerceValue(value, myGridtol);
280  break;
281  case 21:
282  coerceValue(value, myUpdatenml);
283  break;
284  case 22:
285  coerceValue(value, myAccurate);
286  break;
287 
288  }
289  }
290 
291  void getParmValue(exint idx, exint &value) const
292  { doGetParmValue(idx, value); }
293  void getParmValue(exint idx, fpreal &value) const
294  { doGetParmValue(idx, value); }
296  { doGetParmValue(idx, value); }
298  { doGetParmValue(idx, value); }
300  { doGetParmValue(idx, value); }
302  { doGetParmValue(idx, value); }
304  { doGetParmValue(idx, value); }
306  { doGetParmValue(idx, value); }
308  { doGetParmValue(idx, value); }
310  { doGetParmValue(idx, value); }
312  { doGetParmValue(idx, value); }
313 
314  template <typename T>
315  void
316  doSetParmValue(exint idx, const T &value)
317  {
318  switch (idx)
319  {
320  case 0:
321  coerceValue(myGroup, value);
322  break;
323  case 1:
324  coerceValue(myUsedist, value);
325  break;
326  case 2:
327  coerceValue(myDist, value);
328  break;
329  case 3:
330  coerceValue(myDeldegen, value);
331  break;
332  case 4:
333  coerceValue(myKeepunusedpoints, value);
334  break;
335  case 5:
336  coerceValue(myKeepconsolidatedpoints, value);
337  break;
338  case 6:
339  coerceValue(myGrouppropagation, value);
340  break;
341  case 7:
342  coerceValue(mySwitcher, value);
343  break;
344  case 8:
345  coerceValue(mySnaptype, value);
346  break;
347  case 9:
348  coerceValue(myTol3d, value);
349  break;
350  case 10:
351  coerceValue(mySnappointpos, value);
352  break;
353  case 11:
354  coerceValue(mySnappointattribs, value);
355  break;
356  case 12:
357  coerceValue(myPointattribnames, value);
358  break;
359  case 13:
360  coerceValue(mySnapswitcher, value);
361  break;
362  case 14:
363  coerceValue(myGridtype, value);
364  break;
365  case 15:
366  coerceValue(myGridspacing, value);
367  break;
368  case 16:
369  coerceValue(myGridlines, value);
370  break;
371  case 17:
372  coerceValue(myGridpow2, value);
373  break;
374  case 18:
375  coerceValue(myGridoffset, value);
376  break;
377  case 19:
378  coerceValue(myGridround, value);
379  break;
380  case 20:
381  coerceValue(myGridtol, value);
382  break;
383  case 21:
384  coerceValue(myUpdatenml, value);
385  break;
386  case 22:
387  coerceValue(myAccurate, value);
388  break;
389 
390  }
391  }
392 
393  void setParmValue(exint idx, const exint &value)
394  { doSetParmValue(idx, value); }
395  void setParmValue(exint idx, const fpreal &value)
396  { doSetParmValue(idx, value); }
397  void setParmValue(exint idx, const UT_Vector2D &value)
398  { doSetParmValue(idx, value); }
399  void setParmValue(exint idx, const UT_Vector3D &value)
400  { doSetParmValue(idx, value); }
401  void setParmValue(exint idx, const UT_Vector4D &value)
402  { doSetParmValue(idx, value); }
403  void setParmValue(exint idx, const UT_Matrix2D &value)
404  { doSetParmValue(idx, value); }
405  void setParmValue(exint idx, const UT_Matrix3D &value)
406  { doSetParmValue(idx, value); }
407  void setParmValue(exint idx, const UT_Matrix4D &value)
408  { doSetParmValue(idx, value); }
410  { doSetParmValue(idx, value); }
412  { doSetParmValue(idx, value); }
414  { doSetParmValue(idx, value); }
415 
416  virtual exint getNumParms() const
417  {
418  return 23;
419  }
420 
421  virtual const char *getParmName(exint fieldnum) const
422  {
423  switch (fieldnum)
424  {
425  case 0:
426  return "group";
427  case 1:
428  return "usedist";
429  case 2:
430  return "dist";
431  case 3:
432  return "deldegen";
433  case 4:
434  return "keepunusedpoints";
435  case 5:
436  return "keepconsolidatedpoints";
437  case 6:
438  return "grouppropagation";
439  case 7:
440  return "switcher";
441  case 8:
442  return "snaptype";
443  case 9:
444  return "tol3d";
445  case 10:
446  return "snappointpos";
447  case 11:
448  return "snappointattribs";
449  case 12:
450  return "pointattribnames";
451  case 13:
452  return "snapswitcher";
453  case 14:
454  return "gridtype";
455  case 15:
456  return "gridspacing";
457  case 16:
458  return "gridlines";
459  case 17:
460  return "gridpow2";
461  case 18:
462  return "gridoffset";
463  case 19:
464  return "gridround";
465  case 20:
466  return "gridtol";
467  case 21:
468  return "updatenml";
469  case 22:
470  return "accurate";
471 
472  }
473  return 0;
474  }
475 
476  virtual ParmType getParmType(exint fieldnum) const
477  {
478  switch (fieldnum)
479  {
480  case 0:
481  return PARM_STRING;
482  case 1:
483  return PARM_INTEGER;
484  case 2:
485  return PARM_FLOAT;
486  case 3:
487  return PARM_INTEGER;
488  case 4:
489  return PARM_INTEGER;
490  case 5:
491  return PARM_INTEGER;
492  case 6:
493  return PARM_INTEGER;
494  case 7:
495  return PARM_INTEGER;
496  case 8:
497  return PARM_INTEGER;
498  case 9:
499  return PARM_FLOAT;
500  case 10:
501  return PARM_INTEGER;
502  case 11:
503  return PARM_INTEGER;
504  case 12:
505  return PARM_STRING;
506  case 13:
507  return PARM_INTEGER;
508  case 14:
509  return PARM_INTEGER;
510  case 15:
511  return PARM_VECTOR3;
512  case 16:
513  return PARM_VECTOR3;
514  case 17:
515  return PARM_VECTOR3;
516  case 18:
517  return PARM_VECTOR3;
518  case 19:
519  return PARM_INTEGER;
520  case 20:
521  return PARM_FLOAT;
522  case 21:
523  return PARM_INTEGER;
524  case 22:
525  return PARM_INTEGER;
526 
527  }
528  return PARM_UNSUPPORTED;
529  }
530 
531  // Boiler plate to load individual types.
532  static void loadData(UT_IStream &is, int64 &v)
533  { is.bread(&v, 1); }
534  static void loadData(UT_IStream &is, bool &v)
535  { int64 iv; is.bread(&iv, 1); v = iv; }
536  static void loadData(UT_IStream &is, fpreal64 &v)
537  { is.bread<fpreal64>(&v, 1); }
538  static void loadData(UT_IStream &is, UT_Vector2D &v)
539  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
540  static void loadData(UT_IStream &is, UT_Vector3D &v)
541  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
542  is.bread<fpreal64>(&v.z(), 1); }
543  static void loadData(UT_IStream &is, UT_Vector4D &v)
544  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
545  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
546  static void loadData(UT_IStream &is, UT_Matrix2D &v)
547  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
548  static void loadData(UT_IStream &is, UT_Matrix3D &v)
549  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
550  static void loadData(UT_IStream &is, UT_Matrix4D &v)
551  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
552  static void loadData(UT_IStream &is, UT_Vector2I &v)
553  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
554  static void loadData(UT_IStream &is, UT_Vector3I &v)
555  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
556  is.bread<int64>(&v.z(), 1); }
557  static void loadData(UT_IStream &is, UT_Vector4I &v)
558  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
559  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
561  { is.bread(v); }
563  { UT_StringHolder rampdata;
564  loadData(is, rampdata);
565  if (rampdata.isstring())
566  {
567  v.reset(new UT_Ramp());
568  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
569  v->load(istr);
570  }
571  else v.reset();
572  }
575  loadData(is, data);
576  if (data.isstring())
577  {
578  // Find the data type.
579  char *colon = UT_StringWrap(data).findChar(':');
580  if (colon)
581  {
582  int typelen = colon - data.buffer();
584  type.strncpy(data.buffer(), typelen);
585  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
586 
587  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
588  }
589  }
590  else v.reset();
591  }
592 
593  static void saveData(std::ostream &os, int64 v)
594  { UTwrite(os, &v); }
595  static void saveData(std::ostream &os, bool v)
596  { int64 iv = v; UTwrite(os, &iv); }
597  static void saveData(std::ostream &os, fpreal64 v)
598  { UTwrite<fpreal64>(os, &v); }
599  static void saveData(std::ostream &os, UT_Vector2D v)
600  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
601  static void saveData(std::ostream &os, UT_Vector3D v)
602  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
603  UTwrite<fpreal64>(os, &v.z()); }
604  static void saveData(std::ostream &os, UT_Vector4D v)
605  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
606  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
607  static void saveData(std::ostream &os, UT_Matrix2D v)
609  static void saveData(std::ostream &os, UT_Matrix3D v)
611  static void saveData(std::ostream &os, UT_Matrix4D v)
613  static void saveData(std::ostream &os, UT_StringHolder s)
614  { UT_StringWrap(s).saveBinary(os); }
615  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
616  { UT_StringHolder result;
617  UT_OStringStream ostr;
618  if (s) s->save(ostr);
619  result = ostr.str();
620  saveData(os, result);
621  }
622  static void saveData(std::ostream &os, PRM_DataItemHandle s)
623  { UT_StringHolder result;
624  UT_OStringStream ostr;
625  if (s)
626  {
627  ostr << s->getDataTypeToken();
628  ostr << ":";
629  s->saveBinary(ostr);
630  }
631  result = ostr.str();
632  saveData(os, result);
633  }
634 
635 
636  void save(std::ostream &os) const
637  {
638  int32 v = version();
639  UTwrite(os, &v);
640  saveData(os, myGroup);
641  saveData(os, myUsedist);
642  saveData(os, myDist);
643  saveData(os, myDeldegen);
644  saveData(os, myKeepunusedpoints);
645  saveData(os, myKeepconsolidatedpoints);
646  saveData(os, myGrouppropagation);
647  saveData(os, mySwitcher);
648  saveData(os, mySnaptype);
649  saveData(os, myTol3d);
650  saveData(os, mySnappointpos);
651  saveData(os, mySnappointattribs);
652  saveData(os, myPointattribnames);
653  saveData(os, mySnapswitcher);
654  saveData(os, myGridtype);
655  saveData(os, myGridspacing);
656  saveData(os, myGridlines);
657  saveData(os, myGridpow2);
658  saveData(os, myGridoffset);
659  saveData(os, myGridround);
660  saveData(os, myGridtol);
661  saveData(os, myUpdatenml);
662  saveData(os, myAccurate);
663 
664  }
665 
666  bool load(UT_IStream &is)
667  {
668  int32 v;
669  is.bread(&v, 1);
670  if (version() != v)
671  {
672  // Fail incompatible versions
673  return false;
674  }
675  loadData(is, myGroup);
676  loadData(is, myUsedist);
677  loadData(is, myDist);
678  loadData(is, myDeldegen);
679  loadData(is, myKeepunusedpoints);
680  loadData(is, myKeepconsolidatedpoints);
681  loadData(is, myGrouppropagation);
682  loadData(is, mySwitcher);
683  loadData(is, mySnaptype);
684  loadData(is, myTol3d);
685  loadData(is, mySnappointpos);
686  loadData(is, mySnappointattribs);
687  loadData(is, myPointattribnames);
688  loadData(is, mySnapswitcher);
689  loadData(is, myGridtype);
690  loadData(is, myGridspacing);
691  loadData(is, myGridlines);
692  loadData(is, myGridpow2);
693  loadData(is, myGridoffset);
694  loadData(is, myGridround);
695  loadData(is, myGridtol);
696  loadData(is, myUpdatenml);
697  loadData(is, myAccurate);
698 
699  return true;
700  }
701 
702  const UT_StringHolder & getGroup() const { return myGroup; }
703  void setGroup(const UT_StringHolder & val) { myGroup = val; }
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getGroup();
708  UT_StringHolder result;
709  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
710  return result;
711  }
712  bool getUsedist() const { return myUsedist; }
713  void setUsedist(bool val) { myUsedist = val; }
714  bool opUsedist(const SOP_NodeVerb::CookParms &cookparms) const
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getUsedist();
718  bool result;
719  OP_Utils::evalOpParm(result, thissop, "usedist", cookparms.getCookTime(), 0);
720  return result;
721  }
722  fpreal64 getDist() const { return myDist; }
723  void setDist(fpreal64 val) { myDist = val; }
724  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getDist();
728  fpreal64 result;
729  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
730  return result;
731  }
732  bool getDeldegen() const { return myDeldegen; }
733  void setDeldegen(bool val) { myDeldegen = val; }
734  bool opDeldegen(const SOP_NodeVerb::CookParms &cookparms) const
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getDeldegen();
738  bool result;
739  OP_Utils::evalOpParm(result, thissop, "deldegen", cookparms.getCookTime(), 0);
740  return result;
741  }
742  bool getKeepunusedpoints() const { return myKeepunusedpoints; }
743  void setKeepunusedpoints(bool val) { myKeepunusedpoints = val; }
744  bool opKeepunusedpoints(const SOP_NodeVerb::CookParms &cookparms) const
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getKeepunusedpoints();
748  bool result;
749  OP_Utils::evalOpParm(result, thissop, "keepunusedpoints", cookparms.getCookTime(), 0);
750  return result;
751  }
752  bool getKeepconsolidatedpoints() const { return myKeepconsolidatedpoints; }
753  void setKeepconsolidatedpoints(bool val) { myKeepconsolidatedpoints = val; }
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getKeepconsolidatedpoints();
758  bool result;
759  OP_Utils::evalOpParm(result, thissop, "keepconsolidatedpoints", cookparms.getCookTime(), 0);
760  return result;
761  }
762  Grouppropagation getGrouppropagation() const { return Grouppropagation(myGrouppropagation); }
763  void setGrouppropagation(Grouppropagation val) { myGrouppropagation = int64(val); }
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getGrouppropagation();
768  int64 result;
769  OP_Utils::evalOpParm(result, thissop, "grouppropagation", cookparms.getCookTime(), 0);
770  return Grouppropagation(result);
771  }
772  int64 getSwitcher() const { return mySwitcher; }
773  void setSwitcher(int64 val) { mySwitcher = val; }
774  int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getSwitcher();
778  int64 result;
779  OP_Utils::evalOpParm(result, thissop, "switcher", cookparms.getCookTime(), 0);
780  return result;
781  }
782  Snaptype getSnaptype() const { return Snaptype(mySnaptype); }
783  void setSnaptype(Snaptype val) { mySnaptype = int64(val); }
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getSnaptype();
788  int64 result;
789  OP_Utils::evalOpParm(result, thissop, "snaptype", cookparms.getCookTime(), 0);
790  return Snaptype(result);
791  }
792  fpreal64 getTol3d() const { return myTol3d; }
793  void setTol3d(fpreal64 val) { myTol3d = val; }
794  fpreal64 opTol3d(const SOP_NodeVerb::CookParms &cookparms) const
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getTol3d();
798  fpreal64 result;
799  OP_Utils::evalOpParm(result, thissop, "tol3d", cookparms.getCookTime(), 0);
800  return result;
801  }
802  bool getSnappointpos() const { return mySnappointpos; }
803  void setSnappointpos(bool val) { mySnappointpos = val; }
804  bool opSnappointpos(const SOP_NodeVerb::CookParms &cookparms) const
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getSnappointpos();
808  bool result;
809  OP_Utils::evalOpParm(result, thissop, "snappointpos", cookparms.getCookTime(), 0);
810  return result;
811  }
812  bool getSnappointattribs() const { return mySnappointattribs; }
813  void setSnappointattribs(bool val) { mySnappointattribs = val; }
814  bool opSnappointattribs(const SOP_NodeVerb::CookParms &cookparms) const
815  {
816  SOP_Node *thissop = cookparms.getNode();
817  if (!thissop) return getSnappointattribs();
818  bool result;
819  OP_Utils::evalOpParm(result, thissop, "snappointattribs", cookparms.getCookTime(), 0);
820  return result;
821  }
822  const UT_StringHolder & getPointattribnames() const { return myPointattribnames; }
823  void setPointattribnames(const UT_StringHolder & val) { myPointattribnames = val; }
825  {
826  SOP_Node *thissop = cookparms.getNode();
827  if (!thissop) return getPointattribnames();
828  UT_StringHolder result;
829  OP_Utils::evalOpParm(result, thissop, "pointattribnames", cookparms.getCookTime(), 0);
830  return result;
831  }
832  int64 getSnapswitcher() const { return mySnapswitcher; }
833  void setSnapswitcher(int64 val) { mySnapswitcher = val; }
835  {
836  SOP_Node *thissop = cookparms.getNode();
837  if (!thissop) return getSnapswitcher();
838  int64 result;
839  OP_Utils::evalOpParm(result, thissop, "snapswitcher", cookparms.getCookTime(), 0);
840  return result;
841  }
842  Gridtype getGridtype() const { return Gridtype(myGridtype); }
843  void setGridtype(Gridtype val) { myGridtype = int64(val); }
845  {
846  SOP_Node *thissop = cookparms.getNode();
847  if (!thissop) return getGridtype();
848  int64 result;
849  OP_Utils::evalOpParm(result, thissop, "gridtype", cookparms.getCookTime(), 0);
850  return Gridtype(result);
851  }
852  UT_Vector3D getGridspacing() const { return myGridspacing; }
853  void setGridspacing(UT_Vector3D val) { myGridspacing = val; }
855  {
856  SOP_Node *thissop = cookparms.getNode();
857  if (!thissop) return getGridspacing();
858  UT_Vector3D result;
859  OP_Utils::evalOpParm(result, thissop, "gridspacing", cookparms.getCookTime(), 0);
860  return result;
861  }
862  UT_Vector3D getGridlines() const { return myGridlines; }
863  void setGridlines(UT_Vector3D val) { myGridlines = val; }
865  {
866  SOP_Node *thissop = cookparms.getNode();
867  if (!thissop) return getGridlines();
868  UT_Vector3D result;
869  OP_Utils::evalOpParm(result, thissop, "gridlines", cookparms.getCookTime(), 0);
870  return result;
871  }
872  UT_Vector3I getGridpow2() const { return myGridpow2; }
873  void setGridpow2(UT_Vector3I val) { myGridpow2 = val; }
875  {
876  SOP_Node *thissop = cookparms.getNode();
877  if (!thissop) return getGridpow2();
878  UT_Vector3I result;
879  OP_Utils::evalOpParm(result, thissop, "gridpow2", cookparms.getCookTime(), 0);
880  return result;
881  }
882  UT_Vector3D getGridoffset() const { return myGridoffset; }
883  void setGridoffset(UT_Vector3D val) { myGridoffset = val; }
885  {
886  SOP_Node *thissop = cookparms.getNode();
887  if (!thissop) return getGridoffset();
888  UT_Vector3D result;
889  OP_Utils::evalOpParm(result, thissop, "gridoffset", cookparms.getCookTime(), 0);
890  return result;
891  }
892  Gridround getGridround() const { return Gridround(myGridround); }
893  void setGridround(Gridround val) { myGridround = int64(val); }
895  {
896  SOP_Node *thissop = cookparms.getNode();
897  if (!thissop) return getGridround();
898  int64 result;
899  OP_Utils::evalOpParm(result, thissop, "gridround", cookparms.getCookTime(), 0);
900  return Gridround(result);
901  }
902  fpreal64 getGridtol() const { return myGridtol; }
903  void setGridtol(fpreal64 val) { myGridtol = val; }
905  {
906  SOP_Node *thissop = cookparms.getNode();
907  if (!thissop) return getGridtol();
908  fpreal64 result;
909  OP_Utils::evalOpParm(result, thissop, "gridtol", cookparms.getCookTime(), 0);
910  return result;
911  }
912  bool getUpdatenml() const { return myUpdatenml; }
913  void setUpdatenml(bool val) { myUpdatenml = val; }
914  bool opUpdatenml(const SOP_NodeVerb::CookParms &cookparms) const
915  {
916  SOP_Node *thissop = cookparms.getNode();
917  if (!thissop) return getUpdatenml();
918  bool result;
919  OP_Utils::evalOpParm(result, thissop, "updatenml", cookparms.getCookTime(), 0);
920  return result;
921  }
922  bool getAccurate() const { return myAccurate; }
923  void setAccurate(bool val) { myAccurate = val; }
924  bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
925  {
926  SOP_Node *thissop = cookparms.getNode();
927  if (!thissop) return getAccurate();
928  bool result;
929  OP_Utils::evalOpParm(result, thissop, "accurate", cookparms.getCookTime(), 0);
930  return result;
931  }
932 
933 private:
934  UT_StringHolder myGroup;
935  bool myUsedist;
936  fpreal64 myDist;
937  bool myDeldegen;
938  bool myKeepunusedpoints;
939  bool myKeepconsolidatedpoints;
940  int64 myGrouppropagation;
941  int64 mySwitcher;
942  int64 mySnaptype;
943  fpreal64 myTol3d;
944  bool mySnappointpos;
945  bool mySnappointattribs;
946  UT_StringHolder myPointattribnames;
947  int64 mySnapswitcher;
948  int64 myGridtype;
949  UT_Vector3D myGridspacing;
950  UT_Vector3D myGridlines;
951  UT_Vector3I myGridpow2;
952  UT_Vector3D myGridoffset;
953  int64 myGridround;
954  fpreal64 myGridtol;
955  bool myUpdatenml;
956  bool myAccurate;
957 
958 };
static int version()
bool getDeldegen() const
void setSnaptype(Snaptype val)
static void saveData(std::ostream &os, UT_Vector3D v)
void setPointattribnames(const UT_StringHolder &val)
UT_Vector3D getGridoffset() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opPointattribnames(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
T & z(void)
Definition: UT_Vector4.h:379
static void loadData(UT_IStream &is, UT_StringHolder &v)
int64 opSnapswitcher(const SOP_NodeVerb::CookParms &cookparms) const
void setGridlines(UT_Vector3D val)
void setParmValue(exint idx, const UT_Matrix3D &value)
fpreal64 getDist() const
void getParmValue(exint idx, UT_Vector2D &value) const
static void loadData(UT_IStream &is, bool &v)
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
void setParmValue(exint idx, const exint &value)
int64 getSnapswitcher() const
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
UT_Vector3D opGridoffset(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
void getParmValue(exint idx, UT_StringHolder &value) const
bool getSnappointattribs() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
Grouppropagation opGrouppropagation(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_StringHolder &value)
void setGridtype(Gridtype val)
void setGrouppropagation(Grouppropagation val)
bool opUsedist(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
virtual const char * getParmName(exint fieldnum) const
bool operator==(const SOP_FuseParms &src) const
void setParmValue(exint idx, const fpreal &value)
static void loadData(UT_IStream &is, UT_Vector2I &v)
An output stream object that owns its own string buffer storage.
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_Vector3T< int64 > UT_Vector3I
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
fpreal64 getGridtol() const
void setParmValue(exint idx, const UT_Matrix4D &value)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, bool v)
void doSetParmValue(exint idx, const T &value)
static void loadData(UT_IStream &is, fpreal64 &v)
void setTol3d(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_Vector3I getGridpow2() const
bool opSnappointpos(const SOP_NodeVerb::CookParms &cookparms) const
void setGridspacing(UT_Vector3D val)
static void saveData(std::ostream &os, fpreal64 v)
void setSnappointpos(bool val)
bool getSnappointpos() const
fpreal64 getTol3d() const
bool opSnappointattribs(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector4D &value) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
void setKeepunusedpoints(bool val)
void setGridtol(fpreal64 val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
Gridround opGridround(const SOP_NodeVerb::CookParms &cookparms) const
Gridtype opGridtype(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:107
void setKeepconsolidatedpoints(bool val)
void setAccurate(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Vector3I opGridpow2(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix3D &value) const
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void setGridround(Gridround val)
bool getKeepunusedpoints() const
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, fpreal &value) const
UT_Vector3D opGridspacing(const SOP_NodeVerb::CookParms &cookparms) const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
fpreal64 opTol3d(const SOP_NodeVerb::CookParms &cookparms) const
void setUpdatenml(bool val)
int64 exint
Definition: SYS_Types.h:116
void getParmValue(exint idx, UT_Matrix2D &value) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
bool operator!=(const SOP_FuseParms &src) const
double fpreal64
Definition: SYS_Types.h:192
bool opUpdatenml(const SOP_NodeVerb::CookParms &cookparms) const
bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const UT_StringHolder & getPointattribnames() const
const UT_StringHolder & getGroup() const
void doGetParmValue(exint idx, T &value) const
static void loadData(UT_IStream &is, int64 &v)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void save(std::ostream &os) const
UT_Vector3T< fpreal64 > UT_Vector3D
Snaptype getSnaptype() const
GLboolean * data
Definition: glcorearb.h:130
bool load(UT_IStream &is)
bool getKeepconsolidatedpoints() const
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
void getParmValue(exint idx, exint &value) const
void setSwitcher(int64 val)
static void saveData(std::ostream &os, UT_Matrix4D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void getParmValue(exint idx, UT_Matrix4D &value) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
virtual ~SOP_FuseParms()
bool getUpdatenml() const
Grouppropagation getGrouppropagation() const
UT_Vector3D getGridlines() const
void setGridoffset(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal64 opGridtol(const SOP_NodeVerb::CookParms &cookparms) const
Gridtype getGridtype() const
void setParmValue(exint idx, const UT_Vector3D &value)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
bool getUsedist() const
bool getAccurate() const
UT_Vector3D getGridspacing() const
static void saveData(std::ostream &os, UT_Vector2D v)
void setUsedist(bool val)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
Gridround getGridround() const
virtual ParmType getParmType(exint fieldnum) const
void setGridpow2(UT_Vector3I val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, UT_Matrix2D v)
void setDist(fpreal64 val)
void getParmValue(exint idx, UT_Vector3D &value) const
GLuint GLfloat * val
Definition: glcorearb.h:1607
void setSnappointattribs(bool val)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
#define SOP_API
Definition: SOP_API.h:10
bool opDeldegen(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
static void loadData(UT_IStream &is, UT_Vector4D &v)
T & x(void)
Definition: UT_Vector4.h:375
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_Vector3D opGridlines(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
T & y(void)
Definition: UT_Vector2.h:287
void setParmValue(exint idx, const UT_Matrix2D &value)
int64 getSwitcher() const
GLboolean r
Definition: glcorearb.h:1221
static void saveData(std::ostream &os, UT_Vector4D v)
void setSnapswitcher(int64 val)
Snaptype opSnaptype(const SOP_NodeVerb::CookParms &cookparms) const
bool opKeepconsolidatedpoints(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector4D &value)
static void saveData(std::ostream &os, UT_Matrix3D v)
T & w(void)
Definition: UT_Vector4.h:381
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 saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
virtual exint getNumParms() const
void setDeldegen(bool val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLenum src
Definition: glcorearb.h:1792
bool opKeepunusedpoints(const SOP_NodeVerb::CookParms &cookparms) const
virtual void copyFrom(const SOP_NodeParms *src)