HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VoronoiSplit-2.0.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_VoronoiSplit_2_0Enums
24 {
25  enum class WeightMethod
26  {
27  POWER = 0,
28  RATIO
29  };
30 
32  getToken(WeightMethod enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case WeightMethod::POWER: return "power"_sh;
37  case WeightMethod::RATIO: return "ratio"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49 
51  {
52  myGroup = ""_UTsh;
53  myClipPtsGrp = ""_UTsh;
54  myCreateInteriorSurfaces = false;
55  mySnapTol = 1e-5;
56  myOffset = 0;
57  myUseWeightAttrib = false;
58  myWeightAttrib = "pscale"_UTsh;
59  myWeightMethod = 0;
60  myOutputCellPtAttrib = false;
61  myCellPtAttrib = "cellpt"_UTsh;
62  myOutputClipPtAttrib = false;
63  myClipPtAttrib = "clippt"_UTsh;
64 
65  }
66 
67  explicit SOP_VoronoiSplit_2_0Parms(const SOP_VoronoiSplit_2_0Parms &) = default;
70  SOP_VoronoiSplit_2_0Parms &operator=(SOP_VoronoiSplit_2_0Parms &&) noexcept = default;
71 
73 
75  {
76  if (myGroup != src.myGroup) return false;
77  if (myClipPtsGrp != src.myClipPtsGrp) return false;
78  if (myCreateInteriorSurfaces != src.myCreateInteriorSurfaces) return false;
79  if (mySnapTol != src.mySnapTol) return false;
80  if (myOffset != src.myOffset) return false;
81  if (myUseWeightAttrib != src.myUseWeightAttrib) return false;
82  if (myWeightAttrib != src.myWeightAttrib) return false;
83  if (myWeightMethod != src.myWeightMethod) return false;
84  if (myOutputCellPtAttrib != src.myOutputCellPtAttrib) return false;
85  if (myCellPtAttrib != src.myCellPtAttrib) return false;
86  if (myOutputClipPtAttrib != src.myOutputClipPtAttrib) return false;
87  if (myClipPtAttrib != src.myClipPtAttrib) return false;
88 
89 
90  if (baseGetSignature() != src.baseGetSignature()) return false;
91 
92  return true;
93  }
95  {
96  return !operator==(src);
97  }
99 
100 
101 
102  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
103  {
104  myGroup = ""_UTsh;
105  if (true)
106  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
107  myClipPtsGrp = ""_UTsh;
108  if (true)
109  graph->evalOpParm(myClipPtsGrp, nodeidx, "clipptsgrp", time, graph->isDirect()?nullptr:depnode);
110  myCreateInteriorSurfaces = false;
111  if (true)
112  graph->evalOpParm(myCreateInteriorSurfaces, nodeidx, "createinteriorsurfaces", time, graph->isDirect()?nullptr:depnode);
113  mySnapTol = 1e-5;
114  if (true)
115  graph->evalOpParm(mySnapTol, nodeidx, "snaptol", time, graph->isDirect()?nullptr:depnode);
116  myOffset = 0;
117  if (true)
118  graph->evalOpParm(myOffset, nodeidx, "offset", time, graph->isDirect()?nullptr:depnode);
119  myUseWeightAttrib = false;
120  if (true)
121  graph->evalOpParm(myUseWeightAttrib, nodeidx, "useweightattrib", time, graph->isDirect()?nullptr:depnode);
122  myWeightAttrib = "pscale"_UTsh;
123  if (true && ( (true&&!(((getUseWeightAttrib()==0)))) ) )
124  graph->evalOpParm(myWeightAttrib, nodeidx, "weightattrib", time, graph->isDirect()?nullptr:depnode);
125  myWeightMethod = 0;
126  if (true && ( (true&&!(((getUseWeightAttrib()==0)))) ) )
127  graph->evalOpParm(myWeightMethod, nodeidx, "weightmethod", time, graph->isDirect()?nullptr:depnode);
128  myOutputCellPtAttrib = false;
129  if (true)
130  graph->evalOpParm(myOutputCellPtAttrib, nodeidx, "outputcellptattrib", time, graph->isDirect()?nullptr:depnode);
131  myCellPtAttrib = "cellpt"_UTsh;
132  if (true && ( (true&&!(((getOutputCellPtAttrib()==0)))) ) )
133  graph->evalOpParm(myCellPtAttrib, nodeidx, "cellptattrib", time, graph->isDirect()?nullptr:depnode);
134  myOutputClipPtAttrib = false;
135  if (true && ( (true&&!(((getCreateInteriorSurfaces()==0)))) ) )
136  graph->evalOpParm(myOutputClipPtAttrib, nodeidx, "outputclipptattrib", time, graph->isDirect()?nullptr:depnode);
137  myClipPtAttrib = "clippt"_UTsh;
138  if (true && ( (true&&!(((getOutputClipPtAttrib()==0))||((getCreateInteriorSurfaces()==0)))) ) )
139  graph->evalOpParm(myClipPtAttrib, nodeidx, "clipptattrib", time, graph->isDirect()?nullptr:depnode);
140 
141  }
142 
143 
144  void loadFromOpSubclass(const LoadParms &loadparms) override
145  {
146  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
147  }
148 
149 
150  void copyFrom(const OP_NodeParms *src) override
151  {
152  *this = *((const SOP_VoronoiSplit_2_0Parms *)src);
153  }
154 
155  template <typename T>
156  void
157  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
158  {
159  if (idx.size() < 1)
160  return;
161  UT_ASSERT(idx.size() == instance.size()+1);
162  if (idx.size() != instance.size()+1)
163  return;
164  switch (idx[0])
165  {
166  case 0:
167  coerceValue(value, myGroup);
168  break;
169  case 1:
170  coerceValue(value, myClipPtsGrp);
171  break;
172  case 2:
173  coerceValue(value, myCreateInteriorSurfaces);
174  break;
175  case 3:
176  coerceValue(value, mySnapTol);
177  break;
178  case 4:
179  coerceValue(value, myOffset);
180  break;
181  case 5:
182  coerceValue(value, myUseWeightAttrib);
183  break;
184  case 6:
185  coerceValue(value, myWeightAttrib);
186  break;
187  case 7:
188  coerceValue(value, myWeightMethod);
189  break;
190  case 8:
191  coerceValue(value, myOutputCellPtAttrib);
192  break;
193  case 9:
194  coerceValue(value, myCellPtAttrib);
195  break;
196  case 10:
197  coerceValue(value, myOutputClipPtAttrib);
198  break;
199  case 11:
200  coerceValue(value, myClipPtAttrib);
201  break;
202 
203  }
204  }
205 
206  bool isParmColorRamp(exint idx) const override
207  {
208  switch (idx)
209  {
210 
211  }
212  return false;
213  }
214 
215  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
216  { doGetParmValue(idx, instance, value); }
217  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
218  { doGetParmValue(idx, instance, value); }
219  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
220  { doGetParmValue(idx, instance, value); }
221  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
222  { doGetParmValue(idx, instance, value); }
223  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
236  { doGetParmValue(idx, instance, value); }
237 
238  template <typename T>
239  void
240  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
241  {
242  if (idx.size() < 1)
243  return;
244  UT_ASSERT(idx.size() == instance.size()+1);
245  if (idx.size() != instance.size()+1)
246  return;
247  switch (idx[0])
248  {
249  case 0:
250  coerceValue(myGroup, ( ( value ) ));
251  break;
252  case 1:
253  coerceValue(myClipPtsGrp, ( ( value ) ));
254  break;
255  case 2:
256  coerceValue(myCreateInteriorSurfaces, ( ( value ) ));
257  break;
258  case 3:
259  coerceValue(mySnapTol, clampMinValue(0, ( value ) ));
260  break;
261  case 4:
262  coerceValue(myOffset, ( ( value ) ));
263  break;
264  case 5:
265  coerceValue(myUseWeightAttrib, ( ( value ) ));
266  break;
267  case 6:
268  coerceValue(myWeightAttrib, ( ( value ) ));
269  break;
270  case 7:
271  coerceValue(myWeightMethod, clampMinValue(0, clampMaxValue(1, value ) ));
272  break;
273  case 8:
274  coerceValue(myOutputCellPtAttrib, ( ( value ) ));
275  break;
276  case 9:
277  coerceValue(myCellPtAttrib, ( ( value ) ));
278  break;
279  case 10:
280  coerceValue(myOutputClipPtAttrib, ( ( value ) ));
281  break;
282  case 11:
283  coerceValue(myClipPtAttrib, ( ( value ) ));
284  break;
285 
286  }
287  }
288 
289  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
290  { doSetParmValue(idx, instance, value); }
291  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
292  { doSetParmValue(idx, instance, value); }
293  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
310  { doSetParmValue(idx, instance, value); }
311 
312  exint getNestNumParms(TempIndex idx) const override
313  {
314  if (idx.size() == 0)
315  return 12;
316  switch (idx[0])
317  {
318 
319  }
320  // Invalid
321  return 0;
322  }
323 
324  const char *getNestParmName(TempIndex fieldnum) const override
325  {
326  if (fieldnum.size() < 1)
327  return 0;
328  switch (fieldnum[0])
329  {
330  case 0:
331  return "group";
332  case 1:
333  return "clipptsgrp";
334  case 2:
335  return "createinteriorsurfaces";
336  case 3:
337  return "snaptol";
338  case 4:
339  return "offset";
340  case 5:
341  return "useweightattrib";
342  case 6:
343  return "weightattrib";
344  case 7:
345  return "weightmethod";
346  case 8:
347  return "outputcellptattrib";
348  case 9:
349  return "cellptattrib";
350  case 10:
351  return "outputclipptattrib";
352  case 11:
353  return "clipptattrib";
354 
355  }
356  return 0;
357  }
358 
359  ParmType getNestParmType(TempIndex fieldnum) const override
360  {
361  if (fieldnum.size() < 1)
362  return PARM_UNSUPPORTED;
363  switch (fieldnum[0])
364  {
365  case 0:
366  return PARM_STRING;
367  case 1:
368  return PARM_STRING;
369  case 2:
370  return PARM_INTEGER;
371  case 3:
372  return PARM_FLOAT;
373  case 4:
374  return PARM_FLOAT;
375  case 5:
376  return PARM_INTEGER;
377  case 6:
378  return PARM_STRING;
379  case 7:
380  return PARM_INTEGER;
381  case 8:
382  return PARM_INTEGER;
383  case 9:
384  return PARM_STRING;
385  case 10:
386  return PARM_INTEGER;
387  case 11:
388  return PARM_STRING;
389 
390  }
391  return PARM_UNSUPPORTED;
392  }
393 
394  // Boiler plate to load individual types.
395  static void loadData(UT_IStream &is, int64 &v)
396  { is.bread(&v, 1); }
397  static void loadData(UT_IStream &is, bool &v)
398  { int64 iv; is.bread(&iv, 1); v = iv; }
399  static void loadData(UT_IStream &is, fpreal64 &v)
400  { is.bread<fpreal64>(&v, 1); }
401  static void loadData(UT_IStream &is, UT_Vector2D &v)
402  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
403  static void loadData(UT_IStream &is, UT_Vector3D &v)
404  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
405  is.bread<fpreal64>(&v.z(), 1); }
406  static void loadData(UT_IStream &is, UT_Vector4D &v)
407  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
408  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
409  static void loadData(UT_IStream &is, UT_Matrix2D &v)
410  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
411  static void loadData(UT_IStream &is, UT_Matrix3D &v)
412  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
413  static void loadData(UT_IStream &is, UT_Matrix4D &v)
414  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
415  static void loadData(UT_IStream &is, UT_Vector2I &v)
416  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
417  static void loadData(UT_IStream &is, UT_Vector3I &v)
418  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
419  is.bread<int64>(&v.z(), 1); }
420  static void loadData(UT_IStream &is, UT_Vector4I &v)
421  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
422  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
424  { is.bread(v); }
426  { UT_StringHolder rampdata;
427  loadData(is, rampdata);
428  if (rampdata.isstring())
429  {
430  v.reset(new UT_Ramp());
431  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
432  v->load(istr);
433  }
434  else v.reset();
435  }
438  loadData(is, data);
439  if (data.isstring())
440  {
441  // Find the data type.
442  const char *colon = UT_StringWrap(data).findChar(':');
443  if (colon)
444  {
445  int typelen = colon - data.buffer();
447  type.strncpy(data.buffer(), typelen);
448  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
449 
450  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
451  }
452  }
453  else v.reset();
454  }
455 
456  static void saveData(std::ostream &os, int64 v)
457  { UTwrite(os, &v); }
458  static void saveData(std::ostream &os, bool v)
459  { int64 iv = v; UTwrite(os, &iv); }
460  static void saveData(std::ostream &os, fpreal64 v)
461  { UTwrite<fpreal64>(os, &v); }
462  static void saveData(std::ostream &os, UT_Vector2D v)
463  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
464  static void saveData(std::ostream &os, UT_Vector3D v)
465  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
466  UTwrite<fpreal64>(os, &v.z()); }
467  static void saveData(std::ostream &os, UT_Vector4D v)
468  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
469  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
470  static void saveData(std::ostream &os, UT_Matrix2D v)
472  static void saveData(std::ostream &os, UT_Matrix3D v)
474  static void saveData(std::ostream &os, UT_Matrix4D v)
476  static void saveData(std::ostream &os, UT_StringHolder s)
477  { UT_StringWrap(s).saveBinary(os); }
478  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
480  UT_OStringStream ostr;
481  if (s) s->save(ostr);
482  result = ostr.str();
483  saveData(os, result);
484  }
485  static void saveData(std::ostream &os, PRM_DataItemHandle s)
487  UT_OStringStream ostr;
488  if (s)
489  {
490  ostr << s->getDataTypeToken();
491  ostr << ":";
492  s->saveBinary(ostr);
493  }
494  result = ostr.str();
495  saveData(os, result);
496  }
497 
498 
499  void save(std::ostream &os) const
500  {
501  int32 v = version();
502  UTwrite(os, &v);
503  saveData(os, myGroup);
504  saveData(os, myClipPtsGrp);
505  saveData(os, myCreateInteriorSurfaces);
506  saveData(os, mySnapTol);
507  saveData(os, myOffset);
508  saveData(os, myUseWeightAttrib);
509  saveData(os, myWeightAttrib);
510  saveData(os, myWeightMethod);
511  saveData(os, myOutputCellPtAttrib);
512  saveData(os, myCellPtAttrib);
513  saveData(os, myOutputClipPtAttrib);
514  saveData(os, myClipPtAttrib);
515 
516  }
517 
518  bool load(UT_IStream &is)
519  {
520  int32 v;
521  is.bread(&v, 1);
522  if (version() != v)
523  {
524  // Fail incompatible versions
525  return false;
526  }
527  loadData(is, myGroup);
528  loadData(is, myClipPtsGrp);
529  loadData(is, myCreateInteriorSurfaces);
530  loadData(is, mySnapTol);
531  loadData(is, myOffset);
532  loadData(is, myUseWeightAttrib);
533  loadData(is, myWeightAttrib);
534  loadData(is, myWeightMethod);
535  loadData(is, myOutputCellPtAttrib);
536  loadData(is, myCellPtAttrib);
537  loadData(is, myOutputClipPtAttrib);
538  loadData(is, myClipPtAttrib);
539 
540  return true;
541  }
542 
543  const UT_StringHolder & getGroup() const { return myGroup; }
544  void setGroup(const UT_StringHolder & val) { myGroup = val; }
546  {
547  SOP_Node *thissop = cookparms.getNode();
548  if (!thissop) return getGroup();
550  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
551  return result;
552  }
553  const UT_StringHolder & getClipPtsGrp() const { return myClipPtsGrp; }
554  void setClipPtsGrp(const UT_StringHolder & val) { myClipPtsGrp = val; }
556  {
557  SOP_Node *thissop = cookparms.getNode();
558  if (!thissop) return getClipPtsGrp();
560  OP_Utils::evalOpParm(result, thissop, "clipptsgrp", cookparms.getCookTime(), 0);
561  return result;
562  }
563  bool getCreateInteriorSurfaces() const { return myCreateInteriorSurfaces; }
564  void setCreateInteriorSurfaces(bool val) { myCreateInteriorSurfaces = val; }
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return getCreateInteriorSurfaces();
569  bool result;
570  OP_Utils::evalOpParm(result, thissop, "createinteriorsurfaces", cookparms.getCookTime(), 0);
571  return result;
572  }
573  fpreal64 getSnapTol() const { return mySnapTol; }
574  void setSnapTol(fpreal64 val) { mySnapTol = val; }
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getSnapTol();
580  OP_Utils::evalOpParm(result, thissop, "snaptol", cookparms.getCookTime(), 0);
581  return result;
582  }
583  fpreal64 getOffset() const { return myOffset; }
584  void setOffset(fpreal64 val) { myOffset = val; }
585  fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getOffset();
590  OP_Utils::evalOpParm(result, thissop, "offset", cookparms.getCookTime(), 0);
591  return result;
592  }
593  bool getUseWeightAttrib() const { return myUseWeightAttrib; }
594  void setUseWeightAttrib(bool val) { myUseWeightAttrib = val; }
595  bool opUseWeightAttrib(const SOP_NodeVerb::CookParms &cookparms) const
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getUseWeightAttrib();
599  bool result;
600  OP_Utils::evalOpParm(result, thissop, "useweightattrib", cookparms.getCookTime(), 0);
601  return result;
602  }
603  const UT_StringHolder & getWeightAttrib() const { return myWeightAttrib; }
604  void setWeightAttrib(const UT_StringHolder & val) { myWeightAttrib = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getWeightAttrib();
610  OP_Utils::evalOpParm(result, thissop, "weightattrib", cookparms.getCookTime(), 0);
611  return result;
612  }
613  WeightMethod getWeightMethod() const { return WeightMethod(myWeightMethod); }
614  void setWeightMethod(WeightMethod val) { myWeightMethod = int64(val); }
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getWeightMethod();
619  int64 result;
620  OP_Utils::evalOpParm(result, thissop, "weightmethod", cookparms.getCookTime(), 0);
621  return WeightMethod(result);
622  }
623  bool getOutputCellPtAttrib() const { return myOutputCellPtAttrib; }
624  void setOutputCellPtAttrib(bool val) { myOutputCellPtAttrib = val; }
625  bool opOutputCellPtAttrib(const SOP_NodeVerb::CookParms &cookparms) const
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getOutputCellPtAttrib();
629  bool result;
630  OP_Utils::evalOpParm(result, thissop, "outputcellptattrib", cookparms.getCookTime(), 0);
631  return result;
632  }
633  const UT_StringHolder & getCellPtAttrib() const { return myCellPtAttrib; }
634  void setCellPtAttrib(const UT_StringHolder & val) { myCellPtAttrib = val; }
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getCellPtAttrib();
640  OP_Utils::evalOpParm(result, thissop, "cellptattrib", cookparms.getCookTime(), 0);
641  return result;
642  }
643  bool getOutputClipPtAttrib() const { return myOutputClipPtAttrib; }
644  void setOutputClipPtAttrib(bool val) { myOutputClipPtAttrib = val; }
645  bool opOutputClipPtAttrib(const SOP_NodeVerb::CookParms &cookparms) const
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getOutputClipPtAttrib();
649  bool result;
650  OP_Utils::evalOpParm(result, thissop, "outputclipptattrib", cookparms.getCookTime(), 0);
651  return result;
652  }
653  const UT_StringHolder & getClipPtAttrib() const { return myClipPtAttrib; }
654  void setClipPtAttrib(const UT_StringHolder & val) { myClipPtAttrib = val; }
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getClipPtAttrib();
660  OP_Utils::evalOpParm(result, thissop, "clipptattrib", cookparms.getCookTime(), 0);
661  return result;
662  }
663 
664 private:
665  UT_StringHolder myGroup;
666  UT_StringHolder myClipPtsGrp;
667  bool myCreateInteriorSurfaces;
668  fpreal64 mySnapTol;
669  fpreal64 myOffset;
670  bool myUseWeightAttrib;
671  UT_StringHolder myWeightAttrib;
672  int64 myWeightMethod;
673  bool myOutputCellPtAttrib;
674  UT_StringHolder myCellPtAttrib;
675  bool myOutputClipPtAttrib;
676  UT_StringHolder myClipPtAttrib;
677 
678 };
type
Definition: core.h:556
void copyFrom(const OP_NodeParms *src) override
UT_StringHolder opClipPtAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
const UT_StringHolder & getCellPtAttrib() const
void setGroup(const UT_StringHolder &val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:403
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:495
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setClipPtAttrib(const UT_StringHolder &val)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setWeightMethod(WeightMethod val)
static void saveData(std::ostream &os, UT_Matrix4D v)
SYS_FORCE_INLINE UT_StringHolder getToken(WeightMethod enum_value)
static void saveData(std::ostream &os, UT_Vector3D v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
bool opCreateInteriorSurfaces(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:669
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
**But if you need a result
Definition: thread.h:622
const UT_StringHolder & getWeightAttrib() const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opOutputCellPtAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:493
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:426
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 opSnapTol(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getClipPtsGrp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setClipPtsGrp(const UT_StringHolder &val)
exint getNestNumParms(TempIndex idx) const override
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
bool opOutputClipPtAttrib(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opCellPtAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void setWeightAttrib(const UT_StringHolder &val)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setCellPtAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector2D v)
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool operator==(const SOP_VoronoiSplit_2_0Parms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:306
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
GT_API const UT_StringHolder version
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getClipPtAttrib() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const char * getNestParmName(TempIndex fieldnum) const override
fpreal64 fpreal
Definition: SYS_Types.h:283
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void loadData(UT_IStream &is, bool &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:499
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:432
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1421
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
exint bread(uint8 *buffer, exint asize=1)
static void saveData(std::ostream &os, bool v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:667
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
WeightMethod opWeightMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool opUseWeightAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opWeightAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:428
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool operator!=(const SOP_VoronoiSplit_2_0Parms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:665
UT_StringHolder opClipPtsGrp(const SOP_NodeVerb::CookParms &cookparms) const