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