HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolyPatch.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 namespace SOP_PolyPatchEnums
24 {
25  enum class Basis
26  {
27  CARDINAL = 0,
28  BSPLINE
29  };
30  enum class Connecttype
31  {
32  ROWS = 0,
33  COLS,
34  ROWCOL,
35  TRIANGLES,
36  QUADS,
40  };
41  enum class Closeu
42  {
43  NONEWU = 0,
44  WU,
45  IFPRIMWU
46  };
47  enum class Closev
48  {
49  NONEWV = 0,
50  WV,
51  IFPRIMWV
52  };
53  enum class Firstuclamp
54  {
55  FIRSTUCLAMPOFF = 0,
58  };
59  enum class Lastuclamp
60  {
61  LASTUCLAMPOFF = 0,
64  };
65  enum class Firstvclamp
66  {
67  FIRSTVCLAMPOFF = 0,
70  };
71  enum class Lastvclamp
72  {
73  LASTVCLAMPOFF = 0,
76  };
77 }
78 
79 
81 {
82 public:
83  static int version() { return 1; }
84 
86  {
87  myGroup = ""_UTsh;
88  myBasis = 0;
89  myConnecttype = 4;
90  myCloseu = 2;
91  myClosev = 2;
92  myFirstuclamp = 2;
93  myLastuclamp = 2;
94  myFirstvclamp = 2;
95  myLastvclamp = 2;
96  myDivisions = 0;
97  myPolys = false;
98 
99  }
100 
101  explicit SOP_PolyPatchParms(const SOP_PolyPatchParms &) = default;
102  SOP_PolyPatchParms &operator=(const SOP_PolyPatchParms &) = default;
103  SOP_PolyPatchParms(SOP_PolyPatchParms &&) noexcept = default;
104  SOP_PolyPatchParms &operator=(SOP_PolyPatchParms &&) noexcept = default;
105 
106  ~SOP_PolyPatchParms() override {}
107 
108  bool operator==(const SOP_PolyPatchParms &src) const
109  {
110  if (myGroup != src.myGroup) return false;
111  if (myBasis != src.myBasis) return false;
112  if (myConnecttype != src.myConnecttype) return false;
113  if (myCloseu != src.myCloseu) return false;
114  if (myClosev != src.myClosev) return false;
115  if (myFirstuclamp != src.myFirstuclamp) return false;
116  if (myLastuclamp != src.myLastuclamp) return false;
117  if (myFirstvclamp != src.myFirstvclamp) return false;
118  if (myLastvclamp != src.myLastvclamp) return false;
119  if (myDivisions != src.myDivisions) return false;
120  if (myPolys != src.myPolys) return false;
121 
122  return true;
123  }
124  bool operator!=(const SOP_PolyPatchParms &src) const
125  {
126  return !operator==(src);
127  }
136 
137 
138 
139  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
140  {
141  myGroup = ""_UTsh;
142  if (true)
143  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
144  myBasis = 0;
145  if (true)
146  graph->evalOpParm(myBasis, nodeidx, "basis", time, 0);
147  myConnecttype = 4;
148  if (true)
149  graph->evalOpParm(myConnecttype, nodeidx, "connecttype", time, 0);
150  myCloseu = 2;
151  if (true)
152  graph->evalOpParm(myCloseu, nodeidx, "closeu", time, 0);
153  myClosev = 2;
154  if (true)
155  graph->evalOpParm(myClosev, nodeidx, "closev", time, 0);
156  myFirstuclamp = 2;
157  if (true)
158  graph->evalOpParm(myFirstuclamp, nodeidx, "firstuclamp", time, 0);
159  myLastuclamp = 2;
160  if (true)
161  graph->evalOpParm(myLastuclamp, nodeidx, "lastuclamp", time, 0);
162  myFirstvclamp = 2;
163  if (true)
164  graph->evalOpParm(myFirstvclamp, nodeidx, "firstvclamp", time, 0);
165  myLastvclamp = 2;
166  if (true)
167  graph->evalOpParm(myLastvclamp, nodeidx, "lastvclamp", time, 0);
168  myDivisions = 0;
169  if (true)
170  graph->evalOpParm(myDivisions, nodeidx, "divisions", time, 0);
171  myPolys = false;
172  if (true)
173  graph->evalOpParm(myPolys, nodeidx, "polys", time, 0);
174 
175  }
176 
177 
178  void loadFromOpSubclass(const LoadParms &loadparms) override
179  {
180  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
181  }
182 
183 
184  void copyFrom(const OP_NodeParms *src) override
185  {
186  *this = *((const SOP_PolyPatchParms *)src);
187  }
188 
189  template <typename T>
190  void
191  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
192  {
193  if (idx.size() < 1)
194  return;
195  UT_ASSERT(idx.size() == instance.size()+1);
196  if (idx.size() != instance.size()+1)
197  return;
198  switch (idx[0])
199  {
200  case 0:
201  coerceValue(value, myGroup);
202  break;
203  case 1:
204  coerceValue(value, myBasis);
205  break;
206  case 2:
207  coerceValue(value, myConnecttype);
208  break;
209  case 3:
210  coerceValue(value, myCloseu);
211  break;
212  case 4:
213  coerceValue(value, myClosev);
214  break;
215  case 5:
216  coerceValue(value, myFirstuclamp);
217  break;
218  case 6:
219  coerceValue(value, myLastuclamp);
220  break;
221  case 7:
222  coerceValue(value, myFirstvclamp);
223  break;
224  case 8:
225  coerceValue(value, myLastvclamp);
226  break;
227  case 9:
228  coerceValue(value, myDivisions);
229  break;
230  case 10:
231  coerceValue(value, myPolys);
232  break;
233 
234  }
235  }
236 
237  bool isParmColorRamp(exint idx) const override
238  {
239  switch (idx)
240  {
241 
242  }
243  return false;
244  }
245 
246  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
267  { doGetParmValue(idx, instance, value); }
268 
269  template <typename T>
270  void
271  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
272  {
273  if (idx.size() < 1)
274  return;
275  UT_ASSERT(idx.size() == instance.size()+1);
276  if (idx.size() != instance.size()+1)
277  return;
278  switch (idx[0])
279  {
280  case 0:
281  coerceValue(myGroup, ( ( value ) ));
282  break;
283  case 1:
285  break;
286  case 2:
287  coerceValue(myConnecttype, clampMinValue(0, clampMaxValue(7, value ) ));
288  break;
289  case 3:
290  coerceValue(myCloseu, clampMinValue(0, clampMaxValue(2, value ) ));
291  break;
292  case 4:
293  coerceValue(myClosev, clampMinValue(0, clampMaxValue(2, value ) ));
294  break;
295  case 5:
296  coerceValue(myFirstuclamp, clampMinValue(0, clampMaxValue(2, value ) ));
297  break;
298  case 6:
299  coerceValue(myLastuclamp, clampMinValue(0, clampMaxValue(2, value ) ));
300  break;
301  case 7:
302  coerceValue(myFirstvclamp, clampMinValue(0, clampMaxValue(2, value ) ));
303  break;
304  case 8:
305  coerceValue(myLastvclamp, clampMinValue(0, clampMaxValue(2, value ) ));
306  break;
307  case 9:
308  coerceValue(myDivisions, clampMinValue(1, ( value ) ));
309  break;
310  case 10:
311  coerceValue(myPolys, ( ( value ) ));
312  break;
313 
314  }
315  }
316 
317  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
338  { doSetParmValue(idx, instance, value); }
339 
340  exint getNestNumParms(TempIndex idx) const override
341  {
342  if (idx.size() == 0)
343  return 11;
344  switch (idx[0])
345  {
346 
347  }
348  // Invalid
349  return 0;
350  }
351 
352  const char *getNestParmName(TempIndex fieldnum) const override
353  {
354  if (fieldnum.size() < 1)
355  return 0;
356  switch (fieldnum[0])
357  {
358  case 0:
359  return "group";
360  case 1:
361  return "basis";
362  case 2:
363  return "connecttype";
364  case 3:
365  return "closeu";
366  case 4:
367  return "closev";
368  case 5:
369  return "firstuclamp";
370  case 6:
371  return "lastuclamp";
372  case 7:
373  return "firstvclamp";
374  case 8:
375  return "lastvclamp";
376  case 9:
377  return "divisions";
378  case 10:
379  return "polys";
380 
381  }
382  return 0;
383  }
384 
385  ParmType getNestParmType(TempIndex fieldnum) const override
386  {
387  if (fieldnum.size() < 1)
388  return PARM_UNSUPPORTED;
389  switch (fieldnum[0])
390  {
391  case 0:
392  return PARM_STRING;
393  case 1:
394  return PARM_INTEGER;
395  case 2:
396  return PARM_INTEGER;
397  case 3:
398  return PARM_INTEGER;
399  case 4:
400  return PARM_INTEGER;
401  case 5:
402  return PARM_INTEGER;
403  case 6:
404  return PARM_INTEGER;
405  case 7:
406  return PARM_INTEGER;
407  case 8:
408  return PARM_INTEGER;
409  case 9:
410  return PARM_VECTOR2;
411  case 10:
412  return PARM_INTEGER;
413 
414  }
415  return PARM_UNSUPPORTED;
416  }
417 
418  // Boiler plate to load individual types.
419  static void loadData(UT_IStream &is, int64 &v)
420  { is.bread(&v, 1); }
421  static void loadData(UT_IStream &is, bool &v)
422  { int64 iv; is.bread(&iv, 1); v = iv; }
423  static void loadData(UT_IStream &is, fpreal64 &v)
424  { is.bread<fpreal64>(&v, 1); }
425  static void loadData(UT_IStream &is, UT_Vector2D &v)
426  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
427  static void loadData(UT_IStream &is, UT_Vector3D &v)
428  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
429  is.bread<fpreal64>(&v.z(), 1); }
430  static void loadData(UT_IStream &is, UT_Vector4D &v)
431  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
432  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
433  static void loadData(UT_IStream &is, UT_Matrix2D &v)
434  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
435  static void loadData(UT_IStream &is, UT_Matrix3D &v)
436  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
437  static void loadData(UT_IStream &is, UT_Matrix4D &v)
438  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
439  static void loadData(UT_IStream &is, UT_Vector2I &v)
440  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
441  static void loadData(UT_IStream &is, UT_Vector3I &v)
442  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
443  is.bread<int64>(&v.z(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector4I &v)
445  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
446  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
448  { is.bread(v); }
450  { UT_StringHolder rampdata;
451  loadData(is, rampdata);
452  if (rampdata.isstring())
453  {
454  v.reset(new UT_Ramp());
455  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
456  v->load(istr);
457  }
458  else v.reset();
459  }
462  loadData(is, data);
463  if (data.isstring())
464  {
465  // Find the data type.
466  const char *colon = UT_StringWrap(data).findChar(':');
467  if (colon)
468  {
469  int typelen = colon - data.buffer();
471  type.strncpy(data.buffer(), typelen);
472  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
473 
474  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
475  }
476  }
477  else v.reset();
478  }
479 
480  static void saveData(std::ostream &os, int64 v)
481  { UTwrite(os, &v); }
482  static void saveData(std::ostream &os, bool v)
483  { int64 iv = v; UTwrite(os, &iv); }
484  static void saveData(std::ostream &os, fpreal64 v)
485  { UTwrite<fpreal64>(os, &v); }
486  static void saveData(std::ostream &os, UT_Vector2D v)
487  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
488  static void saveData(std::ostream &os, UT_Vector3D v)
489  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
490  UTwrite<fpreal64>(os, &v.z()); }
491  static void saveData(std::ostream &os, UT_Vector4D v)
492  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
493  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
494  static void saveData(std::ostream &os, UT_Matrix2D v)
496  static void saveData(std::ostream &os, UT_Matrix3D v)
498  static void saveData(std::ostream &os, UT_Matrix4D v)
500  static void saveData(std::ostream &os, UT_StringHolder s)
501  { UT_StringWrap(s).saveBinary(os); }
502  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
504  UT_OStringStream ostr;
505  if (s) s->save(ostr);
506  result = ostr.str();
507  saveData(os, result);
508  }
509  static void saveData(std::ostream &os, PRM_DataItemHandle s)
511  UT_OStringStream ostr;
512  if (s)
513  {
514  ostr << s->getDataTypeToken();
515  ostr << ":";
516  s->saveBinary(ostr);
517  }
518  result = ostr.str();
519  saveData(os, result);
520  }
521 
522 
523  void save(std::ostream &os) const
524  {
525  int32 v = version();
526  UTwrite(os, &v);
527  saveData(os, myGroup);
528  saveData(os, myBasis);
529  saveData(os, myConnecttype);
530  saveData(os, myCloseu);
531  saveData(os, myClosev);
532  saveData(os, myFirstuclamp);
533  saveData(os, myLastuclamp);
534  saveData(os, myFirstvclamp);
535  saveData(os, myLastvclamp);
536  saveData(os, myDivisions);
537  saveData(os, myPolys);
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, myBasis);
552  loadData(is, myConnecttype);
553  loadData(is, myCloseu);
554  loadData(is, myClosev);
555  loadData(is, myFirstuclamp);
556  loadData(is, myLastuclamp);
557  loadData(is, myFirstvclamp);
558  loadData(is, myLastvclamp);
559  loadData(is, myDivisions);
560  loadData(is, myPolys);
561 
562  return true;
563  }
564 
565  const UT_StringHolder & getGroup() const { return myGroup; }
566  void setGroup(const UT_StringHolder & val) { myGroup = val; }
568  {
569  SOP_Node *thissop = cookparms.getNode();
570  if (!thissop) return getGroup();
572  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
573  return result;
574  }
575  Basis getBasis() const { return Basis(myBasis); }
576  void setBasis(Basis val) { myBasis = int64(val); }
577  Basis opBasis(const SOP_NodeVerb::CookParms &cookparms) const
578  {
579  SOP_Node *thissop = cookparms.getNode();
580  if (!thissop) return getBasis();
581  int64 result;
582  OP_Utils::evalOpParm(result, thissop, "basis", cookparms.getCookTime(), 0);
583  return Basis(result);
584  }
585  Connecttype getConnecttype() const { return Connecttype(myConnecttype); }
586  void setConnecttype(Connecttype val) { myConnecttype = int64(val); }
588  {
589  SOP_Node *thissop = cookparms.getNode();
590  if (!thissop) return getConnecttype();
591  int64 result;
592  OP_Utils::evalOpParm(result, thissop, "connecttype", cookparms.getCookTime(), 0);
593  return Connecttype(result);
594  }
595  Closeu getCloseu() const { return Closeu(myCloseu); }
596  void setCloseu(Closeu val) { myCloseu = int64(val); }
597  Closeu opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
598  {
599  SOP_Node *thissop = cookparms.getNode();
600  if (!thissop) return getCloseu();
601  int64 result;
602  OP_Utils::evalOpParm(result, thissop, "closeu", cookparms.getCookTime(), 0);
603  return Closeu(result);
604  }
605  Closev getClosev() const { return Closev(myClosev); }
606  void setClosev(Closev val) { myClosev = int64(val); }
607  Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
608  {
609  SOP_Node *thissop = cookparms.getNode();
610  if (!thissop) return getClosev();
611  int64 result;
612  OP_Utils::evalOpParm(result, thissop, "closev", cookparms.getCookTime(), 0);
613  return Closev(result);
614  }
615  Firstuclamp getFirstuclamp() const { return Firstuclamp(myFirstuclamp); }
616  void setFirstuclamp(Firstuclamp val) { myFirstuclamp = int64(val); }
618  {
619  SOP_Node *thissop = cookparms.getNode();
620  if (!thissop) return getFirstuclamp();
621  int64 result;
622  OP_Utils::evalOpParm(result, thissop, "firstuclamp", cookparms.getCookTime(), 0);
623  return Firstuclamp(result);
624  }
625  Lastuclamp getLastuclamp() const { return Lastuclamp(myLastuclamp); }
626  void setLastuclamp(Lastuclamp val) { myLastuclamp = int64(val); }
628  {
629  SOP_Node *thissop = cookparms.getNode();
630  if (!thissop) return getLastuclamp();
631  int64 result;
632  OP_Utils::evalOpParm(result, thissop, "lastuclamp", cookparms.getCookTime(), 0);
633  return Lastuclamp(result);
634  }
635  Firstvclamp getFirstvclamp() const { return Firstvclamp(myFirstvclamp); }
636  void setFirstvclamp(Firstvclamp val) { myFirstvclamp = int64(val); }
638  {
639  SOP_Node *thissop = cookparms.getNode();
640  if (!thissop) return getFirstvclamp();
641  int64 result;
642  OP_Utils::evalOpParm(result, thissop, "firstvclamp", cookparms.getCookTime(), 0);
643  return Firstvclamp(result);
644  }
645  Lastvclamp getLastvclamp() const { return Lastvclamp(myLastvclamp); }
646  void setLastvclamp(Lastvclamp val) { myLastvclamp = int64(val); }
648  {
649  SOP_Node *thissop = cookparms.getNode();
650  if (!thissop) return getLastvclamp();
651  int64 result;
652  OP_Utils::evalOpParm(result, thissop, "lastvclamp", cookparms.getCookTime(), 0);
653  return Lastvclamp(result);
654  }
655  UT_Vector2I getDivisions() const { return myDivisions; }
656  void setDivisions(UT_Vector2I val) { myDivisions = val; }
658  {
659  SOP_Node *thissop = cookparms.getNode();
660  if (!thissop) return getDivisions();
662  OP_Utils::evalOpParm(result, thissop, "divisions", cookparms.getCookTime(), 0);
663  return result;
664  }
665  bool getPolys() const { return myPolys; }
666  void setPolys(bool val) { myPolys = val; }
667  bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
668  {
669  SOP_Node *thissop = cookparms.getNode();
670  if (!thissop) return getPolys();
671  bool result;
672  OP_Utils::evalOpParm(result, thissop, "polys", cookparms.getCookTime(), 0);
673  return result;
674  }
675 
676 private:
677  UT_StringHolder myGroup;
678  int64 myBasis;
679  int64 myConnecttype;
680  int64 myCloseu;
681  int64 myClosev;
682  int64 myFirstuclamp;
683  int64 myLastuclamp;
684  int64 myFirstvclamp;
685  int64 myLastvclamp;
686  UT_Vector2I myDivisions;
687  bool myPolys;
688 
689 };
void setLastuclamp(Lastuclamp val)
Lastvclamp opLastvclamp(const SOP_NodeVerb::CookParms &cookparms) const
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Connecttype getConnecttype() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
Closev getClosev() const
void setLastvclamp(Lastvclamp val)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setFirstvclamp(Firstvclamp val)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
fpreal getTime() const
Definition: OP_Context.h:62
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
Firstuclamp getFirstuclamp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SYS_FORCE_INLINE const char * buffer() const
void setGroup(const UT_StringHolder &val)
Firstvclamp getFirstvclamp() const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
An output stream object that owns its own string buffer storage.
Basis opBasis(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
Closeu getCloseu() const
Lastvclamp getLastvclamp() const
**But if you need a result
Definition: thread.h:613
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
static void loadData(UT_IStream &is, UT_Vector3D &v)
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_StringHolder &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, fpreal64 &v)
double fpreal64
Definition: SYS_Types.h:201
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool load(UT_IStream &is)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
exint length() const
void setClosev(Closev val)
void setBasis(Basis val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, fpreal64 v)
void setFirstuclamp(Firstuclamp val)
Lastuclamp opLastuclamp(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
void setConnecttype(Connecttype val)
long long int64
Definition: SYS_Types.h:116
void setCloseu(Closeu val)
Connecttype opConnecttype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void save(std::ostream &os) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
bool operator!=(const SOP_PolyPatchParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, int64 v)
bool operator==(const SOP_PolyPatchParms &src) const
Firstvclamp opFirstvclamp(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
GT_Basis myBasis
Definition: GT_CurveEval.h:262
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
static void saveData(std::ostream &os, bool v)
exint getNestNumParms(TempIndex idx) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void copyFrom(const OP_NodeParms *src) override
void setDivisions(UT_Vector2I val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_Vector2I opDivisions(const SOP_NodeVerb::CookParms &cookparms) const
Closeu opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
Lastuclamp getLastuclamp() const
GLboolean r
Definition: glcorearb.h:1222
Firstuclamp opFirstuclamp(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
UT_Vector2I getDivisions() const
static void loadData(UT_IStream &is, int64 &v)
type
Definition: core.h:1059
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) 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
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663