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