HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVProject.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_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_UVProjectEnums
24 {
25  enum class GroupType
26  {
27  VERTICES = 0,
28  POINTS
29  };
30  enum class ProjType
31  {
32  TEXTURE = 0,
33  POLAR,
34  CYLIN,
35  TORUS,
36  WRAP
37  };
38  enum class Xord
39  {
40  SRT = 0,
41  STR,
42  RST,
43  RTS,
44  TSR,
45  TRS
46  };
47  enum class Rord
48  {
49  XYZ = 0,
50  XZY,
51  YXZ,
52  YZX,
53  ZXY,
54  ZYX
55  };
56  enum class Inittype
57  {
58  XY = 0,
59  YZ,
60  ZX,
61  BEST
62  };
63 }
64 
65 
67 {
68 public:
69  static int version() { return 1; }
70 
72  {
73  myUVAttrib = "uv"_sh;
74  myGroup = ""_sh;
75  myGroupType = 0;
76  myProjType = 0;
77  myTorRad = 0.2;
78  myXord = 0;
79  myRord = 0;
80  myT = UT_Vector3D(0,0,0);
81  myR = UT_Vector3D(0,0,0);
82  myS = UT_Vector3D(1,1,1);
83  myP = UT_Vector3D(0,0,0);
84  myInittype = 3;
85  myURange = UT_Vector2D(0,1);
86  myVRange = UT_Vector2D(0,1);
87  myAngle = 0;
88  myFixSeams = true;
89  myFixPolar = true;
90  myPoleRad = 0.01;
91 
92  }
93 
94  explicit SOP_UVProjectParms(const SOP_UVProjectParms &) = default;
95 
96  ~SOP_UVProjectParms() override {}
97 
98  bool operator==(const SOP_UVProjectParms &src) const
99  {
100  if (myUVAttrib != src.myUVAttrib) return false;
101  if (myGroup != src.myGroup) return false;
102  if (myGroupType != src.myGroupType) return false;
103  if (myProjType != src.myProjType) return false;
104  if (myTorRad != src.myTorRad) return false;
105  if (myXord != src.myXord) return false;
106  if (myRord != src.myRord) return false;
107  if (myT != src.myT) return false;
108  if (myR != src.myR) return false;
109  if (myS != src.myS) return false;
110  if (myP != src.myP) return false;
111  if (myInittype != src.myInittype) return false;
112  if (myURange != src.myURange) return false;
113  if (myVRange != src.myVRange) return false;
114  if (myAngle != src.myAngle) return false;
115  if (myFixSeams != src.myFixSeams) return false;
116  if (myFixPolar != src.myFixPolar) return false;
117  if (myPoleRad != src.myPoleRad) return false;
118 
119  return true;
120  }
121  bool operator!=(const SOP_UVProjectParms &src) const
122  {
123  return !operator==(src);
124  }
130 
131 
132 
133  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
134  {
135  myUVAttrib = "uv"_sh;
136  if (true)
137  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, 0);
138  myGroup = ""_sh;
139  if (true)
140  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
141  myGroupType = 0;
142  if (true)
143  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, 0);
144  myProjType = 0;
145  if (true)
146  graph->evalOpParm(myProjType, nodeidx, "projtype", time, 0);
147  myTorRad = 0.2;
148  if (true && ( (!(((int64(getProjType())!=3)))) ) )
149  graph->evalOpParm(myTorRad, nodeidx, "torrad", time, 0);
150  myXord = 0;
151  if (true)
152  graph->evalOpParm(myXord, nodeidx, "xOrd", time, 0);
153  myRord = 0;
154  if (true)
155  graph->evalOpParm(myRord, nodeidx, "rOrd", time, 0);
156  myT = UT_Vector3D(0,0,0);
157  if (true)
158  graph->evalOpParm(myT, nodeidx, "t", time, 0);
159  myR = UT_Vector3D(0,0,0);
160  if (true)
161  graph->evalOpParm(myR, nodeidx, "r", time, 0);
162  myS = UT_Vector3D(1,1,1);
163  if (true)
164  graph->evalOpParm(myS, nodeidx, "s", time, 0);
165  myP = UT_Vector3D(0,0,0);
166  if (true)
167  graph->evalOpParm(myP, nodeidx, "p", time, 0);
168  myInittype = 3;
169  if (true)
170  graph->evalOpParm(myInittype, nodeidx, "inittype", time, 0);
171  myURange = UT_Vector2D(0,1);
172  if (true)
173  graph->evalOpParm(myURange, nodeidx, "urange", time, 0);
174  myVRange = UT_Vector2D(0,1);
175  if (true)
176  graph->evalOpParm(myVRange, nodeidx, "vrange", time, 0);
177  myAngle = 0;
178  if (true)
179  graph->evalOpParm(myAngle, nodeidx, "angle", time, 0);
180  myFixSeams = true;
181  if (true && ( (!(((int64(getProjType())==0))||((int64(getProjType())==4)))) ) )
182  graph->evalOpParm(myFixSeams, nodeidx, "fixseams", time, 0);
183  myFixPolar = true;
184  if (true && ( (!(((int64(getProjType())==0))||((int64(getProjType())==3)))) ) )
185  graph->evalOpParm(myFixPolar, nodeidx, "fixpolar", time, 0);
186  myPoleRad = 0.01;
187  if (true && ( (!(((int64(getProjType())==0))||((int64(getProjType())==3))||((getFixPolar()==0)))) ) )
188  graph->evalOpParm(myPoleRad, nodeidx, "polerad", time, 0);
189 
190  }
191 
192 
193  void loadFromOpSubclass(const LoadParms &loadparms) override
194  {
195  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
196  }
197 
198 
199  void copyFrom(const SOP_NodeParms *src) override
200  {
201  *this = *((const SOP_UVProjectParms *)src);
202  }
203 
204  template <typename T>
205  void
206  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
207  {
208  if (idx.size() < 1)
209  return;
210  UT_ASSERT(idx.size() == instance.size()+1);
211  if (idx.size() != instance.size()+1)
212  return;
213  switch (idx[0])
214  {
215  case 0:
216  coerceValue(value, myUVAttrib);
217  break;
218  case 1:
219  coerceValue(value, myGroup);
220  break;
221  case 2:
222  coerceValue(value, myGroupType);
223  break;
224  case 3:
225  coerceValue(value, myProjType);
226  break;
227  case 4:
228  coerceValue(value, myTorRad);
229  break;
230  case 5:
231  coerceValue(value, myXord);
232  break;
233  case 6:
234  coerceValue(value, myRord);
235  break;
236  case 7:
237  coerceValue(value, myT);
238  break;
239  case 8:
240  coerceValue(value, myR);
241  break;
242  case 9:
243  coerceValue(value, myS);
244  break;
245  case 10:
246  coerceValue(value, myP);
247  break;
248  case 11:
249  coerceValue(value, myInittype);
250  break;
251  case 12:
252  coerceValue(value, myURange);
253  break;
254  case 13:
255  coerceValue(value, myVRange);
256  break;
257  case 14:
258  coerceValue(value, myAngle);
259  break;
260  case 15:
261  coerceValue(value, myFixSeams);
262  break;
263  case 16:
264  coerceValue(value, myFixPolar);
265  break;
266  case 17:
267  coerceValue(value, myPoleRad);
268  break;
269 
270  }
271  }
272 
273  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
274  { doGetParmValue(idx, instance, value); }
275  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
278  { doGetParmValue(idx, instance, value); }
279  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
280  { doGetParmValue(idx, instance, value); }
281  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
282  { doGetParmValue(idx, instance, value); }
283  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
294  { doGetParmValue(idx, instance, value); }
295 
296  template <typename T>
297  void
298  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
299  {
300  if (idx.size() < 1)
301  return;
302  UT_ASSERT(idx.size() == instance.size()+1);
303  if (idx.size() != instance.size()+1)
304  return;
305  switch (idx[0])
306  {
307  case 0:
308  coerceValue(myUVAttrib, value);
309  break;
310  case 1:
311  coerceValue(myGroup, value);
312  break;
313  case 2:
314  coerceValue(myGroupType, value);
315  break;
316  case 3:
317  coerceValue(myProjType, value);
318  break;
319  case 4:
320  coerceValue(myTorRad, value);
321  break;
322  case 5:
323  coerceValue(myXord, value);
324  break;
325  case 6:
326  coerceValue(myRord, value);
327  break;
328  case 7:
329  coerceValue(myT, value);
330  break;
331  case 8:
332  coerceValue(myR, value);
333  break;
334  case 9:
335  coerceValue(myS, value);
336  break;
337  case 10:
338  coerceValue(myP, value);
339  break;
340  case 11:
341  coerceValue(myInittype, value);
342  break;
343  case 12:
344  coerceValue(myURange, value);
345  break;
346  case 13:
347  coerceValue(myVRange, value);
348  break;
349  case 14:
350  coerceValue(myAngle, value);
351  break;
352  case 15:
353  coerceValue(myFixSeams, value);
354  break;
355  case 16:
356  coerceValue(myFixPolar, value);
357  break;
358  case 17:
359  coerceValue(myPoleRad, value);
360  break;
361 
362  }
363  }
364 
365  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
366  { doSetParmValue(idx, instance, value); }
367  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
368  { doSetParmValue(idx, instance, value); }
369  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
370  { doSetParmValue(idx, instance, value); }
371  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
372  { doSetParmValue(idx, instance, value); }
373  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
386  { doSetParmValue(idx, instance, value); }
387 
388  exint getNestNumParms(TempIndex idx) const override
389  {
390  if (idx.size() == 0)
391  return 18;
392  switch (idx[0])
393  {
394 
395  }
396  // Invalid
397  return 0;
398  }
399 
400  const char *getNestParmName(TempIndex fieldnum) const override
401  {
402  if (fieldnum.size() < 1)
403  return 0;
404  switch (fieldnum[0])
405  {
406  case 0:
407  return "uvattrib";
408  case 1:
409  return "group";
410  case 2:
411  return "grouptype";
412  case 3:
413  return "projtype";
414  case 4:
415  return "torrad";
416  case 5:
417  return "xOrd";
418  case 6:
419  return "rOrd";
420  case 7:
421  return "t";
422  case 8:
423  return "r";
424  case 9:
425  return "s";
426  case 10:
427  return "p";
428  case 11:
429  return "inittype";
430  case 12:
431  return "urange";
432  case 13:
433  return "vrange";
434  case 14:
435  return "angle";
436  case 15:
437  return "fixseams";
438  case 16:
439  return "fixpolar";
440  case 17:
441  return "polerad";
442 
443  }
444  return 0;
445  }
446 
447  ParmType getNestParmType(TempIndex fieldnum) const override
448  {
449  if (fieldnum.size() < 1)
450  return PARM_UNSUPPORTED;
451  switch (fieldnum[0])
452  {
453  case 0:
454  return PARM_STRING;
455  case 1:
456  return PARM_STRING;
457  case 2:
458  return PARM_INTEGER;
459  case 3:
460  return PARM_INTEGER;
461  case 4:
462  return PARM_FLOAT;
463  case 5:
464  return PARM_INTEGER;
465  case 6:
466  return PARM_INTEGER;
467  case 7:
468  return PARM_VECTOR3;
469  case 8:
470  return PARM_VECTOR3;
471  case 9:
472  return PARM_VECTOR3;
473  case 10:
474  return PARM_VECTOR3;
475  case 11:
476  return PARM_INTEGER;
477  case 12:
478  return PARM_VECTOR2;
479  case 13:
480  return PARM_VECTOR2;
481  case 14:
482  return PARM_FLOAT;
483  case 15:
484  return PARM_INTEGER;
485  case 16:
486  return PARM_INTEGER;
487  case 17:
488  return PARM_FLOAT;
489 
490  }
491  return PARM_UNSUPPORTED;
492  }
493 
494  // Boiler plate to load individual types.
495  static void loadData(UT_IStream &is, int64 &v)
496  { is.bread(&v, 1); }
497  static void loadData(UT_IStream &is, bool &v)
498  { int64 iv; is.bread(&iv, 1); v = iv; }
499  static void loadData(UT_IStream &is, fpreal64 &v)
500  { is.bread<fpreal64>(&v, 1); }
501  static void loadData(UT_IStream &is, UT_Vector2D &v)
502  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
503  static void loadData(UT_IStream &is, UT_Vector3D &v)
504  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
505  is.bread<fpreal64>(&v.z(), 1); }
506  static void loadData(UT_IStream &is, UT_Vector4D &v)
507  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
508  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
509  static void loadData(UT_IStream &is, UT_Matrix2D &v)
510  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
511  static void loadData(UT_IStream &is, UT_Matrix3D &v)
512  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
513  static void loadData(UT_IStream &is, UT_Matrix4D &v)
514  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
515  static void loadData(UT_IStream &is, UT_Vector2I &v)
516  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
517  static void loadData(UT_IStream &is, UT_Vector3I &v)
518  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
519  is.bread<int64>(&v.z(), 1); }
520  static void loadData(UT_IStream &is, UT_Vector4I &v)
521  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
522  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
524  { is.bread(v); }
526  { UT_StringHolder rampdata;
527  loadData(is, rampdata);
528  if (rampdata.isstring())
529  {
530  v.reset(new UT_Ramp());
531  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
532  v->load(istr);
533  }
534  else v.reset();
535  }
538  loadData(is, data);
539  if (data.isstring())
540  {
541  // Find the data type.
542  const char *colon = UT_StringWrap(data).findChar(':');
543  if (colon)
544  {
545  int typelen = colon - data.buffer();
547  type.strncpy(data.buffer(), typelen);
548  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
549 
550  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
551  }
552  }
553  else v.reset();
554  }
555 
556  static void saveData(std::ostream &os, int64 v)
557  { UTwrite(os, &v); }
558  static void saveData(std::ostream &os, bool v)
559  { int64 iv = v; UTwrite(os, &iv); }
560  static void saveData(std::ostream &os, fpreal64 v)
561  { UTwrite<fpreal64>(os, &v); }
562  static void saveData(std::ostream &os, UT_Vector2D v)
563  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
564  static void saveData(std::ostream &os, UT_Vector3D v)
565  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
566  UTwrite<fpreal64>(os, &v.z()); }
567  static void saveData(std::ostream &os, UT_Vector4D v)
568  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
569  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
570  static void saveData(std::ostream &os, UT_Matrix2D v)
572  static void saveData(std::ostream &os, UT_Matrix3D v)
574  static void saveData(std::ostream &os, UT_Matrix4D v)
576  static void saveData(std::ostream &os, UT_StringHolder s)
577  { UT_StringWrap(s).saveBinary(os); }
578  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
580  UT_OStringStream ostr;
581  if (s) s->save(ostr);
582  result = ostr.str();
583  saveData(os, result);
584  }
585  static void saveData(std::ostream &os, PRM_DataItemHandle s)
587  UT_OStringStream ostr;
588  if (s)
589  {
590  ostr << s->getDataTypeToken();
591  ostr << ":";
592  s->saveBinary(ostr);
593  }
594  result = ostr.str();
595  saveData(os, result);
596  }
597 
598 
599  void save(std::ostream &os) const
600  {
601  int32 v = version();
602  UTwrite(os, &v);
603  saveData(os, myUVAttrib);
604  saveData(os, myGroup);
605  saveData(os, myGroupType);
606  saveData(os, myProjType);
607  saveData(os, myTorRad);
608  saveData(os, myXord);
609  saveData(os, myRord);
610  saveData(os, myT);
611  saveData(os, myR);
612  saveData(os, myS);
613  saveData(os, myP);
614  saveData(os, myInittype);
615  saveData(os, myURange);
616  saveData(os, myVRange);
617  saveData(os, myAngle);
618  saveData(os, myFixSeams);
619  saveData(os, myFixPolar);
620  saveData(os, myPoleRad);
621 
622  }
623 
624  bool load(UT_IStream &is)
625  {
626  int32 v;
627  is.bread(&v, 1);
628  if (version() != v)
629  {
630  // Fail incompatible versions
631  return false;
632  }
633  loadData(is, myUVAttrib);
634  loadData(is, myGroup);
635  loadData(is, myGroupType);
636  loadData(is, myProjType);
637  loadData(is, myTorRad);
638  loadData(is, myXord);
639  loadData(is, myRord);
640  loadData(is, myT);
641  loadData(is, myR);
642  loadData(is, myS);
643  loadData(is, myP);
644  loadData(is, myInittype);
645  loadData(is, myURange);
646  loadData(is, myVRange);
647  loadData(is, myAngle);
648  loadData(is, myFixSeams);
649  loadData(is, myFixPolar);
650  loadData(is, myPoleRad);
651 
652  return true;
653  }
654 
655  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
656  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
658  {
659  SOP_Node *thissop = cookparms.getNode();
660  if (!thissop) return getUVAttrib();
662  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
663  return result;
664  }
665  const UT_StringHolder & getGroup() const { return myGroup; }
666  void setGroup(const UT_StringHolder & val) { myGroup = val; }
668  {
669  SOP_Node *thissop = cookparms.getNode();
670  if (!thissop) return getGroup();
672  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
673  return result;
674  }
675  GroupType getGroupType() const { return GroupType(myGroupType); }
676  void setGroupType(GroupType val) { myGroupType = int64(val); }
678  {
679  SOP_Node *thissop = cookparms.getNode();
680  if (!thissop) return getGroupType();
681  int64 result;
682  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
683  return GroupType(result);
684  }
685  ProjType getProjType() const { return ProjType(myProjType); }
686  void setProjType(ProjType val) { myProjType = int64(val); }
688  {
689  SOP_Node *thissop = cookparms.getNode();
690  if (!thissop) return getProjType();
691  int64 result;
692  OP_Utils::evalOpParm(result, thissop, "projtype", cookparms.getCookTime(), 0);
693  return ProjType(result);
694  }
695  fpreal64 getTorRad() const { return myTorRad; }
696  void setTorRad(fpreal64 val) { myTorRad = val; }
697  fpreal64 opTorRad(const SOP_NodeVerb::CookParms &cookparms) const
698  {
699  SOP_Node *thissop = cookparms.getNode();
700  if (!thissop) return getTorRad();
702  OP_Utils::evalOpParm(result, thissop, "torrad", cookparms.getCookTime(), 0);
703  return result;
704  }
705  Xord getXord() const { return Xord(myXord); }
706  void setXord(Xord val) { myXord = int64(val); }
707  Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
708  {
709  SOP_Node *thissop = cookparms.getNode();
710  if (!thissop) return getXord();
711  int64 result;
712  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
713  return Xord(result);
714  }
715  Rord getRord() const { return Rord(myRord); }
716  void setRord(Rord val) { myRord = int64(val); }
717  Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
718  {
719  SOP_Node *thissop = cookparms.getNode();
720  if (!thissop) return getRord();
721  int64 result;
722  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
723  return Rord(result);
724  }
725  UT_Vector3D getT() const { return myT; }
726  void setT(UT_Vector3D val) { myT = val; }
727  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
728  {
729  SOP_Node *thissop = cookparms.getNode();
730  if (!thissop) return getT();
732  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
733  return result;
734  }
735  UT_Vector3D getR() const { return myR; }
736  void setR(UT_Vector3D val) { myR = val; }
737  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
738  {
739  SOP_Node *thissop = cookparms.getNode();
740  if (!thissop) return getR();
742  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
743  return result;
744  }
745  UT_Vector3D getS() const { return myS; }
746  void setS(UT_Vector3D val) { myS = val; }
747  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
748  {
749  SOP_Node *thissop = cookparms.getNode();
750  if (!thissop) return getS();
752  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
753  return result;
754  }
755  UT_Vector3D getP() const { return myP; }
756  void setP(UT_Vector3D val) { myP = val; }
757  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
758  {
759  SOP_Node *thissop = cookparms.getNode();
760  if (!thissop) return getP();
762  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
763  return result;
764  }
765  Inittype getInittype() const { return Inittype(myInittype); }
766  void setInittype(Inittype val) { myInittype = int64(val); }
768  {
769  SOP_Node *thissop = cookparms.getNode();
770  if (!thissop) return getInittype();
771  int64 result;
772  OP_Utils::evalOpParm(result, thissop, "inittype", cookparms.getCookTime(), 0);
773  return Inittype(result);
774  }
775  UT_Vector2D getURange() const { return myURange; }
776  void setURange(UT_Vector2D val) { myURange = val; }
778  {
779  SOP_Node *thissop = cookparms.getNode();
780  if (!thissop) return getURange();
782  OP_Utils::evalOpParm(result, thissop, "urange", cookparms.getCookTime(), 0);
783  return result;
784  }
785  UT_Vector2D getVRange() const { return myVRange; }
786  void setVRange(UT_Vector2D val) { myVRange = val; }
788  {
789  SOP_Node *thissop = cookparms.getNode();
790  if (!thissop) return getVRange();
792  OP_Utils::evalOpParm(result, thissop, "vrange", cookparms.getCookTime(), 0);
793  return result;
794  }
795  fpreal64 getAngle() const { return myAngle; }
796  void setAngle(fpreal64 val) { myAngle = val; }
797  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
798  {
799  SOP_Node *thissop = cookparms.getNode();
800  if (!thissop) return getAngle();
802  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
803  return result;
804  }
805  bool getFixSeams() const { return myFixSeams; }
806  void setFixSeams(bool val) { myFixSeams = val; }
807  bool opFixSeams(const SOP_NodeVerb::CookParms &cookparms) const
808  {
809  SOP_Node *thissop = cookparms.getNode();
810  if (!thissop) return getFixSeams();
811  bool result;
812  OP_Utils::evalOpParm(result, thissop, "fixseams", cookparms.getCookTime(), 0);
813  return result;
814  }
815  bool getFixPolar() const { return myFixPolar; }
816  void setFixPolar(bool val) { myFixPolar = val; }
817  bool opFixPolar(const SOP_NodeVerb::CookParms &cookparms) const
818  {
819  SOP_Node *thissop = cookparms.getNode();
820  if (!thissop) return getFixPolar();
821  bool result;
822  OP_Utils::evalOpParm(result, thissop, "fixpolar", cookparms.getCookTime(), 0);
823  return result;
824  }
825  fpreal64 getPoleRad() const { return myPoleRad; }
826  void setPoleRad(fpreal64 val) { myPoleRad = val; }
828  {
829  SOP_Node *thissop = cookparms.getNode();
830  if (!thissop) return getPoleRad();
832  OP_Utils::evalOpParm(result, thissop, "polerad", cookparms.getCookTime(), 0);
833  return result;
834  }
835 
836 private:
837  UT_StringHolder myUVAttrib;
838  UT_StringHolder myGroup;
839  int64 myGroupType;
840  int64 myProjType;
841  fpreal64 myTorRad;
842  int64 myXord;
843  int64 myRord;
844  UT_Vector3D myT;
845  UT_Vector3D myR;
846  UT_Vector3D myS;
847  UT_Vector3D myP;
848  int64 myInittype;
849  UT_Vector2D myURange;
850  UT_Vector2D myVRange;
851  fpreal64 myAngle;
852  bool myFixSeams;
853  bool myFixPolar;
854  fpreal64 myPoleRad;
855 
856 };
GLdouble s
Definition: glew.h:1390
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setProjType(ProjType val)
fpreal64 getTorRad() const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
static void loadData(UT_IStream &is, UT_Vector4D &v)
fpreal64 getAngle() const
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void setUVAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector3D v)
void setGroupType(GroupType val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
~SOP_UVProjectParms() override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector2D opVRange(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_Vector2T< fpreal64 > UT_Vector2D
fpreal64 opPoleRad(const SOP_NodeVerb::CookParms &cookparms) const
GLuint const GLfloat * val
Definition: glew.h:2794
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_Vector3D getP() const
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
void setP(UT_Vector3D val)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setGroup(const UT_StringHolder &val)
An output stream object that owns its own string buffer storage.
UT_Vector2D getURange() const
UT_Vector3D getS() const
const GLdouble * v
Definition: glew.h:1391
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool load(UT_IStream &is)
const UT_StringHolder & getUVAttrib() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setFixSeams(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setT(UT_Vector3D val)
double fpreal64
Definition: SYS_Types.h:201
bool opFixSeams(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getT() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 getPoleRad() const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
Inittype opInittype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
GroupType getGroupType() const
exint length() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setURange(UT_Vector2D val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void saveData(std::ostream &os, fpreal64 v)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void copyFrom(const SOP_NodeParms *src) override
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
const GLfloat * c
Definition: glew.h:16296
Inittype getInittype() const
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
bool operator==(const SOP_UVProjectParms &src) const
void save(std::ostream &os) const
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Vector2D opURange(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
fpreal64 opTorRad(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector4I &v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool opFixPolar(const SOP_NodeVerb::CookParms &cookparms) const
void setS(UT_Vector3D val)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator!=(const SOP_UVProjectParms &src) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal64 fpreal
Definition: SYS_Types.h:277
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const char * getNestParmName(TempIndex fieldnum) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
UT_Vector3D getR() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
UT_Vector2D getVRange() const
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Vector2D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
exint getNestNumParms(TempIndex idx) const override
void setPoleRad(fpreal64 val)
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
void setFixPolar(bool val)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
ProjType getProjType() const
void setAngle(fpreal64 val)
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setTorRad(fpreal64 val)
void setInittype(Inittype val)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setR(UT_Vector3D val)
ProjType opProjType(const SOP_NodeVerb::CookParms &cookparms) const
void setVRange(UT_Vector2D val)
GLsizei const GLfloat * value
Definition: glew.h:1849
static void saveData(std::ostream &os, UT_StringHolder s)
Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const