HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolyFrame.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 <OP/OP_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_PolyFrameEnums
24 {
25  enum class Entity
26  {
27  PRIMITIVE = 0,
28  POINT
29  };
30 
32  getToken(Entity enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Entity::PRIMITIVE: return "primitive"_sh;
37  case Entity::POINT: return "point"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49 
51  {
52  myGroup = ""_UTsh;
53  myEntity = 0;
54  myStyle = "edge2"_UTsh;
55  myAttribname = ""_UTsh;
56  myNon = true;
57  myN = "N"_UTsh;
58  myTangentuon = true;
59  myTangentu = "tangentu"_UTsh;
60  myTangentvon = false;
61  myTangentv = "tangentv"_UTsh;
62  mySignson = false;
63  mySigns = "signs"_UTsh;
64  myOrtho = false;
65  myLeftHanded = false;
66 
67  }
68 
69  explicit SOP_PolyFrameParms(const SOP_PolyFrameParms &) = default;
71  SOP_PolyFrameParms(SOP_PolyFrameParms &&) noexcept = default;
72  SOP_PolyFrameParms &operator=(SOP_PolyFrameParms &&) noexcept = default;
73 
74  ~SOP_PolyFrameParms() override {}
75 
76  bool operator==(const SOP_PolyFrameParms &src) const
77  {
78  if (myGroup != src.myGroup) return false;
79  if (myEntity != src.myEntity) return false;
80  if (myStyle != src.myStyle) return false;
81  if (myAttribname != src.myAttribname) return false;
82  if (myNon != src.myNon) return false;
83  if (myN != src.myN) return false;
84  if (myTangentuon != src.myTangentuon) return false;
85  if (myTangentu != src.myTangentu) return false;
86  if (myTangentvon != src.myTangentvon) return false;
87  if (myTangentv != src.myTangentv) return false;
88  if (mySignson != src.mySignson) return false;
89  if (mySigns != src.mySigns) return false;
90  if (myOrtho != src.myOrtho) return false;
91  if (myLeftHanded != src.myLeftHanded) return false;
92 
93 
94  if (baseGetSignature() != src.baseGetSignature()) return false;
95 
96  return true;
97  }
98  bool operator!=(const SOP_PolyFrameParms &src) const
99  {
100  return !operator==(src);
101  }
103 
104 
105 
106  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
107  {
108  myGroup = ""_UTsh;
109  if (true)
110  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
111  myEntity = 0;
112  if (true)
113  graph->evalOpParm(myEntity, nodeidx, "entity", time, graph->isDirect()?nullptr:depnode);
114  myStyle = "edge2"_UTsh;
115  if (true)
116  graph->evalOpParm(myStyle, nodeidx, "style", time, graph->isDirect()?nullptr:depnode);
117  myAttribname = ""_UTsh;
118  if (true && ( (true&&!(((getStyle()!="attrib")&&(getStyle()!="texuv")&&(getStyle()!="mikkt")))) ) )
119  graph->evalOpParm(myAttribname, nodeidx, "attribname", time, graph->isDirect()?nullptr:depnode);
120  myNon = true;
121  if (true && ( (true&&!(((getStyle()=="mikkt")))) ) )
122  graph->evalOpParm(myNon, nodeidx, "Non", time, graph->isDirect()?nullptr:depnode);
123  myN = "N"_UTsh;
124  if (true && ( (true&&!(((getNon()==0))||((getStyle()=="mikkt")))) ) )
125  graph->evalOpParm(myN, nodeidx, "N", time, graph->isDirect()?nullptr:depnode);
126  myTangentuon = true;
127  if (true)
128  graph->evalOpParm(myTangentuon, nodeidx, "tangentuon", time, graph->isDirect()?nullptr:depnode);
129  myTangentu = "tangentu"_UTsh;
130  if (true && ( (true&&!(((getTangentuon()==0)))) ) )
131  graph->evalOpParm(myTangentu, nodeidx, "tangentu", time, graph->isDirect()?nullptr:depnode);
132  myTangentvon = false;
133  if (true)
134  graph->evalOpParm(myTangentvon, nodeidx, "tangentvon", time, graph->isDirect()?nullptr:depnode);
135  myTangentv = "tangentv"_UTsh;
136  if (true && ( (true&&!(((getTangentvon()==0)))) ) )
137  graph->evalOpParm(myTangentv, nodeidx, "tangentv", time, graph->isDirect()?nullptr:depnode);
138  mySignson = false;
139  if (true && ( (true&&!(((getStyle()!="mikkt")))) ) )
140  graph->evalOpParm(mySignson, nodeidx, "signson", time, graph->isDirect()?nullptr:depnode);
141  mySigns = "signs"_UTsh;
142  if (true && ( (true&&!(((getSignson()==0))||((getStyle()!="mikkt")))) ) )
143  graph->evalOpParm(mySigns, nodeidx, "signs", time, graph->isDirect()?nullptr:depnode);
144  myOrtho = false;
145  if (true && ( (true&&!(((getStyle()=="mikkt")))) ) )
146  graph->evalOpParm(myOrtho, nodeidx, "ortho", time, graph->isDirect()?nullptr:depnode);
147  myLeftHanded = false;
148  if (true && ( (true&&!(((getOrtho()==0))||((getStyle()=="mikkt")))) ) )
149  graph->evalOpParm(myLeftHanded, nodeidx, "lefthanded", time, graph->isDirect()?nullptr:depnode);
150 
151  }
152 
153 
154  void loadFromOpSubclass(const LoadParms &loadparms) override
155  {
156  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
157  }
158 
159 
160  void copyFrom(const OP_NodeParms *src) override
161  {
162  *this = *((const SOP_PolyFrameParms *)src);
163  }
164 
165  template <typename T>
166  void
167  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
168  {
169  if (idx.size() < 1)
170  return;
171  UT_ASSERT(idx.size() == instance.size()+1);
172  if (idx.size() != instance.size()+1)
173  return;
174  switch (idx[0])
175  {
176  case 0:
177  coerceValue(value, myGroup);
178  break;
179  case 1:
180  coerceValue(value, myEntity);
181  break;
182  case 2:
183  coerceValue(value, myStyle);
184  break;
185  case 3:
186  coerceValue(value, myAttribname);
187  break;
188  case 4:
189  coerceValue(value, myNon);
190  break;
191  case 5:
192  coerceValue(value, myN);
193  break;
194  case 6:
195  coerceValue(value, myTangentuon);
196  break;
197  case 7:
198  coerceValue(value, myTangentu);
199  break;
200  case 8:
201  coerceValue(value, myTangentvon);
202  break;
203  case 9:
204  coerceValue(value, myTangentv);
205  break;
206  case 10:
207  coerceValue(value, mySignson);
208  break;
209  case 11:
210  coerceValue(value, mySigns);
211  break;
212  case 12:
213  coerceValue(value, myOrtho);
214  break;
215  case 13:
216  coerceValue(value, myLeftHanded);
217  break;
218 
219  }
220  }
221 
222  bool isParmColorRamp(exint idx) const override
223  {
224  switch (idx)
225  {
226 
227  }
228  return false;
229  }
230 
231  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
252  { doGetParmValue(idx, instance, value); }
253 
254  template <typename T>
255  void
256  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
257  {
258  if (idx.size() < 1)
259  return;
260  UT_ASSERT(idx.size() == instance.size()+1);
261  if (idx.size() != instance.size()+1)
262  return;
263  switch (idx[0])
264  {
265  case 0:
266  coerceValue(myGroup, ( ( value ) ));
267  break;
268  case 1:
269  coerceValue(myEntity, clampMinValue(0, clampMaxValue(1, value ) ));
270  break;
271  case 2:
272  coerceValue(myStyle, ( ( value ) ));
273  break;
274  case 3:
275  coerceValue(myAttribname, ( ( value ) ));
276  break;
277  case 4:
278  coerceValue(myNon, ( ( value ) ));
279  break;
280  case 5:
281  coerceValue(myN, ( ( value ) ));
282  break;
283  case 6:
284  coerceValue(myTangentuon, ( ( value ) ));
285  break;
286  case 7:
287  coerceValue(myTangentu, ( ( value ) ));
288  break;
289  case 8:
290  coerceValue(myTangentvon, ( ( value ) ));
291  break;
292  case 9:
293  coerceValue(myTangentv, ( ( value ) ));
294  break;
295  case 10:
296  coerceValue(mySignson, ( ( value ) ));
297  break;
298  case 11:
299  coerceValue(mySigns, ( ( value ) ));
300  break;
301  case 12:
302  coerceValue(myOrtho, ( ( value ) ));
303  break;
304  case 13:
305  coerceValue(myLeftHanded, ( ( value ) ));
306  break;
307 
308  }
309  }
310 
311  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
332  { doSetParmValue(idx, instance, value); }
333 
334  exint getNestNumParms(TempIndex idx) const override
335  {
336  if (idx.size() == 0)
337  return 14;
338  switch (idx[0])
339  {
340 
341  }
342  // Invalid
343  return 0;
344  }
345 
346  const char *getNestParmName(TempIndex fieldnum) const override
347  {
348  if (fieldnum.size() < 1)
349  return 0;
350  switch (fieldnum[0])
351  {
352  case 0:
353  return "group";
354  case 1:
355  return "entity";
356  case 2:
357  return "style";
358  case 3:
359  return "attribname";
360  case 4:
361  return "Non";
362  case 5:
363  return "N";
364  case 6:
365  return "tangentuon";
366  case 7:
367  return "tangentu";
368  case 8:
369  return "tangentvon";
370  case 9:
371  return "tangentv";
372  case 10:
373  return "signson";
374  case 11:
375  return "signs";
376  case 12:
377  return "ortho";
378  case 13:
379  return "lefthanded";
380 
381  }
382  return 0;
383  }
384 
385  ParmType getNestParmType(TempIndex fieldnum) const override
386  {
387  if (fieldnum.size() < 1)
388  return PARM_UNSUPPORTED;
389  switch (fieldnum[0])
390  {
391  case 0:
392  return PARM_STRING;
393  case 1:
394  return PARM_INTEGER;
395  case 2:
396  return PARM_STRING;
397  case 3:
398  return PARM_STRING;
399  case 4:
400  return PARM_INTEGER;
401  case 5:
402  return PARM_STRING;
403  case 6:
404  return PARM_INTEGER;
405  case 7:
406  return PARM_STRING;
407  case 8:
408  return PARM_INTEGER;
409  case 9:
410  return PARM_STRING;
411  case 10:
412  return PARM_INTEGER;
413  case 11:
414  return PARM_STRING;
415  case 12:
416  return PARM_INTEGER;
417  case 13:
418  return PARM_INTEGER;
419 
420  }
421  return PARM_UNSUPPORTED;
422  }
423 
424  // Boiler plate to load individual types.
425  static void loadData(UT_IStream &is, int64 &v)
426  { is.bread(&v, 1); }
427  static void loadData(UT_IStream &is, bool &v)
428  { int64 iv; is.bread(&iv, 1); v = iv; }
429  static void loadData(UT_IStream &is, fpreal64 &v)
430  { is.bread<fpreal64>(&v, 1); }
431  static void loadData(UT_IStream &is, UT_Vector2D &v)
432  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector3D &v)
434  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
435  is.bread<fpreal64>(&v.z(), 1); }
436  static void loadData(UT_IStream &is, UT_Vector4D &v)
437  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
438  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
439  static void loadData(UT_IStream &is, UT_Matrix2D &v)
440  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
441  static void loadData(UT_IStream &is, UT_Matrix3D &v)
442  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
443  static void loadData(UT_IStream &is, UT_Matrix4D &v)
444  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
445  static void loadData(UT_IStream &is, UT_Vector2I &v)
446  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
447  static void loadData(UT_IStream &is, UT_Vector3I &v)
448  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
449  is.bread<int64>(&v.z(), 1); }
450  static void loadData(UT_IStream &is, UT_Vector4I &v)
451  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
452  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
454  { is.bread(v); }
456  { UT_StringHolder rampdata;
457  loadData(is, rampdata);
458  if (rampdata.isstring())
459  {
460  v.reset(new UT_Ramp());
461  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
462  v->load(istr);
463  }
464  else v.reset();
465  }
468  loadData(is, data);
469  if (data.isstring())
470  {
471  // Find the data type.
472  const char *colon = UT_StringWrap(data).findChar(':');
473  if (colon)
474  {
475  int typelen = colon - data.buffer();
477  type.strncpy(data.buffer(), typelen);
478  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
479 
480  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
481  }
482  }
483  else v.reset();
484  }
485 
486  static void saveData(std::ostream &os, int64 v)
487  { UTwrite(os, &v); }
488  static void saveData(std::ostream &os, bool v)
489  { int64 iv = v; UTwrite(os, &iv); }
490  static void saveData(std::ostream &os, fpreal64 v)
491  { UTwrite<fpreal64>(os, &v); }
492  static void saveData(std::ostream &os, UT_Vector2D v)
493  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
494  static void saveData(std::ostream &os, UT_Vector3D v)
495  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
496  UTwrite<fpreal64>(os, &v.z()); }
497  static void saveData(std::ostream &os, UT_Vector4D v)
498  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
499  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
500  static void saveData(std::ostream &os, UT_Matrix2D v)
502  static void saveData(std::ostream &os, UT_Matrix3D v)
504  static void saveData(std::ostream &os, UT_Matrix4D v)
506  static void saveData(std::ostream &os, UT_StringHolder s)
507  { UT_StringWrap(s).saveBinary(os); }
508  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
510  UT_OStringStream ostr;
511  if (s) s->save(ostr);
512  result = ostr.str();
513  saveData(os, result);
514  }
515  static void saveData(std::ostream &os, PRM_DataItemHandle s)
517  UT_OStringStream ostr;
518  if (s)
519  {
520  ostr << s->getDataTypeToken();
521  ostr << ":";
522  s->saveBinary(ostr);
523  }
524  result = ostr.str();
525  saveData(os, result);
526  }
527 
528 
529  void save(std::ostream &os) const
530  {
531  int32 v = version();
532  UTwrite(os, &v);
533  saveData(os, myGroup);
534  saveData(os, myEntity);
535  saveData(os, myStyle);
536  saveData(os, myAttribname);
537  saveData(os, myNon);
538  saveData(os, myN);
539  saveData(os, myTangentuon);
540  saveData(os, myTangentu);
541  saveData(os, myTangentvon);
542  saveData(os, myTangentv);
543  saveData(os, mySignson);
544  saveData(os, mySigns);
545  saveData(os, myOrtho);
546  saveData(os, myLeftHanded);
547 
548  }
549 
550  bool load(UT_IStream &is)
551  {
552  int32 v;
553  is.bread(&v, 1);
554  if (version() != v)
555  {
556  // Fail incompatible versions
557  return false;
558  }
559  loadData(is, myGroup);
560  loadData(is, myEntity);
561  loadData(is, myStyle);
562  loadData(is, myAttribname);
563  loadData(is, myNon);
564  loadData(is, myN);
565  loadData(is, myTangentuon);
566  loadData(is, myTangentu);
567  loadData(is, myTangentvon);
568  loadData(is, myTangentv);
569  loadData(is, mySignson);
570  loadData(is, mySigns);
571  loadData(is, myOrtho);
572  loadData(is, myLeftHanded);
573 
574  return true;
575  }
576 
577  const UT_StringHolder & getGroup() const { return myGroup; }
578  void setGroup(const UT_StringHolder & val) { myGroup = val; }
580  {
581  SOP_Node *thissop = cookparms.getNode();
582  if (!thissop) return getGroup();
584  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
585  return result;
586  }
587  Entity getEntity() const { return Entity(myEntity); }
588  void setEntity(Entity val) { myEntity = int64(val); }
589  Entity opEntity(const SOP_NodeVerb::CookParms &cookparms) const
590  {
591  SOP_Node *thissop = cookparms.getNode();
592  if (!thissop) return getEntity();
593  int64 result;
594  OP_Utils::evalOpParm(result, thissop, "entity", cookparms.getCookTime(), 0);
595  return Entity(result);
596  }
597  const UT_StringHolder & getStyle() const { return myStyle; }
598  void setStyle(const UT_StringHolder & val) { myStyle = val; }
600  {
601  SOP_Node *thissop = cookparms.getNode();
602  if (!thissop) return getStyle();
604  OP_Utils::evalOpParm(result, thissop, "style", cookparms.getCookTime(), 0);
605  return result;
606  }
607  const UT_StringHolder & getAttribname() const { return myAttribname; }
608  void setAttribname(const UT_StringHolder & val) { myAttribname = val; }
610  {
611  SOP_Node *thissop = cookparms.getNode();
612  if (!thissop) return getAttribname();
614  OP_Utils::evalOpParm(result, thissop, "attribname", cookparms.getCookTime(), 0);
615  return result;
616  }
617  bool getNon() const { return myNon; }
618  void setNon(bool val) { myNon = val; }
619  bool opNon(const SOP_NodeVerb::CookParms &cookparms) const
620  {
621  SOP_Node *thissop = cookparms.getNode();
622  if (!thissop) return getNon();
623  bool result;
624  OP_Utils::evalOpParm(result, thissop, "Non", cookparms.getCookTime(), 0);
625  return result;
626  }
627  const UT_StringHolder & getN() const { return myN; }
628  void setN(const UT_StringHolder & val) { myN = val; }
630  {
631  SOP_Node *thissop = cookparms.getNode();
632  if (!thissop) return getN();
634  OP_Utils::evalOpParm(result, thissop, "N", cookparms.getCookTime(), 0);
635  return result;
636  }
637  bool getTangentuon() const { return myTangentuon; }
638  void setTangentuon(bool val) { myTangentuon = val; }
639  bool opTangentuon(const SOP_NodeVerb::CookParms &cookparms) const
640  {
641  SOP_Node *thissop = cookparms.getNode();
642  if (!thissop) return getTangentuon();
643  bool result;
644  OP_Utils::evalOpParm(result, thissop, "tangentuon", cookparms.getCookTime(), 0);
645  return result;
646  }
647  const UT_StringHolder & getTangentu() const { return myTangentu; }
648  void setTangentu(const UT_StringHolder & val) { myTangentu = val; }
650  {
651  SOP_Node *thissop = cookparms.getNode();
652  if (!thissop) return getTangentu();
654  OP_Utils::evalOpParm(result, thissop, "tangentu", cookparms.getCookTime(), 0);
655  return result;
656  }
657  bool getTangentvon() const { return myTangentvon; }
658  void setTangentvon(bool val) { myTangentvon = val; }
659  bool opTangentvon(const SOP_NodeVerb::CookParms &cookparms) const
660  {
661  SOP_Node *thissop = cookparms.getNode();
662  if (!thissop) return getTangentvon();
663  bool result;
664  OP_Utils::evalOpParm(result, thissop, "tangentvon", cookparms.getCookTime(), 0);
665  return result;
666  }
667  const UT_StringHolder & getTangentv() const { return myTangentv; }
668  void setTangentv(const UT_StringHolder & val) { myTangentv = val; }
670  {
671  SOP_Node *thissop = cookparms.getNode();
672  if (!thissop) return getTangentv();
674  OP_Utils::evalOpParm(result, thissop, "tangentv", cookparms.getCookTime(), 0);
675  return result;
676  }
677  bool getSignson() const { return mySignson; }
678  void setSignson(bool val) { mySignson = val; }
679  bool opSignson(const SOP_NodeVerb::CookParms &cookparms) const
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getSignson();
683  bool result;
684  OP_Utils::evalOpParm(result, thissop, "signson", cookparms.getCookTime(), 0);
685  return result;
686  }
687  const UT_StringHolder & getSigns() const { return mySigns; }
688  void setSigns(const UT_StringHolder & val) { mySigns = val; }
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getSigns();
694  OP_Utils::evalOpParm(result, thissop, "signs", cookparms.getCookTime(), 0);
695  return result;
696  }
697  bool getOrtho() const { return myOrtho; }
698  void setOrtho(bool val) { myOrtho = val; }
699  bool opOrtho(const SOP_NodeVerb::CookParms &cookparms) const
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getOrtho();
703  bool result;
704  OP_Utils::evalOpParm(result, thissop, "ortho", cookparms.getCookTime(), 0);
705  return result;
706  }
707  bool getLeftHanded() const { return myLeftHanded; }
708  void setLeftHanded(bool val) { myLeftHanded = val; }
709  bool opLeftHanded(const SOP_NodeVerb::CookParms &cookparms) const
710  {
711  SOP_Node *thissop = cookparms.getNode();
712  if (!thissop) return getLeftHanded();
713  bool result;
714  OP_Utils::evalOpParm(result, thissop, "lefthanded", cookparms.getCookTime(), 0);
715  return result;
716  }
717 
718 private:
719  UT_StringHolder myGroup;
720  int64 myEntity;
721  UT_StringHolder myStyle;
722  UT_StringHolder myAttribname;
723  bool myNon;
724  UT_StringHolder myN;
725  bool myTangentuon;
726  UT_StringHolder myTangentu;
727  bool myTangentvon;
728  UT_StringHolder myTangentv;
729  bool mySignson;
730  UT_StringHolder mySigns;
731  bool myOrtho;
732  bool myLeftHanded;
733 
734 };
UT_StringHolder opTangentv(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:556
const UT_StringHolder & getSigns() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, bool &v)
bool operator==(const SOP_PolyFrameParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setTangentuon(bool val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator!=(const SOP_PolyFrameParms &src) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setN(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &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
void setSigns(const UT_StringHolder &val)
fpreal getTime() const
Definition: OP_Context.h:63
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void setGroup(const UT_StringHolder &val)
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getN() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
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
GLdouble s
Definition: glad.h:3009
static void loadData(UT_IStream &is, UT_Matrix3D &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
**But if you need a result
Definition: thread.h:622
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setAttribname(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_StringHolder opAttribname(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opTangentu(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool getLeftHanded() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool opTangentvon(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opNon(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
bool getTangentvon() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setTangentvon(bool val)
void setTangentv(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
exint length() const
void setTangentu(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector3D v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setStyle(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, fpreal64 &v)
bool opLeftHanded(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
Entity opEntity(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool opOrtho(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opStyle(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getTangentv() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
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 saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector4D &v)
void copyFrom(const OP_NodeParms *src) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_StringHolder & getGroup() const
UT_StringHolder opN(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
const UT_StringHolder & getTangentu() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:278
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void saveData(std::ostream &os, fpreal64 v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Entity enum_value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_StringHolder &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#define SOP_API
Definition: SOP_API.h:10
bool getTangentuon() const
bool load(UT_IStream &is)
Entity getEntity() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GLboolean r
Definition: glcorearb.h:1222
const UT_StringHolder & getAttribname() const
const UT_StringHolder & getStyle() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opTangentuon(const SOP_NodeVerb::CookParms &cookparms) const
void setSignson(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setEntity(Entity val)
void setLeftHanded(bool val)
UT_StringHolder opSigns(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opSignson(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663