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 <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_CircleEnums
24 {
25  enum class Type
26  {
27  PRIM = 0,
28  POLY,
29  NURBS,
30  BEZIER
31  };
32  enum class Orient
33  {
34  XY = 0,
35  YZ,
36  ZX
37  };
38  enum class Arc
39  {
40  CLOSED = 0,
41  OPENARC,
42  CLOSEDARC,
43  SLICEDARC
44  };
45 }
46 
47 
49 {
50 public:
51  static int version() { return 1; }
52 
54  {
55  myType = 0;
56  myOrient = 0;
57  myReverse = false;
58  myRad = UT_Vector2D(1,1);
59  myT = UT_Vector3D(0,0,0);
60  myR = UT_Vector3D(0,0,0);
61  myScale = 1;
62  myOrder = 4;
63  myImperfect = true;
64  myDivs = 12;
65  myArc = 0;
66  myAngle = UT_Vector2D(0,360);
67 
68  }
69 
70  explicit SOP_CircleParms(const SOP_CircleParms &) = default;
71  SOP_CircleParms &operator=(const SOP_CircleParms &) = default;
72  SOP_CircleParms(SOP_CircleParms &&) noexcept = default;
73  SOP_CircleParms &operator=(SOP_CircleParms &&) noexcept = default;
74 
75  ~SOP_CircleParms() override {}
76 
77  bool operator==(const SOP_CircleParms &src) const
78  {
79  if (myType != src.myType) return false;
80  if (myOrient != src.myOrient) return false;
81  if (myReverse != src.myReverse) return false;
82  if (myRad != src.myRad) return false;
83  if (myT != src.myT) return false;
84  if (myR != src.myR) return false;
85  if (myScale != src.myScale) return false;
86  if (myOrder != src.myOrder) return false;
87  if (myImperfect != src.myImperfect) return false;
88  if (myDivs != src.myDivs) return false;
89  if (myArc != src.myArc) return false;
90  if (myAngle != src.myAngle) return false;
91 
92  return true;
93  }
94  bool operator!=(const SOP_CircleParms &src) const
95  {
96  return !operator==(src);
97  }
101 
102 
103 
104  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
105  {
106  myType = 0;
107  if (true)
108  graph->evalOpParm(myType, nodeidx, "type", time, 0);
109  myOrient = 0;
110  if (true)
111  graph->evalOpParm(myOrient, nodeidx, "orient", time, 0);
112  myReverse = false;
113  if (true)
114  graph->evalOpParm(myReverse, nodeidx, "reverse", time, 0);
115  myRad = UT_Vector2D(1,1);
116  if (true)
117  graph->evalOpParm(myRad, nodeidx, "rad", time, 0);
118  myT = UT_Vector3D(0,0,0);
119  if (true)
120  graph->evalOpParm(myT, nodeidx, "t", time, 0);
121  myR = UT_Vector3D(0,0,0);
122  if (true)
123  graph->evalOpParm(myR, nodeidx, "r", time, 0);
124  myScale = 1;
125  if (true)
126  graph->evalOpParm(myScale, nodeidx, "scale", time, 0);
127  myOrder = 4;
128  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==1)))) ) )
129  graph->evalOpParm(myOrder, nodeidx, "order", time, 0);
130  myImperfect = true;
131  if (true && ( (true&&!(((int64(getType())!=2)&&(int64(getType())!=3)))) ) )
132  graph->evalOpParm(myImperfect, nodeidx, "imperfect", time, 0);
133  myDivs = 12;
134  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
135  graph->evalOpParm(myDivs, nodeidx, "divs", time, 0);
136  myArc = 0;
137  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
138  graph->evalOpParm(myArc, nodeidx, "arc", time, 0);
139  myAngle = UT_Vector2D(0,360);
140  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
141  graph->evalOpParm(myAngle, nodeidx, "angle", time, 0);
142 
143  }
144 
145 
146  void loadFromOpSubclass(const LoadParms &loadparms) override
147  {
148  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
149  }
150 
151 
152  void copyFrom(const OP_NodeParms *src) override
153  {
154  *this = *((const SOP_CircleParms *)src);
155  }
156 
157  template <typename T>
158  void
159  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
160  {
161  if (idx.size() < 1)
162  return;
163  UT_ASSERT(idx.size() == instance.size()+1);
164  if (idx.size() != instance.size()+1)
165  return;
166  switch (idx[0])
167  {
168  case 0:
169  coerceValue(value, myType);
170  break;
171  case 1:
172  coerceValue(value, myOrient);
173  break;
174  case 2:
175  coerceValue(value, myReverse);
176  break;
177  case 3:
178  coerceValue(value, myRad);
179  break;
180  case 4:
181  coerceValue(value, myT);
182  break;
183  case 5:
184  coerceValue(value, myR);
185  break;
186  case 6:
187  coerceValue(value, myScale);
188  break;
189  case 7:
190  coerceValue(value, myOrder);
191  break;
192  case 8:
193  coerceValue(value, myImperfect);
194  break;
195  case 9:
196  coerceValue(value, myDivs);
197  break;
198  case 10:
199  coerceValue(value, myArc);
200  break;
201  case 11:
202  coerceValue(value, myAngle);
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(myType, clampMinValue(0, clampMaxValue(3, value ) ));
253  break;
254  case 1:
255  coerceValue(myOrient, clampMinValue(0, clampMaxValue(2, value ) ));
256  break;
257  case 2:
258  coerceValue(myReverse, ( ( value ) ));
259  break;
260  case 3:
261  coerceValue(myRad, ( ( value ) ));
262  break;
263  case 4:
264  coerceValue(myT, ( ( value ) ));
265  break;
266  case 5:
267  coerceValue(myR, ( ( value ) ));
268  break;
269  case 6:
270  coerceValue(myScale, ( ( value ) ));
271  break;
272  case 7:
273  coerceValue(myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
274  break;
275  case 8:
276  coerceValue(myImperfect, ( ( value ) ));
277  break;
278  case 9:
279  coerceValue(myDivs, clampMinValue(1, ( value ) ));
280  break;
281  case 10:
282  coerceValue(myArc, clampMinValue(0, clampMaxValue(3, value ) ));
283  break;
284  case 11:
285  coerceValue(myAngle, ( ( value ) ));
286  break;
287 
288  }
289  }
290 
291  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
292  { doSetParmValue(idx, instance, value); }
293  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
312  { doSetParmValue(idx, instance, value); }
313 
314  exint getNestNumParms(TempIndex idx) const override
315  {
316  if (idx.size() == 0)
317  return 12;
318  switch (idx[0])
319  {
320 
321  }
322  // Invalid
323  return 0;
324  }
325 
326  const char *getNestParmName(TempIndex fieldnum) const override
327  {
328  if (fieldnum.size() < 1)
329  return 0;
330  switch (fieldnum[0])
331  {
332  case 0:
333  return "type";
334  case 1:
335  return "orient";
336  case 2:
337  return "reverse";
338  case 3:
339  return "rad";
340  case 4:
341  return "t";
342  case 5:
343  return "r";
344  case 6:
345  return "scale";
346  case 7:
347  return "order";
348  case 8:
349  return "imperfect";
350  case 9:
351  return "divs";
352  case 10:
353  return "arc";
354  case 11:
355  return "angle";
356 
357  }
358  return 0;
359  }
360 
361  ParmType getNestParmType(TempIndex fieldnum) const override
362  {
363  if (fieldnum.size() < 1)
364  return PARM_UNSUPPORTED;
365  switch (fieldnum[0])
366  {
367  case 0:
368  return PARM_INTEGER;
369  case 1:
370  return PARM_INTEGER;
371  case 2:
372  return PARM_INTEGER;
373  case 3:
374  return PARM_VECTOR2;
375  case 4:
376  return PARM_VECTOR3;
377  case 5:
378  return PARM_VECTOR3;
379  case 6:
380  return PARM_FLOAT;
381  case 7:
382  return PARM_INTEGER;
383  case 8:
384  return PARM_INTEGER;
385  case 9:
386  return PARM_INTEGER;
387  case 10:
388  return PARM_INTEGER;
389  case 11:
390  return PARM_VECTOR2;
391 
392  }
393  return PARM_UNSUPPORTED;
394  }
395 
396  // Boiler plate to load individual types.
397  static void loadData(UT_IStream &is, int64 &v)
398  { is.bread(&v, 1); }
399  static void loadData(UT_IStream &is, bool &v)
400  { int64 iv; is.bread(&iv, 1); v = iv; }
401  static void loadData(UT_IStream &is, fpreal64 &v)
402  { is.bread<fpreal64>(&v, 1); }
403  static void loadData(UT_IStream &is, UT_Vector2D &v)
404  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
405  static void loadData(UT_IStream &is, UT_Vector3D &v)
406  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
407  is.bread<fpreal64>(&v.z(), 1); }
408  static void loadData(UT_IStream &is, UT_Vector4D &v)
409  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
410  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
411  static void loadData(UT_IStream &is, UT_Matrix2D &v)
412  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
413  static void loadData(UT_IStream &is, UT_Matrix3D &v)
414  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
415  static void loadData(UT_IStream &is, UT_Matrix4D &v)
416  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
417  static void loadData(UT_IStream &is, UT_Vector2I &v)
418  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
419  static void loadData(UT_IStream &is, UT_Vector3I &v)
420  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
421  is.bread<int64>(&v.z(), 1); }
422  static void loadData(UT_IStream &is, UT_Vector4I &v)
423  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
424  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
426  { is.bread(v); }
428  { UT_StringHolder rampdata;
429  loadData(is, rampdata);
430  if (rampdata.isstring())
431  {
432  v.reset(new UT_Ramp());
433  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
434  v->load(istr);
435  }
436  else v.reset();
437  }
440  loadData(is, data);
441  if (data.isstring())
442  {
443  // Find the data type.
444  const char *colon = UT_StringWrap(data).findChar(':');
445  if (colon)
446  {
447  int typelen = colon - data.buffer();
449  type.strncpy(data.buffer(), typelen);
450  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
451 
452  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
453  }
454  }
455  else v.reset();
456  }
457 
458  static void saveData(std::ostream &os, int64 v)
459  { UTwrite(os, &v); }
460  static void saveData(std::ostream &os, bool v)
461  { int64 iv = v; UTwrite(os, &iv); }
462  static void saveData(std::ostream &os, fpreal64 v)
463  { UTwrite<fpreal64>(os, &v); }
464  static void saveData(std::ostream &os, UT_Vector2D v)
465  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
466  static void saveData(std::ostream &os, UT_Vector3D v)
467  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
468  UTwrite<fpreal64>(os, &v.z()); }
469  static void saveData(std::ostream &os, UT_Vector4D v)
470  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
471  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
472  static void saveData(std::ostream &os, UT_Matrix2D v)
474  static void saveData(std::ostream &os, UT_Matrix3D v)
476  static void saveData(std::ostream &os, UT_Matrix4D v)
478  static void saveData(std::ostream &os, UT_StringHolder s)
479  { UT_StringWrap(s).saveBinary(os); }
480  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
482  UT_OStringStream ostr;
483  if (s) s->save(ostr);
484  result = ostr.str();
485  saveData(os, result);
486  }
487  static void saveData(std::ostream &os, PRM_DataItemHandle s)
489  UT_OStringStream ostr;
490  if (s)
491  {
492  ostr << s->getDataTypeToken();
493  ostr << ":";
494  s->saveBinary(ostr);
495  }
496  result = ostr.str();
497  saveData(os, result);
498  }
499 
500 
501  void save(std::ostream &os) const
502  {
503  int32 v = version();
504  UTwrite(os, &v);
505  saveData(os, myType);
506  saveData(os, myOrient);
507  saveData(os, myReverse);
508  saveData(os, myRad);
509  saveData(os, myT);
510  saveData(os, myR);
511  saveData(os, myScale);
512  saveData(os, myOrder);
513  saveData(os, myImperfect);
514  saveData(os, myDivs);
515  saveData(os, myArc);
516  saveData(os, myAngle);
517 
518  }
519 
520  bool load(UT_IStream &is)
521  {
522  int32 v;
523  is.bread(&v, 1);
524  if (version() != v)
525  {
526  // Fail incompatible versions
527  return false;
528  }
529  loadData(is, myType);
530  loadData(is, myOrient);
531  loadData(is, myReverse);
532  loadData(is, myRad);
533  loadData(is, myT);
534  loadData(is, myR);
535  loadData(is, myScale);
536  loadData(is, myOrder);
537  loadData(is, myImperfect);
538  loadData(is, myDivs);
539  loadData(is, myArc);
540  loadData(is, myAngle);
541 
542  return true;
543  }
544 
545  Type getType() const { return Type(myType); }
546  void setType(Type val) { myType = int64(val); }
547  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
548  {
549  SOP_Node *thissop = cookparms.getNode();
550  if (!thissop) return getType();
551  int64 result;
552  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
553  return Type(result);
554  }
555  Orient getOrient() const { return Orient(myOrient); }
556  void setOrient(Orient val) { myOrient = int64(val); }
557  Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
558  {
559  SOP_Node *thissop = cookparms.getNode();
560  if (!thissop) return getOrient();
561  int64 result;
562  OP_Utils::evalOpParm(result, thissop, "orient", cookparms.getCookTime(), 0);
563  return Orient(result);
564  }
565  bool getReverse() const { return myReverse; }
566  void setReverse(bool val) { myReverse = val; }
567  bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
568  {
569  SOP_Node *thissop = cookparms.getNode();
570  if (!thissop) return getReverse();
571  bool result;
572  OP_Utils::evalOpParm(result, thissop, "reverse", cookparms.getCookTime(), 0);
573  return result;
574  }
575  UT_Vector2D getRad() const { return myRad; }
576  void setRad(UT_Vector2D val) { myRad = val; }
577  UT_Vector2D opRad(const SOP_NodeVerb::CookParms &cookparms) const
578  {
579  SOP_Node *thissop = cookparms.getNode();
580  if (!thissop) return getRad();
582  OP_Utils::evalOpParm(result, thissop, "rad", cookparms.getCookTime(), 0);
583  return result;
584  }
585  UT_Vector3D getT() const { return myT; }
586  void setT(UT_Vector3D val) { myT = val; }
587  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
588  {
589  SOP_Node *thissop = cookparms.getNode();
590  if (!thissop) return getT();
592  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
593  return result;
594  }
595  UT_Vector3D getR() const { return myR; }
596  void setR(UT_Vector3D val) { myR = val; }
597  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
598  {
599  SOP_Node *thissop = cookparms.getNode();
600  if (!thissop) return getR();
602  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
603  return result;
604  }
605  fpreal64 getScale() const { return myScale; }
606  void setScale(fpreal64 val) { myScale = val; }
607  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
608  {
609  SOP_Node *thissop = cookparms.getNode();
610  if (!thissop) return getScale();
612  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
613  return result;
614  }
615  int64 getOrder() const { return myOrder; }
616  void setOrder(int64 val) { myOrder = val; }
617  int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
618  {
619  SOP_Node *thissop = cookparms.getNode();
620  if (!thissop) return getOrder();
621  int64 result;
622  OP_Utils::evalOpParm(result, thissop, "order", cookparms.getCookTime(), 0);
623  return result;
624  }
625  bool getImperfect() const { return myImperfect; }
626  void setImperfect(bool val) { myImperfect = val; }
627  bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
628  {
629  SOP_Node *thissop = cookparms.getNode();
630  if (!thissop) return getImperfect();
631  bool result;
632  OP_Utils::evalOpParm(result, thissop, "imperfect", cookparms.getCookTime(), 0);
633  return result;
634  }
635  int64 getDivs() const { return myDivs; }
636  void setDivs(int64 val) { myDivs = val; }
637  int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
638  {
639  SOP_Node *thissop = cookparms.getNode();
640  if (!thissop) return getDivs();
641  int64 result;
642  OP_Utils::evalOpParm(result, thissop, "divs", cookparms.getCookTime(), 0);
643  return result;
644  }
645  Arc getArc() const { return Arc(myArc); }
646  void setArc(Arc val) { myArc = int64(val); }
647  Arc opArc(const SOP_NodeVerb::CookParms &cookparms) const
648  {
649  SOP_Node *thissop = cookparms.getNode();
650  if (!thissop) return getArc();
651  int64 result;
652  OP_Utils::evalOpParm(result, thissop, "arc", cookparms.getCookTime(), 0);
653  return Arc(result);
654  }
655  UT_Vector2D getAngle() const { return myAngle; }
656  void setAngle(UT_Vector2D val) { myAngle = val; }
658  {
659  SOP_Node *thissop = cookparms.getNode();
660  if (!thissop) return getAngle();
662  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
663  return result;
664  }
665 
666 private:
667  int64 myType;
668  int64 myOrient;
669  bool myReverse;
670  UT_Vector2D myRad;
671  UT_Vector3D myT;
672  UT_Vector3D myR;
673  fpreal64 myScale;
674  int64 myOrder;
675  bool myImperfect;
676  int64 myDivs;
677  int64 myArc;
678  UT_Vector2D myAngle;
679 
680 };
static void saveData(std::ostream &os, UT_Matrix3D v)
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
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
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:62
UT_Vector2T< fpreal64 > UT_Vector2D
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:613
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
Arc opArc(const SOP_NodeVerb::CookParms &cookparms) const
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
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
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
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
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:296
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
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
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:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void loadData(UT_IStream &is, UT_Vector3I &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
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
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:361
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:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
Definition: core.h:1131
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)
type
Definition: core.h:1059
void setOrient(Orient val)
void setDivs(int64 val)
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
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)
OP_NodeParms & operator=(const OP_NodeParms &)=default
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