HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Revolve.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 namespace SOP_RevolveEnums
24 {
25  enum class Surftype
26  {
27  ROWS = 0,
28  COLS,
29  ROWCOL,
30  TRIANGLES,
31  QUADS,
34  };
35 
37  getToken(Surftype enum_value)
38  {
39  using namespace UT::Literal;
40  switch (enum_value) {
41  case Surftype::ROWS: return "rows"_sh;
42  case Surftype::COLS: return "cols"_sh;
43  case Surftype::ROWCOL: return "rowcol"_sh;
44  case Surftype::TRIANGLES: return "triangles"_sh;
45  case Surftype::QUADS: return "quads"_sh;
46  case Surftype::ALTTRIANGLES: return "alttriangles"_sh;
47  case Surftype::REVTRIANGLES: return "revtriangles"_sh;
48  default: UT_ASSERT(false); return ""_sh;
49  }
50  }
51 
52  enum class Type
53  {
54  CLOSED = 0,
55  OPENARC,
56  CLOSEDARC
57  };
58 
60  getToken(Type enum_value)
61  {
62  using namespace UT::Literal;
63  switch (enum_value) {
64  case Type::CLOSED: return "closed"_sh;
65  case Type::OPENARC: return "openarc"_sh;
66  case Type::CLOSEDARC: return "closedarc"_sh;
67  default: UT_ASSERT(false); return ""_sh;
68  }
69  }
70 
71 }
72 
73 
75 {
76 public:
77  static int version() { return 1; }
78 
80  {
81  myGroup = ""_UTsh;
82  mySurftype = 4;
83  myOrigin = UT_Vector3D(0,0,0);
84  myDir = UT_Vector3D(0,1,0);
85  myPolys = true;
86  myImperfect = true;
87  myType = 0;
88  myAngle = UT_Vector2D(0,360);
89  myDivs = 10;
90  myOrder = 4;
91  myCap = false;
92 
93  }
94 
95  explicit SOP_RevolveParms(const SOP_RevolveParms &) = default;
96  SOP_RevolveParms &operator=(const SOP_RevolveParms &) = default;
97  SOP_RevolveParms(SOP_RevolveParms &&) noexcept = default;
98  SOP_RevolveParms &operator=(SOP_RevolveParms &&) noexcept = default;
99 
100  ~SOP_RevolveParms() override {}
101 
102  bool operator==(const SOP_RevolveParms &src) const
103  {
104  if (myGroup != src.myGroup) return false;
105  if (mySurftype != src.mySurftype) return false;
106  if (myOrigin != src.myOrigin) return false;
107  if (myDir != src.myDir) return false;
108  if (myPolys != src.myPolys) return false;
109  if (myImperfect != src.myImperfect) return false;
110  if (myType != src.myType) return false;
111  if (myAngle != src.myAngle) return false;
112  if (myDivs != src.myDivs) return false;
113  if (myOrder != src.myOrder) return false;
114  if (myCap != src.myCap) return false;
115 
116 
117  if (baseGetSignature() != src.baseGetSignature()) return false;
118 
119  return true;
120  }
121  bool operator!=(const SOP_RevolveParms &src) const
122  {
123  return !operator==(src);
124  }
127 
128 
129 
130  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
131  {
132  myGroup = ""_UTsh;
133  if (true)
134  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
135  mySurftype = 4;
136  if (true)
137  graph->evalOpParm(mySurftype, nodeidx, "surftype", time, graph->isDirect()?nullptr:depnode);
138  myOrigin = UT_Vector3D(0,0,0);
139  if (true)
140  graph->evalOpParm(myOrigin, nodeidx, "origin", time, graph->isDirect()?nullptr:depnode);
141  myDir = UT_Vector3D(0,1,0);
142  if (true)
143  graph->evalOpParm(myDir, nodeidx, "dir", time, graph->isDirect()?nullptr:depnode);
144  myPolys = true;
145  if (true)
146  graph->evalOpParm(myPolys, nodeidx, "polys", time, graph->isDirect()?nullptr:depnode);
147  myImperfect = true;
148  if (true)
149  graph->evalOpParm(myImperfect, nodeidx, "imperfect", time, graph->isDirect()?nullptr:depnode);
150  myType = 0;
151  if (true)
152  graph->evalOpParm(myType, nodeidx, "type", time, graph->isDirect()?nullptr:depnode);
153  myAngle = UT_Vector2D(0,360);
154  if (true)
155  graph->evalOpParm(myAngle, nodeidx, "angle", time, graph->isDirect()?nullptr:depnode);
156  myDivs = 10;
157  if (true)
158  graph->evalOpParm(myDivs, nodeidx, "divs", time, graph->isDirect()?nullptr:depnode);
159  myOrder = 4;
160  if (true)
161  graph->evalOpParm(myOrder, nodeidx, "order", time, graph->isDirect()?nullptr:depnode);
162  myCap = false;
163  if (true)
164  graph->evalOpParm(myCap, nodeidx, "cap", time, graph->isDirect()?nullptr:depnode);
165 
166  }
167 
168 
169  void loadFromOpSubclass(const LoadParms &loadparms) override
170  {
171  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
172  }
173 
174 
175  void copyFrom(const OP_NodeParms *src) override
176  {
177  *this = *((const SOP_RevolveParms *)src);
178  }
179 
180  template <typename T>
181  void
182  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
183  {
184  if (idx.size() < 1)
185  return;
186  UT_ASSERT(idx.size() == instance.size()+1);
187  if (idx.size() != instance.size()+1)
188  return;
189  switch (idx[0])
190  {
191  case 0:
192  coerceValue(value, myGroup);
193  break;
194  case 1:
195  coerceValue(value, mySurftype);
196  break;
197  case 2:
198  coerceValue(value, myOrigin);
199  break;
200  case 3:
201  coerceValue(value, myDir);
202  break;
203  case 4:
204  coerceValue(value, myPolys);
205  break;
206  case 5:
207  coerceValue(value, myImperfect);
208  break;
209  case 6:
210  coerceValue(value, myType);
211  break;
212  case 7:
213  coerceValue(value, myAngle);
214  break;
215  case 8:
216  coerceValue(value, myDivs);
217  break;
218  case 9:
219  coerceValue(value, myOrder);
220  break;
221  case 10:
222  coerceValue(value, myCap);
223  break;
224 
225  }
226  }
227 
228  bool isParmColorRamp(exint idx) const override
229  {
230  switch (idx)
231  {
232 
233  }
234  return false;
235  }
236 
237  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
258  { doGetParmValue(idx, instance, value); }
259 
260  template <typename T>
261  void
262  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
263  {
264  if (idx.size() < 1)
265  return;
266  UT_ASSERT(idx.size() == instance.size()+1);
267  if (idx.size() != instance.size()+1)
268  return;
269  switch (idx[0])
270  {
271  case 0:
272  coerceValue(myGroup, ( ( value ) ));
273  break;
274  case 1:
275  coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
276  break;
277  case 2:
278  coerceValue(myOrigin, ( ( value ) ));
279  break;
280  case 3:
281  coerceValue(myDir, ( ( value ) ));
282  break;
283  case 4:
284  coerceValue(myPolys, ( ( value ) ));
285  break;
286  case 5:
287  coerceValue(myImperfect, ( ( value ) ));
288  break;
289  case 6:
290  coerceValue(myType, clampMinValue(0, clampMaxValue(2, value ) ));
291  break;
292  case 7:
293  coerceValue(myAngle, ( ( value ) ));
294  break;
295  case 8:
296  coerceValue(myDivs, clampMinValue(1, ( value ) ));
297  break;
298  case 9:
299  coerceValue(myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
300  break;
301  case 10:
302  coerceValue(myCap, ( ( value ) ));
303  break;
304 
305  }
306  }
307 
308  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
329  { doSetParmValue(idx, instance, value); }
330 
331  exint getNestNumParms(TempIndex idx) const override
332  {
333  if (idx.size() == 0)
334  return 11;
335  switch (idx[0])
336  {
337 
338  }
339  // Invalid
340  return 0;
341  }
342 
343  const char *getNestParmName(TempIndex fieldnum) const override
344  {
345  if (fieldnum.size() < 1)
346  return 0;
347  switch (fieldnum[0])
348  {
349  case 0:
350  return "group";
351  case 1:
352  return "surftype";
353  case 2:
354  return "origin";
355  case 3:
356  return "dir";
357  case 4:
358  return "polys";
359  case 5:
360  return "imperfect";
361  case 6:
362  return "type";
363  case 7:
364  return "angle";
365  case 8:
366  return "divs";
367  case 9:
368  return "order";
369  case 10:
370  return "cap";
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_VECTOR3;
388  case 3:
389  return PARM_VECTOR3;
390  case 4:
391  return PARM_INTEGER;
392  case 5:
393  return PARM_INTEGER;
394  case 6:
395  return PARM_INTEGER;
396  case 7:
397  return PARM_VECTOR2;
398  case 8:
399  return PARM_INTEGER;
400  case 9:
401  return PARM_INTEGER;
402  case 10:
403  return PARM_INTEGER;
404 
405  }
406  return PARM_UNSUPPORTED;
407  }
408 
409  // Boiler plate to load individual types.
410  static void loadData(UT_IStream &is, int64 &v)
411  { is.bread(&v, 1); }
412  static void loadData(UT_IStream &is, bool &v)
413  { int64 iv; is.bread(&iv, 1); v = iv; }
414  static void loadData(UT_IStream &is, fpreal64 &v)
415  { is.bread<fpreal64>(&v, 1); }
416  static void loadData(UT_IStream &is, UT_Vector2D &v)
417  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
418  static void loadData(UT_IStream &is, UT_Vector3D &v)
419  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
420  is.bread<fpreal64>(&v.z(), 1); }
421  static void loadData(UT_IStream &is, UT_Vector4D &v)
422  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
423  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
424  static void loadData(UT_IStream &is, UT_Matrix2D &v)
425  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
426  static void loadData(UT_IStream &is, UT_Matrix3D &v)
427  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
428  static void loadData(UT_IStream &is, UT_Matrix4D &v)
429  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
430  static void loadData(UT_IStream &is, UT_Vector2I &v)
431  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
432  static void loadData(UT_IStream &is, UT_Vector3I &v)
433  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
434  is.bread<int64>(&v.z(), 1); }
435  static void loadData(UT_IStream &is, UT_Vector4I &v)
436  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
437  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
439  { is.bread(v); }
441  { UT_StringHolder rampdata;
442  loadData(is, rampdata);
443  if (rampdata.isstring())
444  {
445  v.reset(new UT_Ramp());
446  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
447  v->load(istr);
448  }
449  else v.reset();
450  }
453  loadData(is, data);
454  if (data.isstring())
455  {
456  // Find the data type.
457  const char *colon = UT_StringWrap(data).findChar(':');
458  if (colon)
459  {
460  int typelen = colon - data.buffer();
462  type.strncpy(data.buffer(), typelen);
463  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
464 
465  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
466  }
467  }
468  else v.reset();
469  }
470 
471  static void saveData(std::ostream &os, int64 v)
472  { UTwrite(os, &v); }
473  static void saveData(std::ostream &os, bool v)
474  { int64 iv = v; UTwrite(os, &iv); }
475  static void saveData(std::ostream &os, fpreal64 v)
476  { UTwrite<fpreal64>(os, &v); }
477  static void saveData(std::ostream &os, UT_Vector2D v)
478  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
479  static void saveData(std::ostream &os, UT_Vector3D v)
480  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
481  UTwrite<fpreal64>(os, &v.z()); }
482  static void saveData(std::ostream &os, UT_Vector4D v)
483  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
484  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
485  static void saveData(std::ostream &os, UT_Matrix2D v)
487  static void saveData(std::ostream &os, UT_Matrix3D v)
489  static void saveData(std::ostream &os, UT_Matrix4D v)
491  static void saveData(std::ostream &os, UT_StringHolder s)
492  { UT_StringWrap(s).saveBinary(os); }
493  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
495  UT_OStringStream ostr;
496  if (s) s->save(ostr);
497  result = ostr.str();
498  saveData(os, result);
499  }
500  static void saveData(std::ostream &os, PRM_DataItemHandle s)
502  UT_OStringStream ostr;
503  if (s)
504  {
505  ostr << s->getDataTypeToken();
506  ostr << ":";
507  s->saveBinary(ostr);
508  }
509  result = ostr.str();
510  saveData(os, result);
511  }
512 
513 
514  void save(std::ostream &os) const
515  {
516  int32 v = version();
517  UTwrite(os, &v);
518  saveData(os, myGroup);
519  saveData(os, mySurftype);
520  saveData(os, myOrigin);
521  saveData(os, myDir);
522  saveData(os, myPolys);
523  saveData(os, myImperfect);
524  saveData(os, myType);
525  saveData(os, myAngle);
526  saveData(os, myDivs);
527  saveData(os, myOrder);
528  saveData(os, myCap);
529 
530  }
531 
532  bool load(UT_IStream &is)
533  {
534  int32 v;
535  is.bread(&v, 1);
536  if (version() != v)
537  {
538  // Fail incompatible versions
539  return false;
540  }
541  loadData(is, myGroup);
542  loadData(is, mySurftype);
543  loadData(is, myOrigin);
544  loadData(is, myDir);
545  loadData(is, myPolys);
546  loadData(is, myImperfect);
547  loadData(is, myType);
548  loadData(is, myAngle);
549  loadData(is, myDivs);
550  loadData(is, myOrder);
551  loadData(is, myCap);
552 
553  return true;
554  }
555 
556  const UT_StringHolder & getGroup() const { return myGroup; }
557  void setGroup(const UT_StringHolder & val) { myGroup = val; }
559  {
560  SOP_Node *thissop = cookparms.getNode();
561  if (!thissop) return getGroup();
563  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
564  return result;
565  }
566  Surftype getSurftype() const { return Surftype(mySurftype); }
567  void setSurftype(Surftype val) { mySurftype = int64(val); }
569  {
570  SOP_Node *thissop = cookparms.getNode();
571  if (!thissop) return getSurftype();
572  int64 result;
573  OP_Utils::evalOpParm(result, thissop, "surftype", cookparms.getCookTime(), 0);
574  return Surftype(result);
575  }
576  UT_Vector3D getOrigin() const { return myOrigin; }
577  void setOrigin(UT_Vector3D val) { myOrigin = val; }
579  {
580  SOP_Node *thissop = cookparms.getNode();
581  if (!thissop) return getOrigin();
583  OP_Utils::evalOpParm(result, thissop, "origin", cookparms.getCookTime(), 0);
584  return result;
585  }
586  UT_Vector3D getDir() const { return myDir; }
587  void setDir(UT_Vector3D val) { myDir = val; }
588  UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
589  {
590  SOP_Node *thissop = cookparms.getNode();
591  if (!thissop) return getDir();
593  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
594  return result;
595  }
596  bool getPolys() const { return myPolys; }
597  void setPolys(bool val) { myPolys = val; }
598  bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
599  {
600  SOP_Node *thissop = cookparms.getNode();
601  if (!thissop) return getPolys();
602  bool result;
603  OP_Utils::evalOpParm(result, thissop, "polys", cookparms.getCookTime(), 0);
604  return result;
605  }
606  bool getImperfect() const { return myImperfect; }
607  void setImperfect(bool val) { myImperfect = val; }
608  bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getImperfect();
612  bool result;
613  OP_Utils::evalOpParm(result, thissop, "imperfect", cookparms.getCookTime(), 0);
614  return result;
615  }
616  Type getType() const { return Type(myType); }
617  void setType(Type val) { myType = int64(val); }
618  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getType();
622  int64 result;
623  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
624  return Type(result);
625  }
626  UT_Vector2D getAngle() const { return myAngle; }
627  void setAngle(UT_Vector2D val) { myAngle = val; }
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getAngle();
633  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
634  return result;
635  }
636  int64 getDivs() const { return myDivs; }
637  void setDivs(int64 val) { myDivs = val; }
638  int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getDivs();
642  int64 result;
643  OP_Utils::evalOpParm(result, thissop, "divs", cookparms.getCookTime(), 0);
644  return result;
645  }
646  int64 getOrder() const { return myOrder; }
647  void setOrder(int64 val) { myOrder = val; }
648  int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getOrder();
652  int64 result;
653  OP_Utils::evalOpParm(result, thissop, "order", cookparms.getCookTime(), 0);
654  return result;
655  }
656  bool getCap() const { return myCap; }
657  void setCap(bool val) { myCap = val; }
658  bool opCap(const SOP_NodeVerb::CookParms &cookparms) const
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getCap();
662  bool result;
663  OP_Utils::evalOpParm(result, thissop, "cap", cookparms.getCookTime(), 0);
664  return result;
665  }
666 
667 private:
668  UT_StringHolder myGroup;
669  int64 mySurftype;
670  UT_Vector3D myOrigin;
671  UT_Vector3D myDir;
672  bool myPolys;
673  bool myImperfect;
674  int64 myType;
675  UT_Vector2D myAngle;
676  int64 myDivs;
677  int64 myOrder;
678  bool myCap;
679 
680 };
static void loadData(UT_IStream &is, UT_Vector2D &v)
type
Definition: core.h:556
static void saveData(std::ostream &os, UT_StringHolder s)
bool operator!=(const SOP_RevolveParms &src) const
bool load(UT_IStream &is)
UT_Vector3D getOrigin() const
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setAngle(UT_Vector2D val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
int myOrder
Definition: GT_CurveEval.h:263
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
bool opCap(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getTime() const
Definition: OP_Context.h:63
UT_Vector2D opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GLdouble s
Definition: glad.h:3009
bool operator==(const SOP_RevolveParms &src) const
An output stream object that owns its own string buffer storage.
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
**But if you need a result
Definition: thread.h:622
void setDir(UT_Vector3D val)
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
Type getType() const
bool getImperfect() const
void setDivs(int64 val)
static void loadData(UT_IStream &is, bool &v)
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
exint length() const
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
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
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static int version()
static void loadData(UT_IStream &is, UT_Vector3I &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setOrder(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setPolys(bool val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Matrix4D v)
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
int64 getDivs() const
long long int64
Definition: SYS_Types.h:116
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Vector3D getDir() const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
GT_API const UT_StringHolder version
int64 getOrder() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool getPolys() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setOrigin(UT_Vector3D val)
fpreal64 fpreal
Definition: SYS_Types.h:278
static void loadData(UT_IStream &is, UT_Vector3D &v)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, bool v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void setSurftype(Surftype val)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void setType(Type val)
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool getCap() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const 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 doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setGroup(const UT_StringHolder &val)
Surftype getSurftype() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setImperfect(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
UT_Vector2D getAngle() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void save(std::ostream &os) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getGroup() const
void setCap(bool val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE UT_StringHolder getToken(Surftype enum_value)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663