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