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