HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Divide.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 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myGroup = ""_UTsh;
32  myConvex = true;
33  myUsemaxsides = true;
34  myNumsides = 3;
35  myPlanar = true;
36  myPlantol = 0.0001;
37  myNoslivers = false;
38  myAvoidsmallangles = false;
39  mySmooth = false;
40  myWeight = UT_Vector2D(1,0.5);
41  myDivs = 1;
42  myBrick = false;
43  mySize = UT_Vector3D(1,1,1);
44  myOffset = UT_Vector3D(0,0,0);
45  myAngle = UT_Vector3D(0,0,0);
46  myFixsharededges = true;
47  myRemovesh = false;
48  myDual = false;
49  myDualattribstoswap = "* ^P"_UTsh;
50 
51  }
52 
53  explicit SOP_DivideParms(const SOP_DivideParms &) = default;
54  SOP_DivideParms &operator=(const SOP_DivideParms &) = default;
55  SOP_DivideParms(SOP_DivideParms &&) noexcept = default;
56  SOP_DivideParms &operator=(SOP_DivideParms &&) noexcept = default;
57 
58  ~SOP_DivideParms() override {}
59 
60  bool operator==(const SOP_DivideParms &src) const
61  {
62  if (myGroup != src.myGroup) return false;
63  if (myConvex != src.myConvex) return false;
64  if (myUsemaxsides != src.myUsemaxsides) return false;
65  if (myNumsides != src.myNumsides) return false;
66  if (myPlanar != src.myPlanar) return false;
67  if (myPlantol != src.myPlantol) return false;
68  if (myNoslivers != src.myNoslivers) return false;
69  if (myAvoidsmallangles != src.myAvoidsmallangles) return false;
70  if (mySmooth != src.mySmooth) return false;
71  if (myWeight != src.myWeight) return false;
72  if (myDivs != src.myDivs) return false;
73  if (myBrick != src.myBrick) return false;
74  if (mySize != src.mySize) return false;
75  if (myOffset != src.myOffset) return false;
76  if (myAngle != src.myAngle) return false;
77  if (myFixsharededges != src.myFixsharededges) return false;
78  if (myRemovesh != src.myRemovesh) return false;
79  if (myDual != src.myDual) return false;
80  if (myDualattribstoswap != src.myDualattribstoswap) return false;
81 
82 
83  if (baseGetSignature() != src.baseGetSignature()) return false;
84 
85  return true;
86  }
87  bool operator!=(const SOP_DivideParms &src) const
88  {
89  return !operator==(src);
90  }
91 
92 
93 
94  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
95  {
96  myGroup = ""_UTsh;
97  if (true)
98  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
99  myConvex = true;
100  if (true)
101  graph->evalOpParm(myConvex, nodeidx, "convex", time, graph->isDirect()?nullptr:depnode);
102  myUsemaxsides = true;
103  if (true && ( (true&&!(((getConvex()==0)))) ) )
104  graph->evalOpParm(myUsemaxsides, nodeidx, "usemaxsides", time, graph->isDirect()?nullptr:depnode);
105  myNumsides = 3;
106  if (true && ( (true&&!(((getConvex()==0))||((getUsemaxsides()==0)))) ) )
107  graph->evalOpParm(myNumsides, nodeidx, "numsides", time, graph->isDirect()?nullptr:depnode);
108  myPlanar = true;
109  if (true && ( (true&&!(((getConvex()==0)))) ) )
110  graph->evalOpParm(myPlanar, nodeidx, "planar", time, graph->isDirect()?nullptr:depnode);
111  myPlantol = 0.0001;
112  if (true && ( (true&&!(((getConvex()==0))||((getPlanar()==0)))) ) )
113  graph->evalOpParm(myPlantol, nodeidx, "plantol", time, graph->isDirect()?nullptr:depnode);
114  myNoslivers = false;
115  if (true)
116  graph->evalOpParm(myNoslivers, nodeidx, "noslivers", time, graph->isDirect()?nullptr:depnode);
117  myAvoidsmallangles = false;
118  if (true)
119  graph->evalOpParm(myAvoidsmallangles, nodeidx, "avoidsmallangles", time, graph->isDirect()?nullptr:depnode);
120  mySmooth = false;
121  if (true)
122  graph->evalOpParm(mySmooth, nodeidx, "smooth", time, graph->isDirect()?nullptr:depnode);
123  myWeight = UT_Vector2D(1,0.5);
124  if (true && ( (true&&!(((getSmooth()==0)))) ) )
125  graph->evalOpParm(myWeight, nodeidx, "weight", time, graph->isDirect()?nullptr:depnode);
126  myDivs = 1;
127  if (true && ( (true&&!(((getSmooth()==0)))) ) )
128  graph->evalOpParm(myDivs, nodeidx, "divs", time, graph->isDirect()?nullptr:depnode);
129  myBrick = false;
130  if (true)
131  graph->evalOpParm(myBrick, nodeidx, "brick", time, graph->isDirect()?nullptr:depnode);
132  mySize = UT_Vector3D(1,1,1);
133  if (true && ( (true&&!(((getBrick()==0)))) ) )
134  graph->evalOpParm(mySize, nodeidx, "size", time, graph->isDirect()?nullptr:depnode);
135  myOffset = UT_Vector3D(0,0,0);
136  if (true && ( (true&&!(((getBrick()==0)))) ) )
137  graph->evalOpParm(myOffset, nodeidx, "offset", time, graph->isDirect()?nullptr:depnode);
138  myAngle = UT_Vector3D(0,0,0);
139  if (true && ( (true&&!(((getBrick()==0)))) ) )
140  graph->evalOpParm(myAngle, nodeidx, "angle", time, graph->isDirect()?nullptr:depnode);
141  myFixsharededges = true;
142  if (true && ( (true&&!(((getBrick()==0)))) ) )
143  graph->evalOpParm(myFixsharededges, nodeidx, "fixsharededges", time, graph->isDirect()?nullptr:depnode);
144  myRemovesh = false;
145  if (true)
146  graph->evalOpParm(myRemovesh, nodeidx, "removesh", time, graph->isDirect()?nullptr:depnode);
147  myDual = false;
148  if (true)
149  graph->evalOpParm(myDual, nodeidx, "dual", time, graph->isDirect()?nullptr:depnode);
150  myDualattribstoswap = "* ^P"_UTsh;
151  if (true && ( (true&&!(((getDual()==0)))) ) )
152  graph->evalOpParm(myDualattribstoswap, nodeidx, "dualattribstoswap", time, graph->isDirect()?nullptr:depnode);
153 
154  }
155 
156 
157  void loadFromOpSubclass(const LoadParms &loadparms) override
158  {
159  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
160  }
161 
162 
163  void copyFrom(const OP_NodeParms *src) override
164  {
165  *this = *((const SOP_DivideParms *)src);
166  }
167 
168  template <typename T>
169  void
170  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
171  {
172  if (idx.size() < 1)
173  return;
174  UT_ASSERT(idx.size() == instance.size()+1);
175  if (idx.size() != instance.size()+1)
176  return;
177  switch (idx[0])
178  {
179  case 0:
180  coerceValue(value, myGroup);
181  break;
182  case 1:
183  coerceValue(value, myConvex);
184  break;
185  case 2:
186  coerceValue(value, myUsemaxsides);
187  break;
188  case 3:
189  coerceValue(value, myNumsides);
190  break;
191  case 4:
192  coerceValue(value, myPlanar);
193  break;
194  case 5:
195  coerceValue(value, myPlantol);
196  break;
197  case 6:
198  coerceValue(value, myNoslivers);
199  break;
200  case 7:
201  coerceValue(value, myAvoidsmallangles);
202  break;
203  case 8:
204  coerceValue(value, mySmooth);
205  break;
206  case 9:
207  coerceValue(value, myWeight);
208  break;
209  case 10:
210  coerceValue(value, myDivs);
211  break;
212  case 11:
213  coerceValue(value, myBrick);
214  break;
215  case 12:
216  coerceValue(value, mySize);
217  break;
218  case 13:
219  coerceValue(value, myOffset);
220  break;
221  case 14:
222  coerceValue(value, myAngle);
223  break;
224  case 15:
225  coerceValue(value, myFixsharededges);
226  break;
227  case 16:
228  coerceValue(value, myRemovesh);
229  break;
230  case 17:
231  coerceValue(value, myDual);
232  break;
233  case 18:
234  coerceValue(value, myDualattribstoswap);
235  break;
236 
237  }
238  }
239 
240  bool isParmColorRamp(exint idx) const override
241  {
242  switch (idx)
243  {
244 
245  }
246  return false;
247  }
248 
249  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
270  { doGetParmValue(idx, instance, value); }
271 
272  template <typename T>
273  void
274  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
275  {
276  if (idx.size() < 1)
277  return;
278  UT_ASSERT(idx.size() == instance.size()+1);
279  if (idx.size() != instance.size()+1)
280  return;
281  switch (idx[0])
282  {
283  case 0:
284  coerceValue(myGroup, ( ( value ) ));
285  break;
286  case 1:
287  coerceValue(myConvex, ( ( value ) ));
288  break;
289  case 2:
290  coerceValue(myUsemaxsides, ( ( value ) ));
291  break;
292  case 3:
293  coerceValue(myNumsides, clampMinValue(3, ( value ) ));
294  break;
295  case 4:
296  coerceValue(myPlanar, ( ( value ) ));
297  break;
298  case 5:
299  coerceValue(myPlantol, clampMinValue(0, ( value ) ));
300  break;
301  case 6:
302  coerceValue(myNoslivers, ( ( value ) ));
303  break;
304  case 7:
305  coerceValue(myAvoidsmallangles, ( ( value ) ));
306  break;
307  case 8:
308  coerceValue(mySmooth, ( ( value ) ));
309  break;
310  case 9:
311  coerceValue(myWeight, ( ( value ) ));
312  break;
313  case 10:
314  coerceValue(myDivs, clampMinValue(1, ( value ) ));
315  break;
316  case 11:
317  coerceValue(myBrick, ( ( value ) ));
318  break;
319  case 12:
320  coerceValue(mySize, clampMinValue(0, ( value ) ));
321  break;
322  case 13:
323  coerceValue(myOffset, ( ( value ) ));
324  break;
325  case 14:
326  coerceValue(myAngle, ( ( value ) ));
327  break;
328  case 15:
329  coerceValue(myFixsharededges, ( ( value ) ));
330  break;
331  case 16:
332  coerceValue(myRemovesh, ( ( value ) ));
333  break;
334  case 17:
335  coerceValue(myDual, ( ( value ) ));
336  break;
337  case 18:
338  coerceValue(myDualattribstoswap, ( ( value ) ));
339  break;
340 
341  }
342  }
343 
344  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
349  { doSetParmValue(idx, instance, value); }
350  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
351  { doSetParmValue(idx, instance, value); }
352  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
353  { doSetParmValue(idx, instance, value); }
354  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
355  { doSetParmValue(idx, instance, value); }
356  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
357  { doSetParmValue(idx, instance, value); }
358  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
359  { doSetParmValue(idx, instance, value); }
360  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
361  { doSetParmValue(idx, instance, value); }
362  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
363  { doSetParmValue(idx, instance, value); }
364  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
365  { doSetParmValue(idx, instance, value); }
366 
367  exint getNestNumParms(TempIndex idx) const override
368  {
369  if (idx.size() == 0)
370  return 19;
371  switch (idx[0])
372  {
373 
374  }
375  // Invalid
376  return 0;
377  }
378 
379  const char *getNestParmName(TempIndex fieldnum) const override
380  {
381  if (fieldnum.size() < 1)
382  return 0;
383  switch (fieldnum[0])
384  {
385  case 0:
386  return "group";
387  case 1:
388  return "convex";
389  case 2:
390  return "usemaxsides";
391  case 3:
392  return "numsides";
393  case 4:
394  return "planar";
395  case 5:
396  return "plantol";
397  case 6:
398  return "noslivers";
399  case 7:
400  return "avoidsmallangles";
401  case 8:
402  return "smooth";
403  case 9:
404  return "weight";
405  case 10:
406  return "divs";
407  case 11:
408  return "brick";
409  case 12:
410  return "size";
411  case 13:
412  return "offset";
413  case 14:
414  return "angle";
415  case 15:
416  return "fixsharededges";
417  case 16:
418  return "removesh";
419  case 17:
420  return "dual";
421  case 18:
422  return "dualattribstoswap";
423 
424  }
425  return 0;
426  }
427 
428  ParmType getNestParmType(TempIndex fieldnum) const override
429  {
430  if (fieldnum.size() < 1)
431  return PARM_UNSUPPORTED;
432  switch (fieldnum[0])
433  {
434  case 0:
435  return PARM_STRING;
436  case 1:
437  return PARM_INTEGER;
438  case 2:
439  return PARM_INTEGER;
440  case 3:
441  return PARM_INTEGER;
442  case 4:
443  return PARM_INTEGER;
444  case 5:
445  return PARM_FLOAT;
446  case 6:
447  return PARM_INTEGER;
448  case 7:
449  return PARM_INTEGER;
450  case 8:
451  return PARM_INTEGER;
452  case 9:
453  return PARM_VECTOR2;
454  case 10:
455  return PARM_INTEGER;
456  case 11:
457  return PARM_INTEGER;
458  case 12:
459  return PARM_VECTOR3;
460  case 13:
461  return PARM_VECTOR3;
462  case 14:
463  return PARM_VECTOR3;
464  case 15:
465  return PARM_INTEGER;
466  case 16:
467  return PARM_INTEGER;
468  case 17:
469  return PARM_INTEGER;
470  case 18:
471  return PARM_STRING;
472 
473  }
474  return PARM_UNSUPPORTED;
475  }
476 
477  // Boiler plate to load individual types.
478  static void loadData(UT_IStream &is, int64 &v)
479  { is.bread(&v, 1); }
480  static void loadData(UT_IStream &is, bool &v)
481  { int64 iv; is.bread(&iv, 1); v = iv; }
482  static void loadData(UT_IStream &is, fpreal64 &v)
483  { is.bread<fpreal64>(&v, 1); }
484  static void loadData(UT_IStream &is, UT_Vector2D &v)
485  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
486  static void loadData(UT_IStream &is, UT_Vector3D &v)
487  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
488  is.bread<fpreal64>(&v.z(), 1); }
489  static void loadData(UT_IStream &is, UT_Vector4D &v)
490  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
491  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
492  static void loadData(UT_IStream &is, UT_Matrix2D &v)
493  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
494  static void loadData(UT_IStream &is, UT_Matrix3D &v)
495  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
496  static void loadData(UT_IStream &is, UT_Matrix4D &v)
497  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
498  static void loadData(UT_IStream &is, UT_Vector2I &v)
499  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
500  static void loadData(UT_IStream &is, UT_Vector3I &v)
501  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
502  is.bread<int64>(&v.z(), 1); }
503  static void loadData(UT_IStream &is, UT_Vector4I &v)
504  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
505  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
507  { is.bread(v); }
509  { UT_StringHolder rampdata;
510  loadData(is, rampdata);
511  if (rampdata.isstring())
512  {
513  v.reset(new UT_Ramp());
514  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
515  v->load(istr);
516  }
517  else v.reset();
518  }
521  loadData(is, data);
522  if (data.isstring())
523  {
524  // Find the data type.
525  const char *colon = UT_StringWrap(data).findChar(':');
526  if (colon)
527  {
528  int typelen = colon - data.buffer();
530  type.strncpy(data.buffer(), typelen);
531  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
532 
533  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
534  }
535  }
536  else v.reset();
537  }
538 
539  static void saveData(std::ostream &os, int64 v)
540  { UTwrite(os, &v); }
541  static void saveData(std::ostream &os, bool v)
542  { int64 iv = v; UTwrite(os, &iv); }
543  static void saveData(std::ostream &os, fpreal64 v)
544  { UTwrite<fpreal64>(os, &v); }
545  static void saveData(std::ostream &os, UT_Vector2D v)
546  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
547  static void saveData(std::ostream &os, UT_Vector3D v)
548  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
549  UTwrite<fpreal64>(os, &v.z()); }
550  static void saveData(std::ostream &os, UT_Vector4D v)
551  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
552  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
553  static void saveData(std::ostream &os, UT_Matrix2D v)
555  static void saveData(std::ostream &os, UT_Matrix3D v)
557  static void saveData(std::ostream &os, UT_Matrix4D v)
559  static void saveData(std::ostream &os, UT_StringHolder s)
560  { UT_StringWrap(s).saveBinary(os); }
561  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
563  UT_OStringStream ostr;
564  if (s) s->save(ostr);
565  result = ostr.str();
566  saveData(os, result);
567  }
568  static void saveData(std::ostream &os, PRM_DataItemHandle s)
570  UT_OStringStream ostr;
571  if (s)
572  {
573  ostr << s->getDataTypeToken();
574  ostr << ":";
575  s->saveBinary(ostr);
576  }
577  result = ostr.str();
578  saveData(os, result);
579  }
580 
581 
582  void save(std::ostream &os) const
583  {
584  int32 v = version();
585  UTwrite(os, &v);
586  saveData(os, myGroup);
587  saveData(os, myConvex);
588  saveData(os, myUsemaxsides);
589  saveData(os, myNumsides);
590  saveData(os, myPlanar);
591  saveData(os, myPlantol);
592  saveData(os, myNoslivers);
593  saveData(os, myAvoidsmallangles);
594  saveData(os, mySmooth);
595  saveData(os, myWeight);
596  saveData(os, myDivs);
597  saveData(os, myBrick);
598  saveData(os, mySize);
599  saveData(os, myOffset);
600  saveData(os, myAngle);
601  saveData(os, myFixsharededges);
602  saveData(os, myRemovesh);
603  saveData(os, myDual);
604  saveData(os, myDualattribstoswap);
605 
606  }
607 
608  bool load(UT_IStream &is)
609  {
610  int32 v;
611  is.bread(&v, 1);
612  if (version() != v)
613  {
614  // Fail incompatible versions
615  return false;
616  }
617  loadData(is, myGroup);
618  loadData(is, myConvex);
619  loadData(is, myUsemaxsides);
620  loadData(is, myNumsides);
621  loadData(is, myPlanar);
622  loadData(is, myPlantol);
623  loadData(is, myNoslivers);
624  loadData(is, myAvoidsmallangles);
625  loadData(is, mySmooth);
626  loadData(is, myWeight);
627  loadData(is, myDivs);
628  loadData(is, myBrick);
629  loadData(is, mySize);
630  loadData(is, myOffset);
631  loadData(is, myAngle);
632  loadData(is, myFixsharededges);
633  loadData(is, myRemovesh);
634  loadData(is, myDual);
635  loadData(is, myDualattribstoswap);
636 
637  return true;
638  }
639 
640  const UT_StringHolder & getGroup() const { return myGroup; }
641  void setGroup(const UT_StringHolder & val) { myGroup = val; }
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getGroup();
647  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
648  return result;
649  }
650  bool getConvex() const { return myConvex; }
651  void setConvex(bool val) { myConvex = val; }
652  bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getConvex();
656  bool result;
657  OP_Utils::evalOpParm(result, thissop, "convex", cookparms.getCookTime(), 0);
658  return result;
659  }
660  bool getUsemaxsides() const { return myUsemaxsides; }
661  void setUsemaxsides(bool val) { myUsemaxsides = val; }
662  bool opUsemaxsides(const SOP_NodeVerb::CookParms &cookparms) const
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getUsemaxsides();
666  bool result;
667  OP_Utils::evalOpParm(result, thissop, "usemaxsides", cookparms.getCookTime(), 0);
668  return result;
669  }
670  int64 getNumsides() const { return myNumsides; }
671  void setNumsides(int64 val) { myNumsides = val; }
672  int64 opNumsides(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getNumsides();
676  int64 result;
677  OP_Utils::evalOpParm(result, thissop, "numsides", cookparms.getCookTime(), 0);
678  return result;
679  }
680  bool getPlanar() const { return myPlanar; }
681  void setPlanar(bool val) { myPlanar = val; }
682  bool opPlanar(const SOP_NodeVerb::CookParms &cookparms) const
683  {
684  SOP_Node *thissop = cookparms.getNode();
685  if (!thissop) return getPlanar();
686  bool result;
687  OP_Utils::evalOpParm(result, thissop, "planar", cookparms.getCookTime(), 0);
688  return result;
689  }
690  fpreal64 getPlantol() const { return myPlantol; }
691  void setPlantol(fpreal64 val) { myPlantol = val; }
693  {
694  SOP_Node *thissop = cookparms.getNode();
695  if (!thissop) return getPlantol();
697  OP_Utils::evalOpParm(result, thissop, "plantol", cookparms.getCookTime(), 0);
698  return result;
699  }
700  bool getNoslivers() const { return myNoslivers; }
701  void setNoslivers(bool val) { myNoslivers = val; }
702  bool opNoslivers(const SOP_NodeVerb::CookParms &cookparms) const
703  {
704  SOP_Node *thissop = cookparms.getNode();
705  if (!thissop) return getNoslivers();
706  bool result;
707  OP_Utils::evalOpParm(result, thissop, "noslivers", cookparms.getCookTime(), 0);
708  return result;
709  }
710  bool getAvoidsmallangles() const { return myAvoidsmallangles; }
711  void setAvoidsmallangles(bool val) { myAvoidsmallangles = val; }
712  bool opAvoidsmallangles(const SOP_NodeVerb::CookParms &cookparms) const
713  {
714  SOP_Node *thissop = cookparms.getNode();
715  if (!thissop) return getAvoidsmallangles();
716  bool result;
717  OP_Utils::evalOpParm(result, thissop, "avoidsmallangles", cookparms.getCookTime(), 0);
718  return result;
719  }
720  bool getSmooth() const { return mySmooth; }
721  void setSmooth(bool val) { mySmooth = val; }
722  bool opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
723  {
724  SOP_Node *thissop = cookparms.getNode();
725  if (!thissop) return getSmooth();
726  bool result;
727  OP_Utils::evalOpParm(result, thissop, "smooth", cookparms.getCookTime(), 0);
728  return result;
729  }
730  UT_Vector2D getWeight() const { return myWeight; }
731  void setWeight(UT_Vector2D val) { myWeight = val; }
733  {
734  SOP_Node *thissop = cookparms.getNode();
735  if (!thissop) return getWeight();
737  OP_Utils::evalOpParm(result, thissop, "weight", cookparms.getCookTime(), 0);
738  return result;
739  }
740  int64 getDivs() const { return myDivs; }
741  void setDivs(int64 val) { myDivs = val; }
742  int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
743  {
744  SOP_Node *thissop = cookparms.getNode();
745  if (!thissop) return getDivs();
746  int64 result;
747  OP_Utils::evalOpParm(result, thissop, "divs", cookparms.getCookTime(), 0);
748  return result;
749  }
750  bool getBrick() const { return myBrick; }
751  void setBrick(bool val) { myBrick = val; }
752  bool opBrick(const SOP_NodeVerb::CookParms &cookparms) const
753  {
754  SOP_Node *thissop = cookparms.getNode();
755  if (!thissop) return getBrick();
756  bool result;
757  OP_Utils::evalOpParm(result, thissop, "brick", cookparms.getCookTime(), 0);
758  return result;
759  }
760  UT_Vector3D getSize() const { return mySize; }
761  void setSize(UT_Vector3D val) { mySize = val; }
763  {
764  SOP_Node *thissop = cookparms.getNode();
765  if (!thissop) return getSize();
767  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
768  return result;
769  }
770  UT_Vector3D getOffset() const { return myOffset; }
771  void setOffset(UT_Vector3D val) { myOffset = val; }
773  {
774  SOP_Node *thissop = cookparms.getNode();
775  if (!thissop) return getOffset();
777  OP_Utils::evalOpParm(result, thissop, "offset", cookparms.getCookTime(), 0);
778  return result;
779  }
780  UT_Vector3D getAngle() const { return myAngle; }
781  void setAngle(UT_Vector3D val) { myAngle = val; }
783  {
784  SOP_Node *thissop = cookparms.getNode();
785  if (!thissop) return getAngle();
787  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
788  return result;
789  }
790  bool getFixsharededges() const { return myFixsharededges; }
791  void setFixsharededges(bool val) { myFixsharededges = val; }
792  bool opFixsharededges(const SOP_NodeVerb::CookParms &cookparms) const
793  {
794  SOP_Node *thissop = cookparms.getNode();
795  if (!thissop) return getFixsharededges();
796  bool result;
797  OP_Utils::evalOpParm(result, thissop, "fixsharededges", cookparms.getCookTime(), 0);
798  return result;
799  }
800  bool getRemovesh() const { return myRemovesh; }
801  void setRemovesh(bool val) { myRemovesh = val; }
802  bool opRemovesh(const SOP_NodeVerb::CookParms &cookparms) const
803  {
804  SOP_Node *thissop = cookparms.getNode();
805  if (!thissop) return getRemovesh();
806  bool result;
807  OP_Utils::evalOpParm(result, thissop, "removesh", cookparms.getCookTime(), 0);
808  return result;
809  }
810  bool getDual() const { return myDual; }
811  void setDual(bool val) { myDual = val; }
812  bool opDual(const SOP_NodeVerb::CookParms &cookparms) const
813  {
814  SOP_Node *thissop = cookparms.getNode();
815  if (!thissop) return getDual();
816  bool result;
817  OP_Utils::evalOpParm(result, thissop, "dual", cookparms.getCookTime(), 0);
818  return result;
819  }
820  const UT_StringHolder & getDualattribstoswap() const { return myDualattribstoswap; }
821  void setDualattribstoswap(const UT_StringHolder & val) { myDualattribstoswap = val; }
823  {
824  SOP_Node *thissop = cookparms.getNode();
825  if (!thissop) return getDualattribstoswap();
827  OP_Utils::evalOpParm(result, thissop, "dualattribstoswap", cookparms.getCookTime(), 0);
828  return result;
829  }
830 
831 private:
832  UT_StringHolder myGroup;
833  bool myConvex;
834  bool myUsemaxsides;
835  int64 myNumsides;
836  bool myPlanar;
837  fpreal64 myPlantol;
838  bool myNoslivers;
839  bool myAvoidsmallangles;
840  bool mySmooth;
841  UT_Vector2D myWeight;
842  int64 myDivs;
843  bool myBrick;
844  UT_Vector3D mySize;
845  UT_Vector3D myOffset;
846  UT_Vector3D myAngle;
847  bool myFixsharededges;
848  bool myRemovesh;
849  bool myDual;
850  UT_StringHolder myDualattribstoswap;
851 
852 };
static void loadData(UT_IStream &is, fpreal64 &v)
type
Definition: core.h:556
bool isParmColorRamp(exint idx) const override
bool getDual() const
void setFixsharededges(bool val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool opRemovesh(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opNoslivers(const SOP_NodeVerb::CookParms &cookparms) const
void setDual(bool val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setSize(UT_Vector3D val)
exint bread(int32 *buffer, exint asize=1)
void setOffset(UT_Vector3D val)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const GLdouble * v
Definition: glcorearb.h:837
bool getSmooth() const
fpreal getTime() const
Definition: OP_Context.h:63
UT_Vector2T< fpreal64 > UT_Vector2D
void loadFromOpSubclass(const LoadParms &loadparms) override
GLsizei const GLfloat * value
Definition: glcorearb.h:824
fpreal64 getPlantol() const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, bool v)
bool opFixsharededges(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE const char * buffer() const
bool opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setBrick(bool val)
UT_Vector3D opOffset(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setConvex(bool val)
void setSmooth(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool opDual(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:622
void setNoslivers(bool val)
void save(std::ostream &os) const
bool getPlanar() const
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:317
UT_Vector2D getWeight() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
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:423
static void saveData(std::ostream &os, UT_Vector2D v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setDualattribstoswap(const UT_StringHolder &val)
UT_Vector3D opAngle(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
void setWeight(UT_Vector2D val)
void setNumsides(int64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
void setRemovesh(bool val)
bool getConvex() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setAngle(UT_Vector3D val)
exint length() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Matrix2D v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
int64 getNumsides() const
bool operator==(const SOP_DivideParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool getUsemaxsides() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool opPlanar(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void setPlantol(fpreal64 val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getDualattribstoswap() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
bool getNoslivers() const
bool getBrick() const
bool getAvoidsmallangles() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:310
fpreal64 opPlantol(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getOffset() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setUsemaxsides(bool val)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool operator!=(const SOP_DivideParms &src) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static int version()
UT_StringHolder opDualattribstoswap(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
UT_Vector3D getSize() const
bool opAvoidsmallangles(const SOP_NodeVerb::CookParms &cookparms) const
int64 getDivs() const
#define SOP_API
Definition: SOP_API.h:10
bool opUsemaxsides(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
static void loadData(UT_IStream &is, int64 &v)
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
int64 opNumsides(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
ParmType getNestParmType(TempIndex fieldnum) const override
void setDivs(int64 val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_Vector3D getAngle() const
GLboolean r
Definition: glcorearb.h:1222
void setPlanar(bool val)
UT_Vector2D opWeight(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setAvoidsmallangles(bool val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
bool getRemovesh() const
void setGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool getFixsharededges() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
const UT_StringHolder & getGroup() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opBrick(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663