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_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_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"_UTsh;
74  myGroup = ""_UTsh;
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;
96  SOP_UVProjectParms(SOP_UVProjectParms &&) noexcept = default;
97  SOP_UVProjectParms &operator=(SOP_UVProjectParms &&) noexcept = default;
98 
99  ~SOP_UVProjectParms() override {}
100 
101  bool operator==(const SOP_UVProjectParms &src) const
102  {
103  if (myUVAttrib != src.myUVAttrib) return false;
104  if (myGroup != src.myGroup) return false;
105  if (myGroupType != src.myGroupType) return false;
106  if (myProjType != src.myProjType) return false;
107  if (myTorRad != src.myTorRad) return false;
108  if (myXord != src.myXord) return false;
109  if (myRord != src.myRord) return false;
110  if (myT != src.myT) return false;
111  if (myR != src.myR) return false;
112  if (myS != src.myS) return false;
113  if (myP != src.myP) return false;
114  if (myInittype != src.myInittype) return false;
115  if (myURange != src.myURange) return false;
116  if (myVRange != src.myVRange) return false;
117  if (myAngle != src.myAngle) return false;
118  if (myFixSeams != src.myFixSeams) return false;
119  if (myFixPolar != src.myFixPolar) return false;
120  if (myPoleRad != src.myPoleRad) return false;
121 
122  return true;
123  }
124  bool operator!=(const SOP_UVProjectParms &src) const
125  {
126  return !operator==(src);
127  }
133 
134 
135 
136  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
137  {
138  myUVAttrib = "uv"_UTsh;
139  if (true)
140  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, 0);
141  myGroup = ""_UTsh;
142  if (true)
143  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
144  myGroupType = 0;
145  if (true)
146  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, 0);
147  myProjType = 0;
148  if (true)
149  graph->evalOpParm(myProjType, nodeidx, "projtype", time, 0);
150  myTorRad = 0.2;
151  if (true && ( (true&&!(((int64(getProjType())!=3)))) ) )
152  graph->evalOpParm(myTorRad, nodeidx, "torrad", time, 0);
153  myXord = 0;
154  if (true)
155  graph->evalOpParm(myXord, nodeidx, "xOrd", time, 0);
156  myRord = 0;
157  if (true)
158  graph->evalOpParm(myRord, nodeidx, "rOrd", time, 0);
159  myT = UT_Vector3D(0,0,0);
160  if (true)
161  graph->evalOpParm(myT, nodeidx, "t", time, 0);
162  myR = UT_Vector3D(0,0,0);
163  if (true)
164  graph->evalOpParm(myR, nodeidx, "r", time, 0);
165  myS = UT_Vector3D(1,1,1);
166  if (true)
167  graph->evalOpParm(myS, nodeidx, "s", time, 0);
168  myP = UT_Vector3D(0,0,0);
169  if (true)
170  graph->evalOpParm(myP, nodeidx, "p", time, 0);
171  myInittype = 3;
172  if (true)
173  graph->evalOpParm(myInittype, nodeidx, "inittype", time, 0);
174  myURange = UT_Vector2D(0,1);
175  if (true)
176  graph->evalOpParm(myURange, nodeidx, "urange", time, 0);
177  myVRange = UT_Vector2D(0,1);
178  if (true)
179  graph->evalOpParm(myVRange, nodeidx, "vrange", time, 0);
180  myAngle = 0;
181  if (true)
182  graph->evalOpParm(myAngle, nodeidx, "angle", time, 0);
183  myFixSeams = true;
184  if (true && ( (true&&!(((int64(getProjType())==0))||((int64(getProjType())==4)))) ) )
185  graph->evalOpParm(myFixSeams, nodeidx, "fixseams", time, 0);
186  myFixPolar = true;
187  if (true && ( (true&&!(((int64(getProjType())==0))||((int64(getProjType())==3)))) ) )
188  graph->evalOpParm(myFixPolar, nodeidx, "fixpolar", time, 0);
189  myPoleRad = 0.01;
190  if (true && ( (true&&!(((int64(getProjType())==0))||((int64(getProjType())==3))||((getFixPolar()==0)))) ) )
191  graph->evalOpParm(myPoleRad, nodeidx, "polerad", time, 0);
192 
193  }
194 
195 
196  void loadFromOpSubclass(const LoadParms &loadparms) override
197  {
198  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
199  }
200 
201 
202  void copyFrom(const OP_NodeParms *src) override
203  {
204  *this = *((const SOP_UVProjectParms *)src);
205  }
206 
207  template <typename T>
208  void
209  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
210  {
211  if (idx.size() < 1)
212  return;
213  UT_ASSERT(idx.size() == instance.size()+1);
214  if (idx.size() != instance.size()+1)
215  return;
216  switch (idx[0])
217  {
218  case 0:
219  coerceValue(value, myUVAttrib);
220  break;
221  case 1:
222  coerceValue(value, myGroup);
223  break;
224  case 2:
225  coerceValue(value, myGroupType);
226  break;
227  case 3:
228  coerceValue(value, myProjType);
229  break;
230  case 4:
231  coerceValue(value, myTorRad);
232  break;
233  case 5:
234  coerceValue(value, myXord);
235  break;
236  case 6:
237  coerceValue(value, myRord);
238  break;
239  case 7:
240  coerceValue(value, myT);
241  break;
242  case 8:
243  coerceValue(value, myR);
244  break;
245  case 9:
246  coerceValue(value, myS);
247  break;
248  case 10:
249  coerceValue(value, myP);
250  break;
251  case 11:
252  coerceValue(value, myInittype);
253  break;
254  case 12:
255  coerceValue(value, myURange);
256  break;
257  case 13:
258  coerceValue(value, myVRange);
259  break;
260  case 14:
261  coerceValue(value, myAngle);
262  break;
263  case 15:
264  coerceValue(value, myFixSeams);
265  break;
266  case 16:
267  coerceValue(value, myFixPolar);
268  break;
269  case 17:
270  coerceValue(value, myPoleRad);
271  break;
272 
273  }
274  }
275 
276  bool isParmColorRamp(exint idx) const override
277  {
278  switch (idx)
279  {
280 
281  }
282  return false;
283  }
284 
285  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
300  { doGetParmValue(idx, instance, value); }
301  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
302  { doGetParmValue(idx, instance, value); }
303  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
304  { doGetParmValue(idx, instance, value); }
305  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
306  { doGetParmValue(idx, instance, value); }
307 
308  template <typename T>
309  void
310  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
311  {
312  if (idx.size() < 1)
313  return;
314  UT_ASSERT(idx.size() == instance.size()+1);
315  if (idx.size() != instance.size()+1)
316  return;
317  switch (idx[0])
318  {
319  case 0:
320  coerceValue(myUVAttrib, ( ( value ) ));
321  break;
322  case 1:
323  coerceValue(myGroup, ( ( value ) ));
324  break;
325  case 2:
326  coerceValue(myGroupType, clampMinValue(0, clampMaxValue(1, value ) ));
327  break;
328  case 3:
329  coerceValue(myProjType, clampMinValue(0, clampMaxValue(4, value ) ));
330  break;
331  case 4:
332  coerceValue(myTorRad, ( ( value ) ));
333  break;
334  case 5:
335  coerceValue(myXord, clampMinValue(0, clampMaxValue(5, value ) ));
336  break;
337  case 6:
338  coerceValue(myRord, clampMinValue(0, clampMaxValue(5, value ) ));
339  break;
340  case 7:
341  coerceValue(myT, ( ( value ) ));
342  break;
343  case 8:
344  coerceValue(myR, ( ( value ) ));
345  break;
346  case 9:
347  coerceValue(myS, ( ( value ) ));
348  break;
349  case 10:
350  coerceValue(myP, ( ( value ) ));
351  break;
352  case 11:
353  coerceValue(myInittype, clampMinValue(0, clampMaxValue(3, value ) ));
354  break;
355  case 12:
356  coerceValue(myURange, ( ( value ) ));
357  break;
358  case 13:
359  coerceValue(myVRange, ( ( value ) ));
360  break;
361  case 14:
362  coerceValue(myAngle, ( ( value ) ));
363  break;
364  case 15:
365  coerceValue(myFixSeams, ( ( value ) ));
366  break;
367  case 16:
368  coerceValue(myFixPolar, ( ( value ) ));
369  break;
370  case 17:
371  coerceValue(myPoleRad, ( ( value ) ));
372  break;
373 
374  }
375  }
376 
377  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
388  { doSetParmValue(idx, instance, value); }
389  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
390  { doSetParmValue(idx, instance, value); }
391  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
392  { doSetParmValue(idx, instance, value); }
393  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
394  { doSetParmValue(idx, instance, value); }
395  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
396  { doSetParmValue(idx, instance, value); }
397  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
398  { doSetParmValue(idx, instance, value); }
399 
400  exint getNestNumParms(TempIndex idx) const override
401  {
402  if (idx.size() == 0)
403  return 18;
404  switch (idx[0])
405  {
406 
407  }
408  // Invalid
409  return 0;
410  }
411 
412  const char *getNestParmName(TempIndex fieldnum) const override
413  {
414  if (fieldnum.size() < 1)
415  return 0;
416  switch (fieldnum[0])
417  {
418  case 0:
419  return "uvattrib";
420  case 1:
421  return "group";
422  case 2:
423  return "grouptype";
424  case 3:
425  return "projtype";
426  case 4:
427  return "torrad";
428  case 5:
429  return "xOrd";
430  case 6:
431  return "rOrd";
432  case 7:
433  return "t";
434  case 8:
435  return "r";
436  case 9:
437  return "s";
438  case 10:
439  return "p";
440  case 11:
441  return "inittype";
442  case 12:
443  return "urange";
444  case 13:
445  return "vrange";
446  case 14:
447  return "angle";
448  case 15:
449  return "fixseams";
450  case 16:
451  return "fixpolar";
452  case 17:
453  return "polerad";
454 
455  }
456  return 0;
457  }
458 
459  ParmType getNestParmType(TempIndex fieldnum) const override
460  {
461  if (fieldnum.size() < 1)
462  return PARM_UNSUPPORTED;
463  switch (fieldnum[0])
464  {
465  case 0:
466  return PARM_STRING;
467  case 1:
468  return PARM_STRING;
469  case 2:
470  return PARM_INTEGER;
471  case 3:
472  return PARM_INTEGER;
473  case 4:
474  return PARM_FLOAT;
475  case 5:
476  return PARM_INTEGER;
477  case 6:
478  return PARM_INTEGER;
479  case 7:
480  return PARM_VECTOR3;
481  case 8:
482  return PARM_VECTOR3;
483  case 9:
484  return PARM_VECTOR3;
485  case 10:
486  return PARM_VECTOR3;
487  case 11:
488  return PARM_INTEGER;
489  case 12:
490  return PARM_VECTOR2;
491  case 13:
492  return PARM_VECTOR2;
493  case 14:
494  return PARM_FLOAT;
495  case 15:
496  return PARM_INTEGER;
497  case 16:
498  return PARM_INTEGER;
499  case 17:
500  return PARM_FLOAT;
501 
502  }
503  return PARM_UNSUPPORTED;
504  }
505 
506  // Boiler plate to load individual types.
507  static void loadData(UT_IStream &is, int64 &v)
508  { is.bread(&v, 1); }
509  static void loadData(UT_IStream &is, bool &v)
510  { int64 iv; is.bread(&iv, 1); v = iv; }
511  static void loadData(UT_IStream &is, fpreal64 &v)
512  { is.bread<fpreal64>(&v, 1); }
513  static void loadData(UT_IStream &is, UT_Vector2D &v)
514  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
515  static void loadData(UT_IStream &is, UT_Vector3D &v)
516  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
517  is.bread<fpreal64>(&v.z(), 1); }
518  static void loadData(UT_IStream &is, UT_Vector4D &v)
519  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
520  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
521  static void loadData(UT_IStream &is, UT_Matrix2D &v)
522  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
523  static void loadData(UT_IStream &is, UT_Matrix3D &v)
524  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
525  static void loadData(UT_IStream &is, UT_Matrix4D &v)
526  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
527  static void loadData(UT_IStream &is, UT_Vector2I &v)
528  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
529  static void loadData(UT_IStream &is, UT_Vector3I &v)
530  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
531  is.bread<int64>(&v.z(), 1); }
532  static void loadData(UT_IStream &is, UT_Vector4I &v)
533  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
534  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
536  { is.bread(v); }
538  { UT_StringHolder rampdata;
539  loadData(is, rampdata);
540  if (rampdata.isstring())
541  {
542  v.reset(new UT_Ramp());
543  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
544  v->load(istr);
545  }
546  else v.reset();
547  }
550  loadData(is, data);
551  if (data.isstring())
552  {
553  // Find the data type.
554  const char *colon = UT_StringWrap(data).findChar(':');
555  if (colon)
556  {
557  int typelen = colon - data.buffer();
559  type.strncpy(data.buffer(), typelen);
560  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
561 
562  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
563  }
564  }
565  else v.reset();
566  }
567 
568  static void saveData(std::ostream &os, int64 v)
569  { UTwrite(os, &v); }
570  static void saveData(std::ostream &os, bool v)
571  { int64 iv = v; UTwrite(os, &iv); }
572  static void saveData(std::ostream &os, fpreal64 v)
573  { UTwrite<fpreal64>(os, &v); }
574  static void saveData(std::ostream &os, UT_Vector2D v)
575  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
576  static void saveData(std::ostream &os, UT_Vector3D v)
577  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
578  UTwrite<fpreal64>(os, &v.z()); }
579  static void saveData(std::ostream &os, UT_Vector4D v)
580  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
581  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
582  static void saveData(std::ostream &os, UT_Matrix2D v)
584  static void saveData(std::ostream &os, UT_Matrix3D v)
586  static void saveData(std::ostream &os, UT_Matrix4D v)
588  static void saveData(std::ostream &os, UT_StringHolder s)
589  { UT_StringWrap(s).saveBinary(os); }
590  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
592  UT_OStringStream ostr;
593  if (s) s->save(ostr);
594  result = ostr.str();
595  saveData(os, result);
596  }
597  static void saveData(std::ostream &os, PRM_DataItemHandle s)
599  UT_OStringStream ostr;
600  if (s)
601  {
602  ostr << s->getDataTypeToken();
603  ostr << ":";
604  s->saveBinary(ostr);
605  }
606  result = ostr.str();
607  saveData(os, result);
608  }
609 
610 
611  void save(std::ostream &os) const
612  {
613  int32 v = version();
614  UTwrite(os, &v);
615  saveData(os, myUVAttrib);
616  saveData(os, myGroup);
617  saveData(os, myGroupType);
618  saveData(os, myProjType);
619  saveData(os, myTorRad);
620  saveData(os, myXord);
621  saveData(os, myRord);
622  saveData(os, myT);
623  saveData(os, myR);
624  saveData(os, myS);
625  saveData(os, myP);
626  saveData(os, myInittype);
627  saveData(os, myURange);
628  saveData(os, myVRange);
629  saveData(os, myAngle);
630  saveData(os, myFixSeams);
631  saveData(os, myFixPolar);
632  saveData(os, myPoleRad);
633 
634  }
635 
636  bool load(UT_IStream &is)
637  {
638  int32 v;
639  is.bread(&v, 1);
640  if (version() != v)
641  {
642  // Fail incompatible versions
643  return false;
644  }
645  loadData(is, myUVAttrib);
646  loadData(is, myGroup);
647  loadData(is, myGroupType);
648  loadData(is, myProjType);
649  loadData(is, myTorRad);
650  loadData(is, myXord);
651  loadData(is, myRord);
652  loadData(is, myT);
653  loadData(is, myR);
654  loadData(is, myS);
655  loadData(is, myP);
656  loadData(is, myInittype);
657  loadData(is, myURange);
658  loadData(is, myVRange);
659  loadData(is, myAngle);
660  loadData(is, myFixSeams);
661  loadData(is, myFixPolar);
662  loadData(is, myPoleRad);
663 
664  return true;
665  }
666 
667  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
668  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
670  {
671  SOP_Node *thissop = cookparms.getNode();
672  if (!thissop) return getUVAttrib();
674  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
675  return result;
676  }
677  const UT_StringHolder & getGroup() const { return myGroup; }
678  void setGroup(const UT_StringHolder & val) { myGroup = val; }
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getGroup();
684  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
685  return result;
686  }
687  GroupType getGroupType() const { return GroupType(myGroupType); }
688  void setGroupType(GroupType val) { myGroupType = int64(val); }
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getGroupType();
693  int64 result;
694  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
695  return GroupType(result);
696  }
697  ProjType getProjType() const { return ProjType(myProjType); }
698  void setProjType(ProjType val) { myProjType = int64(val); }
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getProjType();
703  int64 result;
704  OP_Utils::evalOpParm(result, thissop, "projtype", cookparms.getCookTime(), 0);
705  return ProjType(result);
706  }
707  fpreal64 getTorRad() const { return myTorRad; }
708  void setTorRad(fpreal64 val) { myTorRad = val; }
709  fpreal64 opTorRad(const SOP_NodeVerb::CookParms &cookparms) const
710  {
711  SOP_Node *thissop = cookparms.getNode();
712  if (!thissop) return getTorRad();
714  OP_Utils::evalOpParm(result, thissop, "torrad", cookparms.getCookTime(), 0);
715  return result;
716  }
717  Xord getXord() const { return Xord(myXord); }
718  void setXord(Xord val) { myXord = int64(val); }
719  Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
720  {
721  SOP_Node *thissop = cookparms.getNode();
722  if (!thissop) return getXord();
723  int64 result;
724  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
725  return Xord(result);
726  }
727  Rord getRord() const { return Rord(myRord); }
728  void setRord(Rord val) { myRord = int64(val); }
729  Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
730  {
731  SOP_Node *thissop = cookparms.getNode();
732  if (!thissop) return getRord();
733  int64 result;
734  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
735  return Rord(result);
736  }
737  UT_Vector3D getT() const { return myT; }
738  void setT(UT_Vector3D val) { myT = val; }
739  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
740  {
741  SOP_Node *thissop = cookparms.getNode();
742  if (!thissop) return getT();
744  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
745  return result;
746  }
747  UT_Vector3D getR() const { return myR; }
748  void setR(UT_Vector3D val) { myR = val; }
749  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
750  {
751  SOP_Node *thissop = cookparms.getNode();
752  if (!thissop) return getR();
754  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
755  return result;
756  }
757  UT_Vector3D getS() const { return myS; }
758  void setS(UT_Vector3D val) { myS = val; }
759  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
760  {
761  SOP_Node *thissop = cookparms.getNode();
762  if (!thissop) return getS();
764  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
765  return result;
766  }
767  UT_Vector3D getP() const { return myP; }
768  void setP(UT_Vector3D val) { myP = val; }
769  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
770  {
771  SOP_Node *thissop = cookparms.getNode();
772  if (!thissop) return getP();
774  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
775  return result;
776  }
777  Inittype getInittype() const { return Inittype(myInittype); }
778  void setInittype(Inittype val) { myInittype = int64(val); }
780  {
781  SOP_Node *thissop = cookparms.getNode();
782  if (!thissop) return getInittype();
783  int64 result;
784  OP_Utils::evalOpParm(result, thissop, "inittype", cookparms.getCookTime(), 0);
785  return Inittype(result);
786  }
787  UT_Vector2D getURange() const { return myURange; }
788  void setURange(UT_Vector2D val) { myURange = val; }
790  {
791  SOP_Node *thissop = cookparms.getNode();
792  if (!thissop) return getURange();
794  OP_Utils::evalOpParm(result, thissop, "urange", cookparms.getCookTime(), 0);
795  return result;
796  }
797  UT_Vector2D getVRange() const { return myVRange; }
798  void setVRange(UT_Vector2D val) { myVRange = val; }
800  {
801  SOP_Node *thissop = cookparms.getNode();
802  if (!thissop) return getVRange();
804  OP_Utils::evalOpParm(result, thissop, "vrange", cookparms.getCookTime(), 0);
805  return result;
806  }
807  fpreal64 getAngle() const { return myAngle; }
808  void setAngle(fpreal64 val) { myAngle = val; }
809  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
810  {
811  SOP_Node *thissop = cookparms.getNode();
812  if (!thissop) return getAngle();
814  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
815  return result;
816  }
817  bool getFixSeams() const { return myFixSeams; }
818  void setFixSeams(bool val) { myFixSeams = val; }
819  bool opFixSeams(const SOP_NodeVerb::CookParms &cookparms) const
820  {
821  SOP_Node *thissop = cookparms.getNode();
822  if (!thissop) return getFixSeams();
823  bool result;
824  OP_Utils::evalOpParm(result, thissop, "fixseams", cookparms.getCookTime(), 0);
825  return result;
826  }
827  bool getFixPolar() const { return myFixPolar; }
828  void setFixPolar(bool val) { myFixPolar = val; }
829  bool opFixPolar(const SOP_NodeVerb::CookParms &cookparms) const
830  {
831  SOP_Node *thissop = cookparms.getNode();
832  if (!thissop) return getFixPolar();
833  bool result;
834  OP_Utils::evalOpParm(result, thissop, "fixpolar", cookparms.getCookTime(), 0);
835  return result;
836  }
837  fpreal64 getPoleRad() const { return myPoleRad; }
838  void setPoleRad(fpreal64 val) { myPoleRad = val; }
840  {
841  SOP_Node *thissop = cookparms.getNode();
842  if (!thissop) return getPoleRad();
844  OP_Utils::evalOpParm(result, thissop, "polerad", cookparms.getCookTime(), 0);
845  return result;
846  }
847 
848 private:
849  UT_StringHolder myUVAttrib;
850  UT_StringHolder myGroup;
851  int64 myGroupType;
852  int64 myProjType;
853  fpreal64 myTorRad;
854  int64 myXord;
855  int64 myRord;
856  UT_Vector3D myT;
857  UT_Vector3D myR;
858  UT_Vector3D myS;
859  UT_Vector3D myP;
860  int64 myInittype;
861  UT_Vector2D myURange;
862  UT_Vector2D myVRange;
863  fpreal64 myAngle;
864  bool myFixSeams;
865  bool myFixPolar;
866  fpreal64 myPoleRad;
867 
868 };
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)
static void loadData(UT_IStream &is, UT_Vector4D &v)
fpreal64 getAngle() const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setUVAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector3D v)
void setGroupType(GroupType val)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
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
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
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setP(UT_Vector3D val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Matrix3D v)
GLdouble s
Definition: glad.h:3009
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
**But if you need a result
Definition: thread.h:613
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_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)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
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
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
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
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:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, fpreal64 v)
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
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
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector2D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
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)
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
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 coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
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
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
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:88
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)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
UT_Vector2D getVRange() const
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Vector2D v)
exint getNestNumParms(TempIndex idx) const override
void setPoleRad(fpreal64 val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setFixPolar(bool val)
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
Definition: core.h:1131
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)
GLboolean r
Definition: glcorearb.h:1222
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)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void loadData(UT_IStream &is, fpreal64 &v)
type
Definition: core.h:1059
void setR(UT_Vector3D val)
ProjType opProjType(const SOP_NodeVerb::CookParms &cookparms) const
void setVRange(UT_Vector2D val)
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
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
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void copyFrom(const OP_NodeParms *src) override
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663