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