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 <OP/OP_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 
75  if (baseGetSignature() != src.baseGetSignature()) return false;
76 
77  return true;
78  }
79  bool operator!=(const SOP_TriDivideParms &src) const
80  {
81  return !operator==(src);
82  }
83 
84 
85 
86  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
87  {
88  myGroup = ""_UTsh;
89  if (true)
90  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
91  myConvex = true;
92  if (true)
93  graph->evalOpParm(myConvex, nodeidx, "convex", time, graph->isDirect()?nullptr:depnode);
94  myRoot3iter = 0;
95  if (true)
96  graph->evalOpParm(myRoot3iter, nodeidx, "root3iter", time, graph->isDirect()?nullptr:depnode);
97  myDominarea = false;
98  if (true)
99  graph->evalOpParm(myDominarea, nodeidx, "dominarea", time, graph->isDirect()?nullptr:depnode);
100  myMinarea = 0.1;
101  if (true && ( (true&&!(((getDominarea()==0)))) ) )
102  graph->evalOpParm(myMinarea, nodeidx, "minarea", time, graph->isDirect()?nullptr:depnode);
103  myDoprojmatrix = false;
104  if (true && ( (true&&!(((getDominarea()==0)))) ) )
105  graph->evalOpParm(myDoprojmatrix, nodeidx, "doprojmatrix", time, graph->isDirect()?nullptr:depnode);
106  myProjmatrix = UT_Matrix4D(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
107  if (true && ( (true&&!(((getDoprojmatrix()==0))||((getDominarea()==0)))) ) )
108  graph->evalOpParm(myProjmatrix, nodeidx, "projmatrix", time, graph->isDirect()?nullptr:depnode);
109  myDoboundingbox = false;
110  if (true && ( (true&&!(((getDominarea()==0)))) ) )
111  graph->evalOpParm(myDoboundingbox, nodeidx, "doboundingbox", time, graph->isDirect()?nullptr:depnode);
112  mySize = UT_Vector3D(1,1,1);
113  if (true && ( (true&&!(((getDoboundingbox()==0))||((getDominarea()==0)))) ) )
114  graph->evalOpParm(mySize, nodeidx, "size", time, graph->isDirect()?nullptr:depnode);
115  myCenter = UT_Vector3D(0,0,0);
116  if (true && ( (true&&!(((getDoboundingbox()==0))||((getDominarea()==0)))) ) )
117  graph->evalOpParm(myCenter, nodeidx, "t", time, graph->isDirect()?nullptr:depnode);
118  myDoexpand = false;
119  if (true && ( (true&&!(((getDominarea()==0)))) ) )
120  graph->evalOpParm(myDoexpand, nodeidx, "doexpand", time, graph->isDirect()?nullptr:depnode);
121  myDominedge = false;
122  if (true)
123  graph->evalOpParm(myDominedge, nodeidx, "dominedge", time, graph->isDirect()?nullptr:depnode);
124  myMinedge = 0.1;
125  if (true && ( (true&&!(((getDominedge()==0)))) ) )
126  graph->evalOpParm(myMinedge, nodeidx, "minedge", time, graph->isDirect()?nullptr:depnode);
127  myDonumsplits = false;
128  if (true)
129  graph->evalOpParm(myDonumsplits, nodeidx, "donumsplits", time, graph->isDirect()?nullptr:depnode);
130  myNumsplits = 100;
131  if (true && ( (true&&!(((getDonumsplits()==0)))) ) )
132  graph->evalOpParm(myNumsplits, nodeidx, "numsplits", time, graph->isDirect()?nullptr:depnode);
133 
134  }
135 
136 
137  void loadFromOpSubclass(const LoadParms &loadparms) override
138  {
139  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
140  }
141 
142 
143  void copyFrom(const OP_NodeParms *src) override
144  {
145  *this = *((const SOP_TriDivideParms *)src);
146  }
147 
148  template <typename T>
149  void
150  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
151  {
152  if (idx.size() < 1)
153  return;
154  UT_ASSERT(idx.size() == instance.size()+1);
155  if (idx.size() != instance.size()+1)
156  return;
157  switch (idx[0])
158  {
159  case 0:
160  coerceValue(value, myGroup);
161  break;
162  case 1:
163  coerceValue(value, myConvex);
164  break;
165  case 2:
166  coerceValue(value, myRoot3iter);
167  break;
168  case 3:
169  coerceValue(value, myDominarea);
170  break;
171  case 4:
172  coerceValue(value, myMinarea);
173  break;
174  case 5:
175  coerceValue(value, myDoprojmatrix);
176  break;
177  case 6:
178  coerceValue(value, myProjmatrix);
179  break;
180  case 7:
181  coerceValue(value, myDoboundingbox);
182  break;
183  case 8:
184  coerceValue(value, mySize);
185  break;
186  case 9:
187  coerceValue(value, myCenter);
188  break;
189  case 10:
190  coerceValue(value, myDoexpand);
191  break;
192  case 11:
193  coerceValue(value, myDominedge);
194  break;
195  case 12:
196  coerceValue(value, myMinedge);
197  break;
198  case 13:
199  coerceValue(value, myDonumsplits);
200  break;
201  case 14:
202  coerceValue(value, myNumsplits);
203  break;
204 
205  }
206  }
207 
208  bool isParmColorRamp(exint idx) const override
209  {
210  switch (idx)
211  {
212 
213  }
214  return false;
215  }
216 
217  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
218  { doGetParmValue(idx, instance, value); }
219  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
220  { doGetParmValue(idx, instance, value); }
221  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
222  { doGetParmValue(idx, instance, value); }
223  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
238  { doGetParmValue(idx, instance, value); }
239 
240  template <typename T>
241  void
242  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
243  {
244  if (idx.size() < 1)
245  return;
246  UT_ASSERT(idx.size() == instance.size()+1);
247  if (idx.size() != instance.size()+1)
248  return;
249  switch (idx[0])
250  {
251  case 0:
252  coerceValue(myGroup, ( ( value ) ));
253  break;
254  case 1:
255  coerceValue(myConvex, ( ( value ) ));
256  break;
257  case 2:
258  coerceValue(myRoot3iter, clampMinValue(0, ( value ) ));
259  break;
260  case 3:
261  coerceValue(myDominarea, ( ( value ) ));
262  break;
263  case 4:
264  coerceValue(myMinarea, clampMinValue(0, ( value ) ));
265  break;
266  case 5:
267  coerceValue(myDoprojmatrix, ( ( value ) ));
268  break;
269  case 6:
270  coerceValue(myProjmatrix, ( ( value ) ));
271  break;
272  case 7:
273  coerceValue(myDoboundingbox, ( ( value ) ));
274  break;
275  case 8:
276  coerceValue(mySize, ( ( value ) ));
277  break;
278  case 9:
279  coerceValue(myCenter, ( ( value ) ));
280  break;
281  case 10:
282  coerceValue(myDoexpand, ( ( value ) ));
283  break;
284  case 11:
285  coerceValue(myDominedge, ( ( value ) ));
286  break;
287  case 12:
288  coerceValue(myMinedge, clampMinValue(0, ( value ) ));
289  break;
290  case 13:
291  coerceValue(myDonumsplits, ( ( value ) ));
292  break;
293  case 14:
294  coerceValue(myNumsplits, clampMinValue(0, ( value ) ));
295  break;
296 
297  }
298  }
299 
300  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
321  { doSetParmValue(idx, instance, value); }
322 
323  exint getNestNumParms(TempIndex idx) const override
324  {
325  if (idx.size() == 0)
326  return 15;
327  switch (idx[0])
328  {
329 
330  }
331  // Invalid
332  return 0;
333  }
334 
335  const char *getNestParmName(TempIndex fieldnum) const override
336  {
337  if (fieldnum.size() < 1)
338  return 0;
339  switch (fieldnum[0])
340  {
341  case 0:
342  return "group";
343  case 1:
344  return "convex";
345  case 2:
346  return "root3iter";
347  case 3:
348  return "dominarea";
349  case 4:
350  return "minarea";
351  case 5:
352  return "doprojmatrix";
353  case 6:
354  return "projmatrix";
355  case 7:
356  return "doboundingbox";
357  case 8:
358  return "size";
359  case 9:
360  return "t";
361  case 10:
362  return "doexpand";
363  case 11:
364  return "dominedge";
365  case 12:
366  return "minedge";
367  case 13:
368  return "donumsplits";
369  case 14:
370  return "numsplits";
371 
372  }
373  return 0;
374  }
375 
376  ParmType getNestParmType(TempIndex fieldnum) const override
377  {
378  if (fieldnum.size() < 1)
379  return PARM_UNSUPPORTED;
380  switch (fieldnum[0])
381  {
382  case 0:
383  return PARM_STRING;
384  case 1:
385  return PARM_INTEGER;
386  case 2:
387  return PARM_INTEGER;
388  case 3:
389  return PARM_INTEGER;
390  case 4:
391  return PARM_FLOAT;
392  case 5:
393  return PARM_INTEGER;
394  case 6:
395  return PARM_MATRIX4;
396  case 7:
397  return PARM_INTEGER;
398  case 8:
399  return PARM_VECTOR3;
400  case 9:
401  return PARM_VECTOR3;
402  case 10:
403  return PARM_INTEGER;
404  case 11:
405  return PARM_INTEGER;
406  case 12:
407  return PARM_FLOAT;
408  case 13:
409  return PARM_INTEGER;
410  case 14:
411  return PARM_INTEGER;
412 
413  }
414  return PARM_UNSUPPORTED;
415  }
416 
417  // Boiler plate to load individual types.
418  static void loadData(UT_IStream &is, int64 &v)
419  { is.bread(&v, 1); }
420  static void loadData(UT_IStream &is, bool &v)
421  { int64 iv; is.bread(&iv, 1); v = iv; }
422  static void loadData(UT_IStream &is, fpreal64 &v)
423  { is.bread<fpreal64>(&v, 1); }
424  static void loadData(UT_IStream &is, UT_Vector2D &v)
425  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
426  static void loadData(UT_IStream &is, UT_Vector3D &v)
427  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
428  is.bread<fpreal64>(&v.z(), 1); }
429  static void loadData(UT_IStream &is, UT_Vector4D &v)
430  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
431  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
432  static void loadData(UT_IStream &is, UT_Matrix2D &v)
433  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
434  static void loadData(UT_IStream &is, UT_Matrix3D &v)
435  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
436  static void loadData(UT_IStream &is, UT_Matrix4D &v)
437  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
438  static void loadData(UT_IStream &is, UT_Vector2I &v)
439  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
440  static void loadData(UT_IStream &is, UT_Vector3I &v)
441  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
442  is.bread<int64>(&v.z(), 1); }
443  static void loadData(UT_IStream &is, UT_Vector4I &v)
444  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
445  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
447  { is.bread(v); }
449  { UT_StringHolder rampdata;
450  loadData(is, rampdata);
451  if (rampdata.isstring())
452  {
453  v.reset(new UT_Ramp());
454  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
455  v->load(istr);
456  }
457  else v.reset();
458  }
461  loadData(is, data);
462  if (data.isstring())
463  {
464  // Find the data type.
465  const char *colon = UT_StringWrap(data).findChar(':');
466  if (colon)
467  {
468  int typelen = colon - data.buffer();
470  type.strncpy(data.buffer(), typelen);
471  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
472 
473  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
474  }
475  }
476  else v.reset();
477  }
478 
479  static void saveData(std::ostream &os, int64 v)
480  { UTwrite(os, &v); }
481  static void saveData(std::ostream &os, bool v)
482  { int64 iv = v; UTwrite(os, &iv); }
483  static void saveData(std::ostream &os, fpreal64 v)
484  { UTwrite<fpreal64>(os, &v); }
485  static void saveData(std::ostream &os, UT_Vector2D v)
486  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
487  static void saveData(std::ostream &os, UT_Vector3D v)
488  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
489  UTwrite<fpreal64>(os, &v.z()); }
490  static void saveData(std::ostream &os, UT_Vector4D v)
491  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
492  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
493  static void saveData(std::ostream &os, UT_Matrix2D v)
495  static void saveData(std::ostream &os, UT_Matrix3D v)
497  static void saveData(std::ostream &os, UT_Matrix4D v)
499  static void saveData(std::ostream &os, UT_StringHolder s)
500  { UT_StringWrap(s).saveBinary(os); }
501  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
503  UT_OStringStream ostr;
504  if (s) s->save(ostr);
505  result = ostr.str();
506  saveData(os, result);
507  }
508  static void saveData(std::ostream &os, PRM_DataItemHandle s)
510  UT_OStringStream ostr;
511  if (s)
512  {
513  ostr << s->getDataTypeToken();
514  ostr << ":";
515  s->saveBinary(ostr);
516  }
517  result = ostr.str();
518  saveData(os, result);
519  }
520 
521 
522  void save(std::ostream &os) const
523  {
524  int32 v = version();
525  UTwrite(os, &v);
526  saveData(os, myGroup);
527  saveData(os, myConvex);
528  saveData(os, myRoot3iter);
529  saveData(os, myDominarea);
530  saveData(os, myMinarea);
531  saveData(os, myDoprojmatrix);
532  saveData(os, myProjmatrix);
533  saveData(os, myDoboundingbox);
534  saveData(os, mySize);
535  saveData(os, myCenter);
536  saveData(os, myDoexpand);
537  saveData(os, myDominedge);
538  saveData(os, myMinedge);
539  saveData(os, myDonumsplits);
540  saveData(os, myNumsplits);
541 
542  }
543 
544  bool load(UT_IStream &is)
545  {
546  int32 v;
547  is.bread(&v, 1);
548  if (version() != v)
549  {
550  // Fail incompatible versions
551  return false;
552  }
553  loadData(is, myGroup);
554  loadData(is, myConvex);
555  loadData(is, myRoot3iter);
556  loadData(is, myDominarea);
557  loadData(is, myMinarea);
558  loadData(is, myDoprojmatrix);
559  loadData(is, myProjmatrix);
560  loadData(is, myDoboundingbox);
561  loadData(is, mySize);
562  loadData(is, myCenter);
563  loadData(is, myDoexpand);
564  loadData(is, myDominedge);
565  loadData(is, myMinedge);
566  loadData(is, myDonumsplits);
567  loadData(is, myNumsplits);
568 
569  return true;
570  }
571 
572  const UT_StringHolder & getGroup() const { return myGroup; }
573  void setGroup(const UT_StringHolder & val) { myGroup = val; }
575  {
576  SOP_Node *thissop = cookparms.getNode();
577  if (!thissop) return getGroup();
579  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
580  return result;
581  }
582  bool getConvex() const { return myConvex; }
583  void setConvex(bool val) { myConvex = val; }
584  bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
585  {
586  SOP_Node *thissop = cookparms.getNode();
587  if (!thissop) return getConvex();
588  bool result;
589  OP_Utils::evalOpParm(result, thissop, "convex", cookparms.getCookTime(), 0);
590  return result;
591  }
592  int64 getRoot3iter() const { return myRoot3iter; }
593  void setRoot3iter(int64 val) { myRoot3iter = val; }
594  int64 opRoot3iter(const SOP_NodeVerb::CookParms &cookparms) const
595  {
596  SOP_Node *thissop = cookparms.getNode();
597  if (!thissop) return getRoot3iter();
598  int64 result;
599  OP_Utils::evalOpParm(result, thissop, "root3iter", cookparms.getCookTime(), 0);
600  return result;
601  }
602  bool getDominarea() const { return myDominarea; }
603  void setDominarea(bool val) { myDominarea = val; }
604  bool opDominarea(const SOP_NodeVerb::CookParms &cookparms) const
605  {
606  SOP_Node *thissop = cookparms.getNode();
607  if (!thissop) return getDominarea();
608  bool result;
609  OP_Utils::evalOpParm(result, thissop, "dominarea", cookparms.getCookTime(), 0);
610  return result;
611  }
612  fpreal64 getMinarea() const { return myMinarea; }
613  void setMinarea(fpreal64 val) { myMinarea = val; }
615  {
616  SOP_Node *thissop = cookparms.getNode();
617  if (!thissop) return getMinarea();
619  OP_Utils::evalOpParm(result, thissop, "minarea", cookparms.getCookTime(), 0);
620  return result;
621  }
622  bool getDoprojmatrix() const { return myDoprojmatrix; }
623  void setDoprojmatrix(bool val) { myDoprojmatrix = val; }
624  bool opDoprojmatrix(const SOP_NodeVerb::CookParms &cookparms) const
625  {
626  SOP_Node *thissop = cookparms.getNode();
627  if (!thissop) return getDoprojmatrix();
628  bool result;
629  OP_Utils::evalOpParm(result, thissop, "doprojmatrix", cookparms.getCookTime(), 0);
630  return result;
631  }
632  UT_Matrix4D getProjmatrix() const { return myProjmatrix; }
633  void setProjmatrix(UT_Matrix4D val) { myProjmatrix = val; }
635  {
636  SOP_Node *thissop = cookparms.getNode();
637  if (!thissop) return getProjmatrix();
639  OP_Utils::evalOpParm(result, thissop, "projmatrix", cookparms.getCookTime(), 0);
640  return result;
641  }
642  bool getDoboundingbox() const { return myDoboundingbox; }
643  void setDoboundingbox(bool val) { myDoboundingbox = val; }
644  bool opDoboundingbox(const SOP_NodeVerb::CookParms &cookparms) const
645  {
646  SOP_Node *thissop = cookparms.getNode();
647  if (!thissop) return getDoboundingbox();
648  bool result;
649  OP_Utils::evalOpParm(result, thissop, "doboundingbox", cookparms.getCookTime(), 0);
650  return result;
651  }
652  UT_Vector3D getSize() const { return mySize; }
653  void setSize(UT_Vector3D val) { mySize = val; }
655  {
656  SOP_Node *thissop = cookparms.getNode();
657  if (!thissop) return getSize();
659  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
660  return result;
661  }
662  UT_Vector3D getCenter() const { return myCenter; }
663  void setCenter(UT_Vector3D val) { myCenter = val; }
665  {
666  SOP_Node *thissop = cookparms.getNode();
667  if (!thissop) return getCenter();
669  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
670  return result;
671  }
672  bool getDoexpand() const { return myDoexpand; }
673  void setDoexpand(bool val) { myDoexpand = val; }
674  bool opDoexpand(const SOP_NodeVerb::CookParms &cookparms) const
675  {
676  SOP_Node *thissop = cookparms.getNode();
677  if (!thissop) return getDoexpand();
678  bool result;
679  OP_Utils::evalOpParm(result, thissop, "doexpand", cookparms.getCookTime(), 0);
680  return result;
681  }
682  bool getDominedge() const { return myDominedge; }
683  void setDominedge(bool val) { myDominedge = val; }
684  bool opDominedge(const SOP_NodeVerb::CookParms &cookparms) const
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getDominedge();
688  bool result;
689  OP_Utils::evalOpParm(result, thissop, "dominedge", cookparms.getCookTime(), 0);
690  return result;
691  }
692  fpreal64 getMinedge() const { return myMinedge; }
693  void setMinedge(fpreal64 val) { myMinedge = val; }
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getMinedge();
699  OP_Utils::evalOpParm(result, thissop, "minedge", cookparms.getCookTime(), 0);
700  return result;
701  }
702  bool getDonumsplits() const { return myDonumsplits; }
703  void setDonumsplits(bool val) { myDonumsplits = val; }
704  bool opDonumsplits(const SOP_NodeVerb::CookParms &cookparms) const
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getDonumsplits();
708  bool result;
709  OP_Utils::evalOpParm(result, thissop, "donumsplits", cookparms.getCookTime(), 0);
710  return result;
711  }
712  int64 getNumsplits() const { return myNumsplits; }
713  void setNumsplits(int64 val) { myNumsplits = val; }
714  int64 opNumsplits(const SOP_NodeVerb::CookParms &cookparms) const
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getNumsplits();
718  int64 result;
719  OP_Utils::evalOpParm(result, thissop, "numsplits", cookparms.getCookTime(), 0);
720  return result;
721  }
722 
723 private:
724  UT_StringHolder myGroup;
725  bool myConvex;
726  int64 myRoot3iter;
727  bool myDominarea;
728  fpreal64 myMinarea;
729  bool myDoprojmatrix;
730  UT_Matrix4D myProjmatrix;
731  bool myDoboundingbox;
732  UT_Vector3D mySize;
733  UT_Vector3D myCenter;
734  bool myDoexpand;
735  bool myDominedge;
736  fpreal64 myMinedge;
737  bool myDonumsplits;
738  int64 myNumsplits;
739 
740 };
type
Definition: core.h:556
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:63
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:317
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:310
bool operator!=(const SOP_TriDivideParms &src) const
fpreal64 fpreal
Definition: SYS_Types.h:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#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:372
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
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