HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Rest.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_RestEnums
24 {
25  enum class Mode
26  {
27  STORE = 0,
28  EXTRACT,
29  SWAP
30  };
31  enum class Nml
32  {
33  OFF = 0,
34  POLY,
35  ON
36  };
37  enum class Xform
38  {
39  OFF = 0,
40  POLY,
41  ON
42  };
43  enum class Quadric
44  {
45  OFF = 0,
46  POLY,
47  ON
48  };
49  enum class Precision
50  {
51  AUTO = 0,
52  _32,
53  _64
54  };
55 }
56 
57 
59 {
60 public:
61  static int version() { return 1; }
62 
64  {
65  myMode = 0;
66  myRestAttribName = "rest"_UTsh;
67  myFile = ""_UTsh;
68  myNml = 0;
69  myNormalsAttribName = "rnml"_UTsh;
70  myXform = 0;
71  myXformAttribName = "restxform"_UTsh;
72  myQuadric = 0;
73  myQuadricAttribName = "Pref"_UTsh;
74  myPrecision = 0;
75 
76  }
77 
78  explicit SOP_RestParms(const SOP_RestParms &) = default;
79  SOP_RestParms &operator=(const SOP_RestParms &) = default;
80  SOP_RestParms(SOP_RestParms &&) noexcept = default;
81  SOP_RestParms &operator=(SOP_RestParms &&) noexcept = default;
82 
83  ~SOP_RestParms() override {}
84 
85  bool operator==(const SOP_RestParms &src) const
86  {
87  if (myMode != src.myMode) return false;
88  if (myRestAttribName != src.myRestAttribName) return false;
89  if (myFile != src.myFile) return false;
90  if (myNml != src.myNml) return false;
91  if (myNormalsAttribName != src.myNormalsAttribName) return false;
92  if (myXform != src.myXform) return false;
93  if (myXformAttribName != src.myXformAttribName) return false;
94  if (myQuadric != src.myQuadric) return false;
95  if (myQuadricAttribName != src.myQuadricAttribName) return false;
96  if (myPrecision != src.myPrecision) return false;
97 
98  return true;
99  }
100  bool operator!=(const SOP_RestParms &src) const
101  {
102  return !operator==(src);
103  }
109 
110 
111 
112  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
113  {
114  myMode = 0;
115  if (true)
116  graph->evalOpParm(myMode, nodeidx, "mode", time, 0);
117  myRestAttribName = "rest"_UTsh;
118  if (true)
119  graph->evalOpParm(myRestAttribName, nodeidx, "restattribname", time, 0);
120  myFile = ""_UTsh;
121  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((int64(getMode())!=0)))) ) )
122  graph->evalOpParm(myFile, nodeidx, "file", time, 0);
123  myNml = 0;
124  if (true)
125  graph->evalOpParm(myNml, nodeidx, "nml", time, 0);
126  myNormalsAttribName = "rnml"_UTsh;
127  if (true && ( (true&&!(((int64(getNml())==0)))) ) )
128  graph->evalOpParm(myNormalsAttribName, nodeidx, "normalattribname", time, 0);
129  myXform = 0;
130  if (true)
131  graph->evalOpParm(myXform, nodeidx, "xform", time, 0);
132  myXformAttribName = "restxform"_UTsh;
133  if (true && ( (true&&!(((int64(getXform())==0)))) ) )
134  graph->evalOpParm(myXformAttribName, nodeidx, "xformattribname", time, 0);
135  myQuadric = 0;
136  if (true)
137  graph->evalOpParm(myQuadric, nodeidx, "quadric", time, 0);
138  myQuadricAttribName = "Pref"_UTsh;
139  if (true && ( (true&&!(((int64(getQuadric())==0)))) ) )
140  graph->evalOpParm(myQuadricAttribName, nodeidx, "quadricattribname", time, 0);
141  myPrecision = 0;
142  if (true)
143  graph->evalOpParm(myPrecision, nodeidx, "precision", time, 0);
144 
145  }
146 
147 
148  void loadFromOpSubclass(const LoadParms &loadparms) override
149  {
150  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
151  }
152 
153 
154  void copyFrom(const OP_NodeParms *src) override
155  {
156  *this = *((const SOP_RestParms *)src);
157  }
158 
159  template <typename T>
160  void
161  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
162  {
163  if (idx.size() < 1)
164  return;
165  UT_ASSERT(idx.size() == instance.size()+1);
166  if (idx.size() != instance.size()+1)
167  return;
168  switch (idx[0])
169  {
170  case 0:
171  coerceValue(value, myMode);
172  break;
173  case 1:
174  coerceValue(value, myRestAttribName);
175  break;
176  case 2:
177  coerceValue(value, myFile);
178  break;
179  case 3:
180  coerceValue(value, myNml);
181  break;
182  case 4:
183  coerceValue(value, myNormalsAttribName);
184  break;
185  case 5:
186  coerceValue(value, myXform);
187  break;
188  case 6:
189  coerceValue(value, myXformAttribName);
190  break;
191  case 7:
192  coerceValue(value, myQuadric);
193  break;
194  case 8:
195  coerceValue(value, myQuadricAttribName);
196  break;
197  case 9:
198  coerceValue(value, myPrecision);
199  break;
200 
201  }
202  }
203 
204  bool isParmColorRamp(exint idx) const override
205  {
206  switch (idx)
207  {
208 
209  }
210  return false;
211  }
212 
213  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
214  { doGetParmValue(idx, instance, value); }
215  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
216  { doGetParmValue(idx, instance, value); }
217  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
218  { doGetParmValue(idx, instance, value); }
219  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
220  { doGetParmValue(idx, instance, value); }
221  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
222  { doGetParmValue(idx, instance, value); }
223  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
234  { doGetParmValue(idx, instance, value); }
235 
236  template <typename T>
237  void
238  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
239  {
240  if (idx.size() < 1)
241  return;
242  UT_ASSERT(idx.size() == instance.size()+1);
243  if (idx.size() != instance.size()+1)
244  return;
245  switch (idx[0])
246  {
247  case 0:
248  coerceValue(myMode, clampMinValue(0, clampMaxValue(2, value ) ));
249  break;
250  case 1:
251  coerceValue(myRestAttribName, ( ( value ) ));
252  break;
253  case 2:
254  coerceValue(myFile, ( ( value ) ));
255  break;
256  case 3:
257  coerceValue(myNml, clampMinValue(0, clampMaxValue(2, value ) ));
258  break;
259  case 4:
260  coerceValue(myNormalsAttribName, ( ( value ) ));
261  break;
262  case 5:
263  coerceValue(myXform, clampMinValue(0, clampMaxValue(2, value ) ));
264  break;
265  case 6:
266  coerceValue(myXformAttribName, ( ( value ) ));
267  break;
268  case 7:
269  coerceValue(myQuadric, clampMinValue(0, clampMaxValue(2, value ) ));
270  break;
271  case 8:
272  coerceValue(myQuadricAttribName, ( ( value ) ));
273  break;
274  case 9:
275  coerceValue(myPrecision, clampMinValue(0, clampMaxValue(2, value ) ));
276  break;
277 
278  }
279  }
280 
281  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
282  { doSetParmValue(idx, instance, value); }
283  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
284  { doSetParmValue(idx, instance, value); }
285  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
286  { doSetParmValue(idx, instance, value); }
287  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
288  { doSetParmValue(idx, instance, value); }
289  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
290  { doSetParmValue(idx, instance, value); }
291  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
292  { doSetParmValue(idx, instance, value); }
293  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
302  { doSetParmValue(idx, instance, value); }
303 
304  exint getNestNumParms(TempIndex idx) const override
305  {
306  if (idx.size() == 0)
307  return 10;
308  switch (idx[0])
309  {
310 
311  }
312  // Invalid
313  return 0;
314  }
315 
316  const char *getNestParmName(TempIndex fieldnum) const override
317  {
318  if (fieldnum.size() < 1)
319  return 0;
320  switch (fieldnum[0])
321  {
322  case 0:
323  return "mode";
324  case 1:
325  return "restattribname";
326  case 2:
327  return "file";
328  case 3:
329  return "nml";
330  case 4:
331  return "normalattribname";
332  case 5:
333  return "xform";
334  case 6:
335  return "xformattribname";
336  case 7:
337  return "quadric";
338  case 8:
339  return "quadricattribname";
340  case 9:
341  return "precision";
342 
343  }
344  return 0;
345  }
346 
347  ParmType getNestParmType(TempIndex fieldnum) const override
348  {
349  if (fieldnum.size() < 1)
350  return PARM_UNSUPPORTED;
351  switch (fieldnum[0])
352  {
353  case 0:
354  return PARM_INTEGER;
355  case 1:
356  return PARM_STRING;
357  case 2:
358  return PARM_STRING;
359  case 3:
360  return PARM_INTEGER;
361  case 4:
362  return PARM_STRING;
363  case 5:
364  return PARM_INTEGER;
365  case 6:
366  return PARM_STRING;
367  case 7:
368  return PARM_INTEGER;
369  case 8:
370  return PARM_STRING;
371  case 9:
372  return PARM_INTEGER;
373 
374  }
375  return PARM_UNSUPPORTED;
376  }
377 
378  // Boiler plate to load individual types.
379  static void loadData(UT_IStream &is, int64 &v)
380  { is.bread(&v, 1); }
381  static void loadData(UT_IStream &is, bool &v)
382  { int64 iv; is.bread(&iv, 1); v = iv; }
383  static void loadData(UT_IStream &is, fpreal64 &v)
384  { is.bread<fpreal64>(&v, 1); }
385  static void loadData(UT_IStream &is, UT_Vector2D &v)
386  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
387  static void loadData(UT_IStream &is, UT_Vector3D &v)
388  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
389  is.bread<fpreal64>(&v.z(), 1); }
390  static void loadData(UT_IStream &is, UT_Vector4D &v)
391  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
392  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
393  static void loadData(UT_IStream &is, UT_Matrix2D &v)
394  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
395  static void loadData(UT_IStream &is, UT_Matrix3D &v)
396  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
397  static void loadData(UT_IStream &is, UT_Matrix4D &v)
398  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
399  static void loadData(UT_IStream &is, UT_Vector2I &v)
400  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
401  static void loadData(UT_IStream &is, UT_Vector3I &v)
402  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
403  is.bread<int64>(&v.z(), 1); }
404  static void loadData(UT_IStream &is, UT_Vector4I &v)
405  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
406  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
408  { is.bread(v); }
410  { UT_StringHolder rampdata;
411  loadData(is, rampdata);
412  if (rampdata.isstring())
413  {
414  v.reset(new UT_Ramp());
415  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
416  v->load(istr);
417  }
418  else v.reset();
419  }
422  loadData(is, data);
423  if (data.isstring())
424  {
425  // Find the data type.
426  const char *colon = UT_StringWrap(data).findChar(':');
427  if (colon)
428  {
429  int typelen = colon - data.buffer();
431  type.strncpy(data.buffer(), typelen);
432  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
433 
434  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
435  }
436  }
437  else v.reset();
438  }
439 
440  static void saveData(std::ostream &os, int64 v)
441  { UTwrite(os, &v); }
442  static void saveData(std::ostream &os, bool v)
443  { int64 iv = v; UTwrite(os, &iv); }
444  static void saveData(std::ostream &os, fpreal64 v)
445  { UTwrite<fpreal64>(os, &v); }
446  static void saveData(std::ostream &os, UT_Vector2D v)
447  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
448  static void saveData(std::ostream &os, UT_Vector3D v)
449  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
450  UTwrite<fpreal64>(os, &v.z()); }
451  static void saveData(std::ostream &os, UT_Vector4D v)
452  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
453  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
454  static void saveData(std::ostream &os, UT_Matrix2D v)
456  static void saveData(std::ostream &os, UT_Matrix3D v)
458  static void saveData(std::ostream &os, UT_Matrix4D v)
460  static void saveData(std::ostream &os, UT_StringHolder s)
461  { UT_StringWrap(s).saveBinary(os); }
462  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
464  UT_OStringStream ostr;
465  if (s) s->save(ostr);
466  result = ostr.str();
467  saveData(os, result);
468  }
469  static void saveData(std::ostream &os, PRM_DataItemHandle s)
471  UT_OStringStream ostr;
472  if (s)
473  {
474  ostr << s->getDataTypeToken();
475  ostr << ":";
476  s->saveBinary(ostr);
477  }
478  result = ostr.str();
479  saveData(os, result);
480  }
481 
482 
483  void save(std::ostream &os) const
484  {
485  int32 v = version();
486  UTwrite(os, &v);
487  saveData(os, myMode);
488  saveData(os, myRestAttribName);
489  saveData(os, myFile);
490  saveData(os, myNml);
491  saveData(os, myNormalsAttribName);
492  saveData(os, myXform);
493  saveData(os, myXformAttribName);
494  saveData(os, myQuadric);
495  saveData(os, myQuadricAttribName);
496  saveData(os, myPrecision);
497 
498  }
499 
500  bool load(UT_IStream &is)
501  {
502  int32 v;
503  is.bread(&v, 1);
504  if (version() != v)
505  {
506  // Fail incompatible versions
507  return false;
508  }
509  loadData(is, myMode);
510  loadData(is, myRestAttribName);
511  loadData(is, myFile);
512  loadData(is, myNml);
513  loadData(is, myNormalsAttribName);
514  loadData(is, myXform);
515  loadData(is, myXformAttribName);
516  loadData(is, myQuadric);
517  loadData(is, myQuadricAttribName);
518  loadData(is, myPrecision);
519 
520  return true;
521  }
522 
523  Mode getMode() const { return Mode(myMode); }
524  void setMode(Mode val) { myMode = int64(val); }
525  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
526  {
527  SOP_Node *thissop = cookparms.getNode();
528  if (!thissop) return getMode();
529  int64 result;
530  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
531  return Mode(result);
532  }
533  const UT_StringHolder & getRestAttribName() const { return myRestAttribName; }
534  void setRestAttribName(const UT_StringHolder & val) { myRestAttribName = val; }
536  {
537  SOP_Node *thissop = cookparms.getNode();
538  if (!thissop) return getRestAttribName();
540  OP_Utils::evalOpParm(result, thissop, "restattribname", cookparms.getCookTime(), 0);
541  return result;
542  }
543  const UT_StringHolder & getFile() const { return myFile; }
544  void setFile(const UT_StringHolder & val) { myFile = val; }
546  {
547  SOP_Node *thissop = cookparms.getNode();
548  if (!thissop) return getFile();
550  OP_Utils::evalOpParm(result, thissop, "file", cookparms.getCookTime(), 0);
551  return result;
552  }
553  Nml getNml() const { return Nml(myNml); }
554  void setNml(Nml val) { myNml = int64(val); }
555  Nml opNml(const SOP_NodeVerb::CookParms &cookparms) const
556  {
557  SOP_Node *thissop = cookparms.getNode();
558  if (!thissop) return getNml();
559  int64 result;
560  OP_Utils::evalOpParm(result, thissop, "nml", cookparms.getCookTime(), 0);
561  return Nml(result);
562  }
563  const UT_StringHolder & getNormalsAttribName() const { return myNormalsAttribName; }
564  void setNormalsAttribName(const UT_StringHolder & val) { myNormalsAttribName = val; }
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return getNormalsAttribName();
570  OP_Utils::evalOpParm(result, thissop, "normalattribname", cookparms.getCookTime(), 0);
571  return result;
572  }
573  Xform getXform() const { return Xform(myXform); }
574  void setXform(Xform val) { myXform = int64(val); }
575  Xform opXform(const SOP_NodeVerb::CookParms &cookparms) const
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getXform();
579  int64 result;
580  OP_Utils::evalOpParm(result, thissop, "xform", cookparms.getCookTime(), 0);
581  return Xform(result);
582  }
583  const UT_StringHolder & getXformAttribName() const { return myXformAttribName; }
584  void setXformAttribName(const UT_StringHolder & val) { myXformAttribName = val; }
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getXformAttribName();
590  OP_Utils::evalOpParm(result, thissop, "xformattribname", cookparms.getCookTime(), 0);
591  return result;
592  }
593  Quadric getQuadric() const { return Quadric(myQuadric); }
594  void setQuadric(Quadric val) { myQuadric = int64(val); }
595  Quadric opQuadric(const SOP_NodeVerb::CookParms &cookparms) const
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getQuadric();
599  int64 result;
600  OP_Utils::evalOpParm(result, thissop, "quadric", cookparms.getCookTime(), 0);
601  return Quadric(result);
602  }
603  const UT_StringHolder & getQuadricAttribName() const { return myQuadricAttribName; }
604  void setQuadricAttribName(const UT_StringHolder & val) { myQuadricAttribName = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getQuadricAttribName();
610  OP_Utils::evalOpParm(result, thissop, "quadricattribname", cookparms.getCookTime(), 0);
611  return result;
612  }
613  Precision getPrecision() const { return Precision(myPrecision); }
614  void setPrecision(Precision val) { myPrecision = int64(val); }
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getPrecision();
619  int64 result;
620  OP_Utils::evalOpParm(result, thissop, "precision", cookparms.getCookTime(), 0);
621  return Precision(result);
622  }
623 
624 private:
625  int64 myMode;
626  UT_StringHolder myRestAttribName;
627  UT_StringHolder myFile;
628  int64 myNml;
629  UT_StringHolder myNormalsAttribName;
630  int64 myXform;
631  UT_StringHolder myXformAttribName;
632  int64 myQuadric;
633  UT_StringHolder myQuadricAttribName;
634  int64 myPrecision;
635 
636 };
void setRestAttribName(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
Quadric getQuadric() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
UT_StringHolder opQuadricAttribName(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getXformAttribName() const
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
Nml getNml() const
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
UT_StringHolder opRestAttribName(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setMode(Mode val)
static void saveData(std::ostream &os, UT_Matrix3D v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE const char * buffer() const
const UT_StringHolder & getNormalsAttribName() const
void setNml(Nml val)
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
**But if you need a result
Definition: thread.h:613
void setXform(Xform val)
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, fpreal64 &v)
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
Quadric opQuadric(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getFile() const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
double fpreal64
Definition: SYS_Types.h:201
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setPrecision(Precision val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool isParmColorRamp(exint idx) const override
bool operator==(const SOP_RestParms &src) const
exint length() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) 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
static void loadData(UT_IStream &is, UT_Vector4D &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
UT_StringHolder opFile(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Mode getMode() const
Precision opPrecision(const SOP_NodeVerb::CookParms &cookparms) const
Nml opNml(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Xform getXform() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
const UT_StringHolder & getRestAttribName() const
GT_API const UT_StringHolder version
void setNormalsAttribName(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
static void loadData(UT_IStream &is, int64 &v)
bool operator!=(const SOP_RestParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal64 fpreal
Definition: SYS_Types.h:277
void copyFrom(const OP_NodeParms *src) override
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
static void saveData(std::ostream &os, UT_Vector4D v)
void setQuadricAttribName(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void saveData(std::ostream &os, UT_Vector3D v)
#define SOP_API
Definition: SOP_API.h:10
exint getNestNumParms(TempIndex idx) const override
const UT_StringHolder & getQuadricAttribName() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setFile(const UT_StringHolder &val)
void setXformAttribName(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, 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 doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Xform opXform(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLboolean r
Definition: glcorearb.h:1222
void setQuadric(Quadric val)
static int version()
Precision getPrecision() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opXformAttribName(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
type
Definition: core.h:1059
static void saveData(std::ostream &os, bool v)
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
static void loadData(UT_IStream &is, UT_Vector3D &v)
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
ParmType getNestParmType(TempIndex fieldnum) const override
GLenum src
Definition: glcorearb.h:1793
UT_StringHolder opNormalsAttribName(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_Vector2I &v)