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