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