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 
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  return true;
134  }
135  bool operator!=(const SOP_CircleParms &src) const
136  {
137  return !operator==(src);
138  }
142 
143 
144 
145  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
146  {
147  myType = 0;
148  if (true)
149  graph->evalOpParm(myType, nodeidx, "type", time, 0);
150  myOrient = 0;
151  if (true)
152  graph->evalOpParm(myOrient, nodeidx, "orient", time, 0);
153  myReverse = true;
154  if (true)
155  graph->evalOpParm(myReverse, nodeidx, "reverse", time, 0);
156  myRad = UT_Vector2D(1,1);
157  if (true)
158  graph->evalOpParm(myRad, nodeidx, "rad", time, 0);
159  myT = UT_Vector3D(0,0,0);
160  if (true)
161  graph->evalOpParm(myT, nodeidx, "t", time, 0);
162  myR = UT_Vector3D(0,0,0);
163  if (true)
164  graph->evalOpParm(myR, nodeidx, "r", time, 0);
165  myScale = 1;
166  if (true)
167  graph->evalOpParm(myScale, nodeidx, "scale", time, 0);
168  myOrder = 4;
169  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==1)))) ) )
170  graph->evalOpParm(myOrder, nodeidx, "order", time, 0);
171  myImperfect = true;
172  if (true && ( (true&&!(((int64(getType())!=2)&&(int64(getType())!=3)))) ) )
173  graph->evalOpParm(myImperfect, nodeidx, "imperfect", time, 0);
174  myDivs = 12;
175  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
176  graph->evalOpParm(myDivs, nodeidx, "divs", time, 0);
177  myArc = 0;
178  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
179  graph->evalOpParm(myArc, nodeidx, "arc", time, 0);
180  myAngle = UT_Vector2D(0,360);
181  if (true && ( (true&&!(((int64(getType())==0))||((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
182  graph->evalOpParm(myAngle, nodeidx, "angle", time, 0);
183 
184  }
185 
186 
187  void loadFromOpSubclass(const LoadParms &loadparms) override
188  {
189  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
190  }
191 
192 
193  void copyFrom(const OP_NodeParms *src) override
194  {
195  *this = *((const SOP_CircleParms *)src);
196  }
197 
198  template <typename T>
199  void
200  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
201  {
202  if (idx.size() < 1)
203  return;
204  UT_ASSERT(idx.size() == instance.size()+1);
205  if (idx.size() != instance.size()+1)
206  return;
207  switch (idx[0])
208  {
209  case 0:
210  coerceValue(value, myType);
211  break;
212  case 1:
213  coerceValue(value, myOrient);
214  break;
215  case 2:
216  coerceValue(value, myReverse);
217  break;
218  case 3:
219  coerceValue(value, myRad);
220  break;
221  case 4:
222  coerceValue(value, myT);
223  break;
224  case 5:
225  coerceValue(value, myR);
226  break;
227  case 6:
228  coerceValue(value, myScale);
229  break;
230  case 7:
231  coerceValue(value, myOrder);
232  break;
233  case 8:
234  coerceValue(value, myImperfect);
235  break;
236  case 9:
237  coerceValue(value, myDivs);
238  break;
239  case 10:
240  coerceValue(value, myArc);
241  break;
242  case 11:
243  coerceValue(value, myAngle);
244  break;
245 
246  }
247  }
248 
249  bool isParmColorRamp(exint idx) const override
250  {
251  switch (idx)
252  {
253 
254  }
255  return false;
256  }
257 
258  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
275  { doGetParmValue(idx, instance, value); }
276  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
277  { doGetParmValue(idx, instance, value); }
278  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
279  { doGetParmValue(idx, instance, value); }
280 
281  template <typename T>
282  void
283  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
284  {
285  if (idx.size() < 1)
286  return;
287  UT_ASSERT(idx.size() == instance.size()+1);
288  if (idx.size() != instance.size()+1)
289  return;
290  switch (idx[0])
291  {
292  case 0:
293  coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
294  break;
295  case 1:
296  coerceValue(myOrient, clampMinValue(0, clampMaxValue(2, value ) ));
297  break;
298  case 2:
299  coerceValue(myReverse, ( ( value ) ));
300  break;
301  case 3:
302  coerceValue(myRad, ( ( value ) ));
303  break;
304  case 4:
305  coerceValue(myT, ( ( value ) ));
306  break;
307  case 5:
308  coerceValue(myR, ( ( value ) ));
309  break;
310  case 6:
311  coerceValue(myScale, ( ( value ) ));
312  break;
313  case 7:
314  coerceValue(myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
315  break;
316  case 8:
317  coerceValue(myImperfect, ( ( value ) ));
318  break;
319  case 9:
320  coerceValue(myDivs, clampMinValue(1, ( value ) ));
321  break;
322  case 10:
323  coerceValue(myArc, clampMinValue(0, clampMaxValue(3, value ) ));
324  break;
325  case 11:
326  coerceValue(myAngle, ( ( value ) ));
327  break;
328 
329  }
330  }
331 
332  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
349  { doSetParmValue(idx, instance, value); }
350  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
351  { doSetParmValue(idx, instance, value); }
352  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
353  { doSetParmValue(idx, instance, value); }
354 
355  exint getNestNumParms(TempIndex idx) const override
356  {
357  if (idx.size() == 0)
358  return 12;
359  switch (idx[0])
360  {
361 
362  }
363  // Invalid
364  return 0;
365  }
366 
367  const char *getNestParmName(TempIndex fieldnum) const override
368  {
369  if (fieldnum.size() < 1)
370  return 0;
371  switch (fieldnum[0])
372  {
373  case 0:
374  return "type";
375  case 1:
376  return "orient";
377  case 2:
378  return "reverse";
379  case 3:
380  return "rad";
381  case 4:
382  return "t";
383  case 5:
384  return "r";
385  case 6:
386  return "scale";
387  case 7:
388  return "order";
389  case 8:
390  return "imperfect";
391  case 9:
392  return "divs";
393  case 10:
394  return "arc";
395  case 11:
396  return "angle";
397 
398  }
399  return 0;
400  }
401 
402  ParmType getNestParmType(TempIndex fieldnum) const override
403  {
404  if (fieldnum.size() < 1)
405  return PARM_UNSUPPORTED;
406  switch (fieldnum[0])
407  {
408  case 0:
409  return PARM_INTEGER;
410  case 1:
411  return PARM_INTEGER;
412  case 2:
413  return PARM_INTEGER;
414  case 3:
415  return PARM_VECTOR2;
416  case 4:
417  return PARM_VECTOR3;
418  case 5:
419  return PARM_VECTOR3;
420  case 6:
421  return PARM_FLOAT;
422  case 7:
423  return PARM_INTEGER;
424  case 8:
425  return PARM_INTEGER;
426  case 9:
427  return PARM_INTEGER;
428  case 10:
429  return PARM_INTEGER;
430  case 11:
431  return PARM_VECTOR2;
432 
433  }
434  return PARM_UNSUPPORTED;
435  }
436 
437  // Boiler plate to load individual types.
438  static void loadData(UT_IStream &is, int64 &v)
439  { is.bread(&v, 1); }
440  static void loadData(UT_IStream &is, bool &v)
441  { int64 iv; is.bread(&iv, 1); v = iv; }
442  static void loadData(UT_IStream &is, fpreal64 &v)
443  { is.bread<fpreal64>(&v, 1); }
444  static void loadData(UT_IStream &is, UT_Vector2D &v)
445  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
446  static void loadData(UT_IStream &is, UT_Vector3D &v)
447  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
448  is.bread<fpreal64>(&v.z(), 1); }
449  static void loadData(UT_IStream &is, UT_Vector4D &v)
450  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
451  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
452  static void loadData(UT_IStream &is, UT_Matrix2D &v)
453  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
454  static void loadData(UT_IStream &is, UT_Matrix3D &v)
455  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
456  static void loadData(UT_IStream &is, UT_Matrix4D &v)
457  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
458  static void loadData(UT_IStream &is, UT_Vector2I &v)
459  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
460  static void loadData(UT_IStream &is, UT_Vector3I &v)
461  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
462  is.bread<int64>(&v.z(), 1); }
463  static void loadData(UT_IStream &is, UT_Vector4I &v)
464  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
465  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
467  { is.bread(v); }
469  { UT_StringHolder rampdata;
470  loadData(is, rampdata);
471  if (rampdata.isstring())
472  {
473  v.reset(new UT_Ramp());
474  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
475  v->load(istr);
476  }
477  else v.reset();
478  }
481  loadData(is, data);
482  if (data.isstring())
483  {
484  // Find the data type.
485  const char *colon = UT_StringWrap(data).findChar(':');
486  if (colon)
487  {
488  int typelen = colon - data.buffer();
490  type.strncpy(data.buffer(), typelen);
491  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
492 
493  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
494  }
495  }
496  else v.reset();
497  }
498 
499  static void saveData(std::ostream &os, int64 v)
500  { UTwrite(os, &v); }
501  static void saveData(std::ostream &os, bool v)
502  { int64 iv = v; UTwrite(os, &iv); }
503  static void saveData(std::ostream &os, fpreal64 v)
504  { UTwrite<fpreal64>(os, &v); }
505  static void saveData(std::ostream &os, UT_Vector2D v)
506  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
507  static void saveData(std::ostream &os, UT_Vector3D v)
508  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
509  UTwrite<fpreal64>(os, &v.z()); }
510  static void saveData(std::ostream &os, UT_Vector4D v)
511  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
512  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
513  static void saveData(std::ostream &os, UT_Matrix2D v)
515  static void saveData(std::ostream &os, UT_Matrix3D v)
517  static void saveData(std::ostream &os, UT_Matrix4D v)
519  static void saveData(std::ostream &os, UT_StringHolder s)
520  { UT_StringWrap(s).saveBinary(os); }
521  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
523  UT_OStringStream ostr;
524  if (s) s->save(ostr);
525  result = ostr.str();
526  saveData(os, result);
527  }
528  static void saveData(std::ostream &os, PRM_DataItemHandle s)
530  UT_OStringStream ostr;
531  if (s)
532  {
533  ostr << s->getDataTypeToken();
534  ostr << ":";
535  s->saveBinary(ostr);
536  }
537  result = ostr.str();
538  saveData(os, result);
539  }
540 
541 
542  void save(std::ostream &os) const
543  {
544  int32 v = version();
545  UTwrite(os, &v);
546  saveData(os, myType);
547  saveData(os, myOrient);
548  saveData(os, myReverse);
549  saveData(os, myRad);
550  saveData(os, myT);
551  saveData(os, myR);
552  saveData(os, myScale);
553  saveData(os, myOrder);
554  saveData(os, myImperfect);
555  saveData(os, myDivs);
556  saveData(os, myArc);
557  saveData(os, myAngle);
558 
559  }
560 
561  bool load(UT_IStream &is)
562  {
563  int32 v;
564  is.bread(&v, 1);
565  if (version() != v)
566  {
567  // Fail incompatible versions
568  return false;
569  }
570  loadData(is, myType);
571  loadData(is, myOrient);
572  loadData(is, myReverse);
573  loadData(is, myRad);
574  loadData(is, myT);
575  loadData(is, myR);
576  loadData(is, myScale);
577  loadData(is, myOrder);
578  loadData(is, myImperfect);
579  loadData(is, myDivs);
580  loadData(is, myArc);
581  loadData(is, myAngle);
582 
583  return true;
584  }
585 
586  Type getType() const { return Type(myType); }
587  void setType(Type val) { myType = int64(val); }
588  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
589  {
590  SOP_Node *thissop = cookparms.getNode();
591  if (!thissop) return getType();
592  int64 result;
593  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
594  return Type(result);
595  }
596  Orient getOrient() const { return Orient(myOrient); }
597  void setOrient(Orient val) { myOrient = int64(val); }
598  Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
599  {
600  SOP_Node *thissop = cookparms.getNode();
601  if (!thissop) return getOrient();
602  int64 result;
603  OP_Utils::evalOpParm(result, thissop, "orient", cookparms.getCookTime(), 0);
604  return Orient(result);
605  }
606  bool getReverse() const { return myReverse; }
607  void setReverse(bool val) { myReverse = val; }
608  bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getReverse();
612  bool result;
613  OP_Utils::evalOpParm(result, thissop, "reverse", cookparms.getCookTime(), 0);
614  return result;
615  }
616  UT_Vector2D getRad() const { return myRad; }
617  void setRad(UT_Vector2D val) { myRad = val; }
618  UT_Vector2D opRad(const SOP_NodeVerb::CookParms &cookparms) const
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getRad();
623  OP_Utils::evalOpParm(result, thissop, "rad", cookparms.getCookTime(), 0);
624  return result;
625  }
626  UT_Vector3D getT() const { return myT; }
627  void setT(UT_Vector3D val) { myT = val; }
628  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getT();
633  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
634  return result;
635  }
636  UT_Vector3D getR() const { return myR; }
637  void setR(UT_Vector3D val) { myR = val; }
638  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getR();
643  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
644  return result;
645  }
646  fpreal64 getScale() const { return myScale; }
647  void setScale(fpreal64 val) { myScale = val; }
648  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getScale();
653  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
654  return result;
655  }
656  int64 getOrder() const { return myOrder; }
657  void setOrder(int64 val) { myOrder = val; }
658  int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getOrder();
662  int64 result;
663  OP_Utils::evalOpParm(result, thissop, "order", cookparms.getCookTime(), 0);
664  return result;
665  }
666  bool getImperfect() const { return myImperfect; }
667  void setImperfect(bool val) { myImperfect = val; }
668  bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getImperfect();
672  bool result;
673  OP_Utils::evalOpParm(result, thissop, "imperfect", cookparms.getCookTime(), 0);
674  return result;
675  }
676  int64 getDivs() const { return myDivs; }
677  void setDivs(int64 val) { myDivs = val; }
678  int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getDivs();
682  int64 result;
683  OP_Utils::evalOpParm(result, thissop, "divs", cookparms.getCookTime(), 0);
684  return result;
685  }
686  Arc getArc() const { return Arc(myArc); }
687  void setArc(Arc val) { myArc = int64(val); }
688  Arc opArc(const SOP_NodeVerb::CookParms &cookparms) const
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getArc();
692  int64 result;
693  OP_Utils::evalOpParm(result, thissop, "arc", cookparms.getCookTime(), 0);
694  return Arc(result);
695  }
696  UT_Vector2D getAngle() const { return myAngle; }
697  void setAngle(UT_Vector2D val) { myAngle = val; }
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getAngle();
703  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
704  return result;
705  }
706 
707 private:
708  int64 myType;
709  int64 myOrient;
710  bool myReverse;
711  UT_Vector2D myRad;
712  UT_Vector3D myT;
713  UT_Vector3D myR;
714  fpreal64 myScale;
715  int64 myOrder;
716  bool myImperfect;
717  int64 myDivs;
718  int64 myArc;
719  UT_Vector2D myAngle;
720 
721 };
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
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
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
#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: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
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)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
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:1395
#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:97
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