HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_TriDivide.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myGroup = ""_UTsh;
32  myConvex = true;
33  myRoot3iter = 0;
34  myDominarea = false;
35  myMinarea = 0.1;
36  myDoprojmatrix = false;
37  myProjmatrix = UT_Matrix4D(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
38  myDoboundingbox = false;
39  mySize = UT_Vector3D(1,1,1);
40  myCenter = UT_Vector3D(0,0,0);
41  myDoexpand = false;
42  myDominedge = false;
43  myMinedge = 0.1;
44  myDonumsplits = false;
45  myNumsplits = 100;
46 
47  }
48 
49  explicit SOP_TriDivideParms(const SOP_TriDivideParms &) = default;
51  SOP_TriDivideParms(SOP_TriDivideParms &&) noexcept = default;
52  SOP_TriDivideParms &operator=(SOP_TriDivideParms &&) noexcept = default;
53 
54  ~SOP_TriDivideParms() override {}
55 
56  bool operator==(const SOP_TriDivideParms &src) const
57  {
58  if (myGroup != src.myGroup) return false;
59  if (myConvex != src.myConvex) return false;
60  if (myRoot3iter != src.myRoot3iter) return false;
61  if (myDominarea != src.myDominarea) return false;
62  if (myMinarea != src.myMinarea) return false;
63  if (myDoprojmatrix != src.myDoprojmatrix) return false;
64  if (myProjmatrix != src.myProjmatrix) return false;
65  if (myDoboundingbox != src.myDoboundingbox) return false;
66  if (mySize != src.mySize) return false;
67  if (myCenter != src.myCenter) return false;
68  if (myDoexpand != src.myDoexpand) return false;
69  if (myDominedge != src.myDominedge) return false;
70  if (myMinedge != src.myMinedge) return false;
71  if (myDonumsplits != src.myDonumsplits) return false;
72  if (myNumsplits != src.myNumsplits) return false;
73 
74  return true;
75  }
76  bool operator!=(const SOP_TriDivideParms &src) const
77  {
78  return !operator==(src);
79  }
80 
81 
82 
83  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
84  {
85  myGroup = ""_UTsh;
86  if (true)
87  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
88  myConvex = true;
89  if (true)
90  graph->evalOpParm(myConvex, nodeidx, "convex", time, 0);
91  myRoot3iter = 0;
92  if (true)
93  graph->evalOpParm(myRoot3iter, nodeidx, "root3iter", time, 0);
94  myDominarea = false;
95  if (true)
96  graph->evalOpParm(myDominarea, nodeidx, "dominarea", time, 0);
97  myMinarea = 0.1;
98  if (true && ( (true&&!(((getDominarea()==0)))) ) )
99  graph->evalOpParm(myMinarea, nodeidx, "minarea", time, 0);
100  myDoprojmatrix = false;
101  if (true && ( (true&&!(((getDominarea()==0)))) ) )
102  graph->evalOpParm(myDoprojmatrix, nodeidx, "doprojmatrix", time, 0);
103  myProjmatrix = UT_Matrix4D(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
104  if (true && ( (true&&!(((getDoprojmatrix()==0))||((getDominarea()==0)))) ) )
105  graph->evalOpParm(myProjmatrix, nodeidx, "projmatrix", time, 0);
106  myDoboundingbox = false;
107  if (true && ( (true&&!(((getDominarea()==0)))) ) )
108  graph->evalOpParm(myDoboundingbox, nodeidx, "doboundingbox", time, 0);
109  mySize = UT_Vector3D(1,1,1);
110  if (true && ( (true&&!(((getDoboundingbox()==0))||((getDominarea()==0)))) ) )
111  graph->evalOpParm(mySize, nodeidx, "size", time, 0);
112  myCenter = UT_Vector3D(0,0,0);
113  if (true && ( (true&&!(((getDoboundingbox()==0))||((getDominarea()==0)))) ) )
114  graph->evalOpParm(myCenter, nodeidx, "t", time, 0);
115  myDoexpand = false;
116  if (true && ( (true&&!(((getDominarea()==0)))) ) )
117  graph->evalOpParm(myDoexpand, nodeidx, "doexpand", time, 0);
118  myDominedge = false;
119  if (true)
120  graph->evalOpParm(myDominedge, nodeidx, "dominedge", time, 0);
121  myMinedge = 0.1;
122  if (true && ( (true&&!(((getDominedge()==0)))) ) )
123  graph->evalOpParm(myMinedge, nodeidx, "minedge", time, 0);
124  myDonumsplits = false;
125  if (true)
126  graph->evalOpParm(myDonumsplits, nodeidx, "donumsplits", time, 0);
127  myNumsplits = 100;
128  if (true && ( (true&&!(((getDonumsplits()==0)))) ) )
129  graph->evalOpParm(myNumsplits, nodeidx, "numsplits", time, 0);
130 
131  }
132 
133 
134  void loadFromOpSubclass(const LoadParms &loadparms) override
135  {
136  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
137  }
138 
139 
140  void copyFrom(const OP_NodeParms *src) override
141  {
142  *this = *((const SOP_TriDivideParms *)src);
143  }
144 
145  template <typename T>
146  void
147  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
148  {
149  if (idx.size() < 1)
150  return;
151  UT_ASSERT(idx.size() == instance.size()+1);
152  if (idx.size() != instance.size()+1)
153  return;
154  switch (idx[0])
155  {
156  case 0:
157  coerceValue(value, myGroup);
158  break;
159  case 1:
160  coerceValue(value, myConvex);
161  break;
162  case 2:
163  coerceValue(value, myRoot3iter);
164  break;
165  case 3:
166  coerceValue(value, myDominarea);
167  break;
168  case 4:
169  coerceValue(value, myMinarea);
170  break;
171  case 5:
172  coerceValue(value, myDoprojmatrix);
173  break;
174  case 6:
175  coerceValue(value, myProjmatrix);
176  break;
177  case 7:
178  coerceValue(value, myDoboundingbox);
179  break;
180  case 8:
181  coerceValue(value, mySize);
182  break;
183  case 9:
184  coerceValue(value, myCenter);
185  break;
186  case 10:
187  coerceValue(value, myDoexpand);
188  break;
189  case 11:
190  coerceValue(value, myDominedge);
191  break;
192  case 12:
193  coerceValue(value, myMinedge);
194  break;
195  case 13:
196  coerceValue(value, myDonumsplits);
197  break;
198  case 14:
199  coerceValue(value, myNumsplits);
200  break;
201 
202  }
203  }
204 
205  bool isParmColorRamp(exint idx) const override
206  {
207  switch (idx)
208  {
209 
210  }
211  return false;
212  }
213 
214  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
235  { doGetParmValue(idx, instance, value); }
236 
237  template <typename T>
238  void
239  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
240  {
241  if (idx.size() < 1)
242  return;
243  UT_ASSERT(idx.size() == instance.size()+1);
244  if (idx.size() != instance.size()+1)
245  return;
246  switch (idx[0])
247  {
248  case 0:
249  coerceValue(myGroup, ( ( value ) ));
250  break;
251  case 1:
252  coerceValue(myConvex, ( ( value ) ));
253  break;
254  case 2:
255  coerceValue(myRoot3iter, clampMinValue(0, ( value ) ));
256  break;
257  case 3:
258  coerceValue(myDominarea, ( ( value ) ));
259  break;
260  case 4:
261  coerceValue(myMinarea, clampMinValue(0, ( value ) ));
262  break;
263  case 5:
264  coerceValue(myDoprojmatrix, ( ( value ) ));
265  break;
266  case 6:
267  coerceValue(myProjmatrix, ( ( value ) ));
268  break;
269  case 7:
270  coerceValue(myDoboundingbox, ( ( value ) ));
271  break;
272  case 8:
273  coerceValue(mySize, ( ( value ) ));
274  break;
275  case 9:
276  coerceValue(myCenter, ( ( value ) ));
277  break;
278  case 10:
279  coerceValue(myDoexpand, ( ( value ) ));
280  break;
281  case 11:
282  coerceValue(myDominedge, ( ( value ) ));
283  break;
284  case 12:
285  coerceValue(myMinedge, clampMinValue(0, ( value ) ));
286  break;
287  case 13:
288  coerceValue(myDonumsplits, ( ( value ) ));
289  break;
290  case 14:
291  coerceValue(myNumsplits, clampMinValue(0, ( value ) ));
292  break;
293 
294  }
295  }
296 
297  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
318  { doSetParmValue(idx, instance, value); }
319 
320  exint getNestNumParms(TempIndex idx) const override
321  {
322  if (idx.size() == 0)
323  return 15;
324  switch (idx[0])
325  {
326 
327  }
328  // Invalid
329  return 0;
330  }
331 
332  const char *getNestParmName(TempIndex fieldnum) const override
333  {
334  if (fieldnum.size() < 1)
335  return 0;
336  switch (fieldnum[0])
337  {
338  case 0:
339  return "group";
340  case 1:
341  return "convex";
342  case 2:
343  return "root3iter";
344  case 3:
345  return "dominarea";
346  case 4:
347  return "minarea";
348  case 5:
349  return "doprojmatrix";
350  case 6:
351  return "projmatrix";
352  case 7:
353  return "doboundingbox";
354  case 8:
355  return "size";
356  case 9:
357  return "t";
358  case 10:
359  return "doexpand";
360  case 11:
361  return "dominedge";
362  case 12:
363  return "minedge";
364  case 13:
365  return "donumsplits";
366  case 14:
367  return "numsplits";
368 
369  }
370  return 0;
371  }
372 
373  ParmType getNestParmType(TempIndex fieldnum) const override
374  {
375  if (fieldnum.size() < 1)
376  return PARM_UNSUPPORTED;
377  switch (fieldnum[0])
378  {
379  case 0:
380  return PARM_STRING;
381  case 1:
382  return PARM_INTEGER;
383  case 2:
384  return PARM_INTEGER;
385  case 3:
386  return PARM_INTEGER;
387  case 4:
388  return PARM_FLOAT;
389  case 5:
390  return PARM_INTEGER;
391  case 6:
392  return PARM_MATRIX4;
393  case 7:
394  return PARM_INTEGER;
395  case 8:
396  return PARM_VECTOR3;
397  case 9:
398  return PARM_VECTOR3;
399  case 10:
400  return PARM_INTEGER;
401  case 11:
402  return PARM_INTEGER;
403  case 12:
404  return PARM_FLOAT;
405  case 13:
406  return PARM_INTEGER;
407  case 14:
408  return PARM_INTEGER;
409 
410  }
411  return PARM_UNSUPPORTED;
412  }
413 
414  // Boiler plate to load individual types.
415  static void loadData(UT_IStream &is, int64 &v)
416  { is.bread(&v, 1); }
417  static void loadData(UT_IStream &is, bool &v)
418  { int64 iv; is.bread(&iv, 1); v = iv; }
419  static void loadData(UT_IStream &is, fpreal64 &v)
420  { is.bread<fpreal64>(&v, 1); }
421  static void loadData(UT_IStream &is, UT_Vector2D &v)
422  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
423  static void loadData(UT_IStream &is, UT_Vector3D &v)
424  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
425  is.bread<fpreal64>(&v.z(), 1); }
426  static void loadData(UT_IStream &is, UT_Vector4D &v)
427  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
428  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
429  static void loadData(UT_IStream &is, UT_Matrix2D &v)
430  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
431  static void loadData(UT_IStream &is, UT_Matrix3D &v)
432  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
433  static void loadData(UT_IStream &is, UT_Matrix4D &v)
434  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
435  static void loadData(UT_IStream &is, UT_Vector2I &v)
436  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
437  static void loadData(UT_IStream &is, UT_Vector3I &v)
438  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
439  is.bread<int64>(&v.z(), 1); }
440  static void loadData(UT_IStream &is, UT_Vector4I &v)
441  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
442  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
444  { is.bread(v); }
446  { UT_StringHolder rampdata;
447  loadData(is, rampdata);
448  if (rampdata.isstring())
449  {
450  v.reset(new UT_Ramp());
451  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
452  v->load(istr);
453  }
454  else v.reset();
455  }
458  loadData(is, data);
459  if (data.isstring())
460  {
461  // Find the data type.
462  const char *colon = UT_StringWrap(data).findChar(':');
463  if (colon)
464  {
465  int typelen = colon - data.buffer();
467  type.strncpy(data.buffer(), typelen);
468  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
469 
470  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
471  }
472  }
473  else v.reset();
474  }
475 
476  static void saveData(std::ostream &os, int64 v)
477  { UTwrite(os, &v); }
478  static void saveData(std::ostream &os, bool v)
479  { int64 iv = v; UTwrite(os, &iv); }
480  static void saveData(std::ostream &os, fpreal64 v)
481  { UTwrite<fpreal64>(os, &v); }
482  static void saveData(std::ostream &os, UT_Vector2D v)
483  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
484  static void saveData(std::ostream &os, UT_Vector3D v)
485  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
486  UTwrite<fpreal64>(os, &v.z()); }
487  static void saveData(std::ostream &os, UT_Vector4D v)
488  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
489  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
490  static void saveData(std::ostream &os, UT_Matrix2D v)
492  static void saveData(std::ostream &os, UT_Matrix3D v)
494  static void saveData(std::ostream &os, UT_Matrix4D v)
496  static void saveData(std::ostream &os, UT_StringHolder s)
497  { UT_StringWrap(s).saveBinary(os); }
498  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
500  UT_OStringStream ostr;
501  if (s) s->save(ostr);
502  result = ostr.str();
503  saveData(os, result);
504  }
505  static void saveData(std::ostream &os, PRM_DataItemHandle s)
507  UT_OStringStream ostr;
508  if (s)
509  {
510  ostr << s->getDataTypeToken();
511  ostr << ":";
512  s->saveBinary(ostr);
513  }
514  result = ostr.str();
515  saveData(os, result);
516  }
517 
518 
519  void save(std::ostream &os) const
520  {
521  int32 v = version();
522  UTwrite(os, &v);
523  saveData(os, myGroup);
524  saveData(os, myConvex);
525  saveData(os, myRoot3iter);
526  saveData(os, myDominarea);
527  saveData(os, myMinarea);
528  saveData(os, myDoprojmatrix);
529  saveData(os, myProjmatrix);
530  saveData(os, myDoboundingbox);
531  saveData(os, mySize);
532  saveData(os, myCenter);
533  saveData(os, myDoexpand);
534  saveData(os, myDominedge);
535  saveData(os, myMinedge);
536  saveData(os, myDonumsplits);
537  saveData(os, myNumsplits);
538 
539  }
540 
541  bool load(UT_IStream &is)
542  {
543  int32 v;
544  is.bread(&v, 1);
545  if (version() != v)
546  {
547  // Fail incompatible versions
548  return false;
549  }
550  loadData(is, myGroup);
551  loadData(is, myConvex);
552  loadData(is, myRoot3iter);
553  loadData(is, myDominarea);
554  loadData(is, myMinarea);
555  loadData(is, myDoprojmatrix);
556  loadData(is, myProjmatrix);
557  loadData(is, myDoboundingbox);
558  loadData(is, mySize);
559  loadData(is, myCenter);
560  loadData(is, myDoexpand);
561  loadData(is, myDominedge);
562  loadData(is, myMinedge);
563  loadData(is, myDonumsplits);
564  loadData(is, myNumsplits);
565 
566  return true;
567  }
568 
569  const UT_StringHolder & getGroup() const { return myGroup; }
570  void setGroup(const UT_StringHolder & val) { myGroup = val; }
572  {
573  SOP_Node *thissop = cookparms.getNode();
574  if (!thissop) return getGroup();
576  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
577  return result;
578  }
579  bool getConvex() const { return myConvex; }
580  void setConvex(bool val) { myConvex = val; }
581  bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
582  {
583  SOP_Node *thissop = cookparms.getNode();
584  if (!thissop) return getConvex();
585  bool result;
586  OP_Utils::evalOpParm(result, thissop, "convex", cookparms.getCookTime(), 0);
587  return result;
588  }
589  int64 getRoot3iter() const { return myRoot3iter; }
590  void setRoot3iter(int64 val) { myRoot3iter = val; }
591  int64 opRoot3iter(const SOP_NodeVerb::CookParms &cookparms) const
592  {
593  SOP_Node *thissop = cookparms.getNode();
594  if (!thissop) return getRoot3iter();
595  int64 result;
596  OP_Utils::evalOpParm(result, thissop, "root3iter", cookparms.getCookTime(), 0);
597  return result;
598  }
599  bool getDominarea() const { return myDominarea; }
600  void setDominarea(bool val) { myDominarea = val; }
601  bool opDominarea(const SOP_NodeVerb::CookParms &cookparms) const
602  {
603  SOP_Node *thissop = cookparms.getNode();
604  if (!thissop) return getDominarea();
605  bool result;
606  OP_Utils::evalOpParm(result, thissop, "dominarea", cookparms.getCookTime(), 0);
607  return result;
608  }
609  fpreal64 getMinarea() const { return myMinarea; }
610  void setMinarea(fpreal64 val) { myMinarea = val; }
612  {
613  SOP_Node *thissop = cookparms.getNode();
614  if (!thissop) return getMinarea();
616  OP_Utils::evalOpParm(result, thissop, "minarea", cookparms.getCookTime(), 0);
617  return result;
618  }
619  bool getDoprojmatrix() const { return myDoprojmatrix; }
620  void setDoprojmatrix(bool val) { myDoprojmatrix = val; }
621  bool opDoprojmatrix(const SOP_NodeVerb::CookParms &cookparms) const
622  {
623  SOP_Node *thissop = cookparms.getNode();
624  if (!thissop) return getDoprojmatrix();
625  bool result;
626  OP_Utils::evalOpParm(result, thissop, "doprojmatrix", cookparms.getCookTime(), 0);
627  return result;
628  }
629  UT_Matrix4D getProjmatrix() const { return myProjmatrix; }
630  void setProjmatrix(UT_Matrix4D val) { myProjmatrix = val; }
632  {
633  SOP_Node *thissop = cookparms.getNode();
634  if (!thissop) return getProjmatrix();
636  OP_Utils::evalOpParm(result, thissop, "projmatrix", cookparms.getCookTime(), 0);
637  return result;
638  }
639  bool getDoboundingbox() const { return myDoboundingbox; }
640  void setDoboundingbox(bool val) { myDoboundingbox = val; }
641  bool opDoboundingbox(const SOP_NodeVerb::CookParms &cookparms) const
642  {
643  SOP_Node *thissop = cookparms.getNode();
644  if (!thissop) return getDoboundingbox();
645  bool result;
646  OP_Utils::evalOpParm(result, thissop, "doboundingbox", cookparms.getCookTime(), 0);
647  return result;
648  }
649  UT_Vector3D getSize() const { return mySize; }
650  void setSize(UT_Vector3D val) { mySize = val; }
652  {
653  SOP_Node *thissop = cookparms.getNode();
654  if (!thissop) return getSize();
656  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
657  return result;
658  }
659  UT_Vector3D getCenter() const { return myCenter; }
660  void setCenter(UT_Vector3D val) { myCenter = val; }
662  {
663  SOP_Node *thissop = cookparms.getNode();
664  if (!thissop) return getCenter();
666  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
667  return result;
668  }
669  bool getDoexpand() const { return myDoexpand; }
670  void setDoexpand(bool val) { myDoexpand = val; }
671  bool opDoexpand(const SOP_NodeVerb::CookParms &cookparms) const
672  {
673  SOP_Node *thissop = cookparms.getNode();
674  if (!thissop) return getDoexpand();
675  bool result;
676  OP_Utils::evalOpParm(result, thissop, "doexpand", cookparms.getCookTime(), 0);
677  return result;
678  }
679  bool getDominedge() const { return myDominedge; }
680  void setDominedge(bool val) { myDominedge = val; }
681  bool opDominedge(const SOP_NodeVerb::CookParms &cookparms) const
682  {
683  SOP_Node *thissop = cookparms.getNode();
684  if (!thissop) return getDominedge();
685  bool result;
686  OP_Utils::evalOpParm(result, thissop, "dominedge", cookparms.getCookTime(), 0);
687  return result;
688  }
689  fpreal64 getMinedge() const { return myMinedge; }
690  void setMinedge(fpreal64 val) { myMinedge = val; }
692  {
693  SOP_Node *thissop = cookparms.getNode();
694  if (!thissop) return getMinedge();
696  OP_Utils::evalOpParm(result, thissop, "minedge", cookparms.getCookTime(), 0);
697  return result;
698  }
699  bool getDonumsplits() const { return myDonumsplits; }
700  void setDonumsplits(bool val) { myDonumsplits = val; }
701  bool opDonumsplits(const SOP_NodeVerb::CookParms &cookparms) const
702  {
703  SOP_Node *thissop = cookparms.getNode();
704  if (!thissop) return getDonumsplits();
705  bool result;
706  OP_Utils::evalOpParm(result, thissop, "donumsplits", cookparms.getCookTime(), 0);
707  return result;
708  }
709  int64 getNumsplits() const { return myNumsplits; }
710  void setNumsplits(int64 val) { myNumsplits = val; }
711  int64 opNumsplits(const SOP_NodeVerb::CookParms &cookparms) const
712  {
713  SOP_Node *thissop = cookparms.getNode();
714  if (!thissop) return getNumsplits();
715  int64 result;
716  OP_Utils::evalOpParm(result, thissop, "numsplits", cookparms.getCookTime(), 0);
717  return result;
718  }
719 
720 private:
721  UT_StringHolder myGroup;
722  bool myConvex;
723  int64 myRoot3iter;
724  bool myDominarea;
725  fpreal64 myMinarea;
726  bool myDoprojmatrix;
727  UT_Matrix4D myProjmatrix;
728  bool myDoboundingbox;
729  UT_Vector3D mySize;
730  UT_Vector3D myCenter;
731  bool myDoexpand;
732  bool myDominedge;
733  fpreal64 myMinedge;
734  bool myDonumsplits;
735  int64 myNumsplits;
736 
737 };
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, bool v)
void save(std::ostream &os) const
UT_Matrix4T< fpreal64 > UT_Matrix4D
static void saveData(std::ostream &os, int64 v)
const char * getNestParmName(TempIndex fieldnum) const override
void setDominarea(bool val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setDonumsplits(bool val)
int64 getNumsplits() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setDoprojmatrix(bool val)
bool opDonumsplits(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getCenter() const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
fpreal64 getMinarea() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void saveData(std::ostream &os, UT_Vector4D v)
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void setSize(UT_Vector3D val)
UT_Vector3D getSize() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
An output stream object that owns its own string buffer storage.
bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:613
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_Matrix2D v)
void setDoboundingbox(bool val)
bool load(UT_IStream &is)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool getDoprojmatrix() const
double fpreal64
Definition: SYS_Types.h:201
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool getDoboundingbox() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setMinarea(fpreal64 val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
int64 opRoot3iter(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, bool &v)
void setDoexpand(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Matrix4D getProjmatrix() const
exint length() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
UT_Vector3D opCenter(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void copyFrom(const OP_NodeParms *src) override
bool opDominedge(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
void setGroup(const UT_StringHolder &val)
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 getMinedge() const
bool getDominedge() const
void setMinedge(fpreal64 val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setRoot3iter(int64 val)
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Matrix4D opProjmatrix(const SOP_NodeVerb::CookParms &cookparms) const
bool opDoprojmatrix(const SOP_NodeVerb::CookParms &cookparms) const
bool getDonumsplits() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setDominedge(bool val)
void setProjmatrix(UT_Matrix4D val)
bool isParmColorRamp(exint idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void saveData(std::ostream &os, fpreal64 v)
GT_API const UT_StringHolder version
bool operator==(const SOP_TriDivideParms &src) const
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
bool operator!=(const SOP_TriDivideParms &src) const
fpreal64 fpreal
Definition: SYS_Types.h:277
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool getDominarea() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
bool opDominarea(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, fpreal64 &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
int64 opNumsplits(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setConvex(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
fpreal64 opMinedge(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:1059
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
void setCenter(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opDoboundingbox(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void setNumsplits(int64 val)
int64 getRoot3iter() const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
bool opDoexpand(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opMinarea(const SOP_NodeVerb::CookParms &cookparms) const