HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Curve.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_CurveEnums
24 {
25  enum class Type
26  {
27  POLY = 0,
28  NURBS,
29  BEZIER,
30  POINTS
31  };
32  enum class Method
33  {
34  CV = 0,
36  FREEHAND
37  };
38  enum class Param
39  {
40  UNIFORM = 0,
41  CHRDLEN,
42  CENTRIP
43  };
44 }
45 
46 
48 {
49 public:
50  static int version() { return 1; }
51 
53  {
54  myType = 0;
55  myMethod = 0;
56  myCoords = ""_UTsh;
57  myClose = false;
58  myReverse = false;
59  myOrder = 4;
60  myParam = 0;
61  myTolerance = 0.01;
62  mySmooth = 0;
63  myCsharp = false;
64  myKeepgeo = false;
65  myNormalize = false;
66 
67  }
68 
69  explicit SOP_CurveParms(const SOP_CurveParms &) = default;
70  SOP_CurveParms &operator=(const SOP_CurveParms &) = default;
71  SOP_CurveParms(SOP_CurveParms &&) noexcept = default;
72  SOP_CurveParms &operator=(SOP_CurveParms &&) noexcept = default;
73 
74  ~SOP_CurveParms() override {}
75 
76  bool operator==(const SOP_CurveParms &src) const
77  {
78  if (myType != src.myType) return false;
79  if (myMethod != src.myMethod) return false;
80  if (myCoords != src.myCoords) return false;
81  if (myClose != src.myClose) return false;
82  if (myReverse != src.myReverse) return false;
83  if (myOrder != src.myOrder) return false;
84  if (myParam != src.myParam) return false;
85  if (myTolerance != src.myTolerance) return false;
86  if (mySmooth != src.mySmooth) return false;
87  if (myCsharp != src.myCsharp) return false;
88  if (myKeepgeo != src.myKeepgeo) return false;
89  if (myNormalize != src.myNormalize) return false;
90 
91  return true;
92  }
93  bool operator!=(const SOP_CurveParms &src) const
94  {
95  return !operator==(src);
96  }
100 
101 
102 
103  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
104  {
105  myType = 0;
106  if (true)
107  graph->evalOpParm(myType, nodeidx, "type", time, 0);
108  myMethod = 0;
109  if (true)
110  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
111  myCoords = ""_UTsh;
112  if (true)
113  graph->evalOpParm(myCoords, nodeidx, "coords", time, 0);
114  myClose = false;
115  if (true && ( (true&&!(((int64(getType())==3)))) ) )
116  graph->evalOpParm(myClose, nodeidx, "close", time, 0);
117  myReverse = false;
118  if (true)
119  graph->evalOpParm(myReverse, nodeidx, "reverse", time, 0);
120  myOrder = 4;
121  if (true && ( (true&&!(((int64(getType())!=1)&&(int64(getType())!=2)))) ) )
122  graph->evalOpParm(myOrder, nodeidx, "order", time, 0);
123  myParam = 0;
124  if (true && ( (true&&!(((int64(getType())!=1)&&(int64(getType())!=2))||((int64(getMethod())!=1)))) ) )
125  graph->evalOpParm(myParam, nodeidx, "param", time, 0);
126  myTolerance = 0.01;
127  if (true && ( (true&&!(((int64(getType())!=1)&&(int64(getType())!=2))||((int64(getMethod())!=2)))) ) )
128  graph->evalOpParm(myTolerance, nodeidx, "tolerance", time, 0);
129  mySmooth = 0;
130  if (true && ( (true&&!(((int64(getType())!=1)&&(int64(getType())!=2))||((int64(getMethod())!=2)))) ) )
131  graph->evalOpParm(mySmooth, nodeidx, "smooth", time, 0);
132  myCsharp = false;
133  if (true && ( (true&&!(((int64(getType())!=1)&&(int64(getType())!=2))||((int64(getMethod())!=2)))) ) )
134  graph->evalOpParm(myCsharp, nodeidx, "csharp", time, 0);
135  myKeepgeo = false;
136  if (true)
137  graph->evalOpParm(myKeepgeo, nodeidx, "keepgeo", time, 0);
138  myNormalize = false;
139  if (true && ( (true&&!(((int64(getType())!=1)&&(int64(getType())!=2))||((int64(getMethod())!=1))||((int64(getParam())!=0)))) ) )
140  graph->evalOpParm(myNormalize, nodeidx, "normalize", time, 0);
141 
142  }
143 
144 
145  void loadFromOpSubclass(const LoadParms &loadparms) override
146  {
147  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
148  }
149 
150 
151  void copyFrom(const OP_NodeParms *src) override
152  {
153  *this = *((const SOP_CurveParms *)src);
154  }
155 
156  template <typename T>
157  void
158  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
159  {
160  if (idx.size() < 1)
161  return;
162  UT_ASSERT(idx.size() == instance.size()+1);
163  if (idx.size() != instance.size()+1)
164  return;
165  switch (idx[0])
166  {
167  case 0:
168  coerceValue(value, myType);
169  break;
170  case 1:
171  coerceValue(value, myMethod);
172  break;
173  case 2:
174  coerceValue(value, myCoords);
175  break;
176  case 3:
177  coerceValue(value, myClose);
178  break;
179  case 4:
180  coerceValue(value, myReverse);
181  break;
182  case 5:
183  coerceValue(value, myOrder);
184  break;
185  case 6:
186  coerceValue(value, myParam);
187  break;
188  case 7:
189  coerceValue(value, myTolerance);
190  break;
191  case 8:
192  coerceValue(value, mySmooth);
193  break;
194  case 9:
195  coerceValue(value, myCsharp);
196  break;
197  case 10:
198  coerceValue(value, myKeepgeo);
199  break;
200  case 11:
201  coerceValue(value, myNormalize);
202  break;
203 
204  }
205  }
206 
207  bool isParmColorRamp(exint idx) const override
208  {
209  switch (idx)
210  {
211 
212  }
213  return false;
214  }
215 
216  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
237  { doGetParmValue(idx, instance, value); }
238 
239  template <typename T>
240  void
241  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
242  {
243  if (idx.size() < 1)
244  return;
245  UT_ASSERT(idx.size() == instance.size()+1);
246  if (idx.size() != instance.size()+1)
247  return;
248  switch (idx[0])
249  {
250  case 0:
251  coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
252  break;
253  case 1:
254  coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
255  break;
256  case 2:
257  coerceValue(myCoords, ( ( value ) ));
258  break;
259  case 3:
260  coerceValue(myClose, ( ( value ) ));
261  break;
262  case 4:
263  coerceValue(myReverse, ( ( value ) ));
264  break;
265  case 5:
266  coerceValue(myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
267  break;
268  case 6:
269  coerceValue(myParam, clampMinValue(0, clampMaxValue(2, value ) ));
270  break;
271  case 7:
272  coerceValue(myTolerance, clampMinValue(0, ( value ) ));
273  break;
274  case 8:
275  coerceValue(mySmooth, clampMinValue(0, clampMaxValue(1, value ) ));
276  break;
277  case 9:
278  coerceValue(myCsharp, ( ( value ) ));
279  break;
280  case 10:
281  coerceValue(myKeepgeo, ( ( value ) ));
282  break;
283  case 11:
284  coerceValue(myNormalize, ( ( value ) ));
285  break;
286 
287  }
288  }
289 
290  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
295  { doSetParmValue(idx, instance, value); }
296  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
299  { doSetParmValue(idx, instance, value); }
300  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
311  { doSetParmValue(idx, instance, value); }
312 
313  exint getNestNumParms(TempIndex idx) const override
314  {
315  if (idx.size() == 0)
316  return 12;
317  switch (idx[0])
318  {
319 
320  }
321  // Invalid
322  return 0;
323  }
324 
325  const char *getNestParmName(TempIndex fieldnum) const override
326  {
327  if (fieldnum.size() < 1)
328  return 0;
329  switch (fieldnum[0])
330  {
331  case 0:
332  return "type";
333  case 1:
334  return "method";
335  case 2:
336  return "coords";
337  case 3:
338  return "close";
339  case 4:
340  return "reverse";
341  case 5:
342  return "order";
343  case 6:
344  return "param";
345  case 7:
346  return "tolerance";
347  case 8:
348  return "smooth";
349  case 9:
350  return "csharp";
351  case 10:
352  return "keepgeo";
353  case 11:
354  return "normalize";
355 
356  }
357  return 0;
358  }
359 
360  ParmType getNestParmType(TempIndex fieldnum) const override
361  {
362  if (fieldnum.size() < 1)
363  return PARM_UNSUPPORTED;
364  switch (fieldnum[0])
365  {
366  case 0:
367  return PARM_INTEGER;
368  case 1:
369  return PARM_INTEGER;
370  case 2:
371  return PARM_STRING;
372  case 3:
373  return PARM_INTEGER;
374  case 4:
375  return PARM_INTEGER;
376  case 5:
377  return PARM_INTEGER;
378  case 6:
379  return PARM_INTEGER;
380  case 7:
381  return PARM_FLOAT;
382  case 8:
383  return PARM_FLOAT;
384  case 9:
385  return PARM_INTEGER;
386  case 10:
387  return PARM_INTEGER;
388  case 11:
389  return PARM_INTEGER;
390 
391  }
392  return PARM_UNSUPPORTED;
393  }
394 
395  // Boiler plate to load individual types.
396  static void loadData(UT_IStream &is, int64 &v)
397  { is.bread(&v, 1); }
398  static void loadData(UT_IStream &is, bool &v)
399  { int64 iv; is.bread(&iv, 1); v = iv; }
400  static void loadData(UT_IStream &is, fpreal64 &v)
401  { is.bread<fpreal64>(&v, 1); }
402  static void loadData(UT_IStream &is, UT_Vector2D &v)
403  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
404  static void loadData(UT_IStream &is, UT_Vector3D &v)
405  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
406  is.bread<fpreal64>(&v.z(), 1); }
407  static void loadData(UT_IStream &is, UT_Vector4D &v)
408  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
409  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
410  static void loadData(UT_IStream &is, UT_Matrix2D &v)
411  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
412  static void loadData(UT_IStream &is, UT_Matrix3D &v)
413  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
414  static void loadData(UT_IStream &is, UT_Matrix4D &v)
415  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
416  static void loadData(UT_IStream &is, UT_Vector2I &v)
417  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
418  static void loadData(UT_IStream &is, UT_Vector3I &v)
419  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
420  is.bread<int64>(&v.z(), 1); }
421  static void loadData(UT_IStream &is, UT_Vector4I &v)
422  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
423  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
425  { is.bread(v); }
427  { UT_StringHolder rampdata;
428  loadData(is, rampdata);
429  if (rampdata.isstring())
430  {
431  v.reset(new UT_Ramp());
432  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
433  v->load(istr);
434  }
435  else v.reset();
436  }
439  loadData(is, data);
440  if (data.isstring())
441  {
442  // Find the data type.
443  const char *colon = UT_StringWrap(data).findChar(':');
444  if (colon)
445  {
446  int typelen = colon - data.buffer();
448  type.strncpy(data.buffer(), typelen);
449  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
450 
451  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
452  }
453  }
454  else v.reset();
455  }
456 
457  static void saveData(std::ostream &os, int64 v)
458  { UTwrite(os, &v); }
459  static void saveData(std::ostream &os, bool v)
460  { int64 iv = v; UTwrite(os, &iv); }
461  static void saveData(std::ostream &os, fpreal64 v)
462  { UTwrite<fpreal64>(os, &v); }
463  static void saveData(std::ostream &os, UT_Vector2D v)
464  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
465  static void saveData(std::ostream &os, UT_Vector3D v)
466  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
467  UTwrite<fpreal64>(os, &v.z()); }
468  static void saveData(std::ostream &os, UT_Vector4D v)
469  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
470  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
471  static void saveData(std::ostream &os, UT_Matrix2D v)
473  static void saveData(std::ostream &os, UT_Matrix3D v)
475  static void saveData(std::ostream &os, UT_Matrix4D v)
477  static void saveData(std::ostream &os, UT_StringHolder s)
478  { UT_StringWrap(s).saveBinary(os); }
479  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
481  UT_OStringStream ostr;
482  if (s) s->save(ostr);
483  result = ostr.str();
484  saveData(os, result);
485  }
486  static void saveData(std::ostream &os, PRM_DataItemHandle s)
488  UT_OStringStream ostr;
489  if (s)
490  {
491  ostr << s->getDataTypeToken();
492  ostr << ":";
493  s->saveBinary(ostr);
494  }
495  result = ostr.str();
496  saveData(os, result);
497  }
498 
499 
500  void save(std::ostream &os) const
501  {
502  int32 v = version();
503  UTwrite(os, &v);
504  saveData(os, myType);
505  saveData(os, myMethod);
506  saveData(os, myCoords);
507  saveData(os, myClose);
508  saveData(os, myReverse);
509  saveData(os, myOrder);
510  saveData(os, myParam);
511  saveData(os, myTolerance);
512  saveData(os, mySmooth);
513  saveData(os, myCsharp);
514  saveData(os, myKeepgeo);
515  saveData(os, myNormalize);
516 
517  }
518 
519  bool load(UT_IStream &is)
520  {
521  int32 v;
522  is.bread(&v, 1);
523  if (version() != v)
524  {
525  // Fail incompatible versions
526  return false;
527  }
528  loadData(is, myType);
529  loadData(is, myMethod);
530  loadData(is, myCoords);
531  loadData(is, myClose);
532  loadData(is, myReverse);
533  loadData(is, myOrder);
534  loadData(is, myParam);
535  loadData(is, myTolerance);
536  loadData(is, mySmooth);
537  loadData(is, myCsharp);
538  loadData(is, myKeepgeo);
539  loadData(is, myNormalize);
540 
541  return true;
542  }
543 
544  Type getType() const { return Type(myType); }
545  void setType(Type val) { myType = int64(val); }
546  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
547  {
548  SOP_Node *thissop = cookparms.getNode();
549  if (!thissop) return getType();
550  int64 result;
551  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
552  return Type(result);
553  }
554  Method getMethod() const { return Method(myMethod); }
555  void setMethod(Method val) { myMethod = int64(val); }
556  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
557  {
558  SOP_Node *thissop = cookparms.getNode();
559  if (!thissop) return getMethod();
560  int64 result;
561  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
562  return Method(result);
563  }
564  const UT_StringHolder & getCoords() const { return myCoords; }
565  void setCoords(const UT_StringHolder & val) { myCoords = val; }
567  {
568  SOP_Node *thissop = cookparms.getNode();
569  if (!thissop) return getCoords();
571  OP_Utils::evalOpParm(result, thissop, "coords", cookparms.getCookTime(), 0);
572  return result;
573  }
574  bool getClose() const { return myClose; }
575  void setClose(bool val) { myClose = val; }
576  bool opClose(const SOP_NodeVerb::CookParms &cookparms) const
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getClose();
580  bool result;
581  OP_Utils::evalOpParm(result, thissop, "close", cookparms.getCookTime(), 0);
582  return result;
583  }
584  bool getReverse() const { return myReverse; }
585  void setReverse(bool val) { myReverse = val; }
586  bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getReverse();
590  bool result;
591  OP_Utils::evalOpParm(result, thissop, "reverse", cookparms.getCookTime(), 0);
592  return result;
593  }
594  int64 getOrder() const { return myOrder; }
595  void setOrder(int64 val) { myOrder = val; }
596  int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getOrder();
600  int64 result;
601  OP_Utils::evalOpParm(result, thissop, "order", cookparms.getCookTime(), 0);
602  return result;
603  }
604  Param getParam() const { return Param(myParam); }
605  void setParam(Param val) { myParam = int64(val); }
606  Param opParam(const SOP_NodeVerb::CookParms &cookparms) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getParam();
610  int64 result;
611  OP_Utils::evalOpParm(result, thissop, "param", cookparms.getCookTime(), 0);
612  return Param(result);
613  }
614  fpreal64 getTolerance() const { return myTolerance; }
615  void setTolerance(fpreal64 val) { myTolerance = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getTolerance();
621  OP_Utils::evalOpParm(result, thissop, "tolerance", cookparms.getCookTime(), 0);
622  return result;
623  }
624  fpreal64 getSmooth() const { return mySmooth; }
625  void setSmooth(fpreal64 val) { mySmooth = val; }
626  fpreal64 opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getSmooth();
631  OP_Utils::evalOpParm(result, thissop, "smooth", cookparms.getCookTime(), 0);
632  return result;
633  }
634  bool getCsharp() const { return myCsharp; }
635  void setCsharp(bool val) { myCsharp = val; }
636  bool opCsharp(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getCsharp();
640  bool result;
641  OP_Utils::evalOpParm(result, thissop, "csharp", cookparms.getCookTime(), 0);
642  return result;
643  }
644  bool getKeepgeo() const { return myKeepgeo; }
645  void setKeepgeo(bool val) { myKeepgeo = val; }
646  bool opKeepgeo(const SOP_NodeVerb::CookParms &cookparms) const
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getKeepgeo();
650  bool result;
651  OP_Utils::evalOpParm(result, thissop, "keepgeo", cookparms.getCookTime(), 0);
652  return result;
653  }
654  bool getNormalize() const { return myNormalize; }
655  void setNormalize(bool val) { myNormalize = val; }
656  bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getNormalize();
660  bool result;
661  OP_Utils::evalOpParm(result, thissop, "normalize", cookparms.getCookTime(), 0);
662  return result;
663  }
664 
665 private:
666  int64 myType;
667  int64 myMethod;
668  UT_StringHolder myCoords;
669  bool myClose;
670  bool myReverse;
671  int64 myOrder;
672  int64 myParam;
673  fpreal64 myTolerance;
674  fpreal64 mySmooth;
675  bool myCsharp;
676  bool myKeepgeo;
677  bool myNormalize;
678 
679 };
int64 getOrder() const
void copyFrom(const OP_NodeParms *src) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
void setParam(Param val)
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
int myOrder
Definition: GT_CurveEval.h:263
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool getClose() const
void setType(Type val)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
bool opKeepgeo(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getTime() const
Definition: OP_Context.h:62
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Vector2D v)
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, int64 v)
void setSmooth(fpreal64 val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE const char * buffer() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GLdouble s
Definition: glad.h:3009
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
bool load(UT_IStream &is)
An output stream object that owns its own string buffer storage.
void setTolerance(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
**But if you need a result
Definition: thread.h:613
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
Type getType() const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setReverse(bool val)
void setCsharp(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_Vector3D v)
void setClose(bool val)
void setKeepgeo(bool val)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setMethod(Method val)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 getTolerance() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
fpreal64 getSmooth() const
UT_StringHolder opCoords(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, bool v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator!=(const SOP_CurveParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setCoords(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
exint getNestNumParms(TempIndex idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool getCsharp() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool getNormalize() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
void setOrder(int64 val)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool isParmColorRamp(exint idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
const UT_StringHolder & getCoords() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool opCsharp(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLfloat * val
Definition: glcorearb.h:1608
static int version()
#define SOP_API
Definition: SOP_API.h:10
bool opClose(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_CurveParms &src) const
Param getParam() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void saveData(std::ostream &os, UT_StringHolder s)
void setNormalize(bool val)
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
type
Definition: core.h:1059
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool getReverse() const
Method getMethod() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
fpreal64 opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
Param opParam(const SOP_NodeVerb::CookParms &cookparms) const
bool getKeepgeo() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void saveData(std::ostream &os, UT_Matrix2D 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