HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Normal.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_NormalEnums
24 {
25  enum class Grouptype
26  {
27  GUESS = 0,
28  VERTICES,
29  EDGES,
30  POINTS,
31  PRIMS
32  };
33  enum class Type
34  {
35  TYPEPOINT = 0,
36  TYPEVERTEX,
37  TYPEPRIM,
39  };
40  enum class Method
41  {
42  UNIFORM = 0,
43  ANGLE,
44  AREA
45  };
46 }
47 
48 
50 {
51 public:
52  static int version() { return 1; }
53 
55  {
56  myGroup = ""_UTsh;
57  myGrouptype = 0;
58  myOverrideNormal = false;
59  myAttribName = "N"_UTsh;
60  myDoCompute = true;
61  myType = 1;
62  myCuspangle = 60;
63  myMethod = 1;
64  myOrigIfZero = true;
65  myNormalize = false;
66  myReverse = false;
67 
68  }
69 
70  explicit SOP_NormalParms(const SOP_NormalParms &) = default;
71  SOP_NormalParms &operator=(const SOP_NormalParms &) = default;
72  SOP_NormalParms(SOP_NormalParms &&) noexcept = default;
73  SOP_NormalParms &operator=(SOP_NormalParms &&) noexcept = default;
74 
75  ~SOP_NormalParms() override {}
76 
77  bool operator==(const SOP_NormalParms &src) const
78  {
79  if (myGroup != src.myGroup) return false;
80  if (myGrouptype != src.myGrouptype) return false;
81  if (myOverrideNormal != src.myOverrideNormal) return false;
82  if (myAttribName != src.myAttribName) return false;
83  if (myDoCompute != src.myDoCompute) return false;
84  if (myType != src.myType) return false;
85  if (myCuspangle != src.myCuspangle) return false;
86  if (myMethod != src.myMethod) return false;
87  if (myOrigIfZero != src.myOrigIfZero) return false;
88  if (myNormalize != src.myNormalize) return false;
89  if (myReverse != src.myReverse) return false;
90 
91  return true;
92  }
93  bool operator!=(const SOP_NormalParms &src) const
94  {
95  return !operator==(src);
96  }
100 
101 
102 
103  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
104  {
105  myGroup = ""_UTsh;
106  if (true)
107  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
108  myGrouptype = 0;
109  if (true)
110  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, 0);
111  myOverrideNormal = false;
112  if (true)
113  graph->evalOpParm(myOverrideNormal, nodeidx, "overridenormal", time, 0);
114  myAttribName = "N"_UTsh;
115  if (true && ( (true&&!(((getOverrideNormal()==0)))) ) )
116  graph->evalOpParm(myAttribName, nodeidx, "normalattrib", time, 0);
117  myDoCompute = true;
118  if (true)
119  graph->evalOpParm(myDoCompute, nodeidx, "docompute", time, 0);
120  myType = 1;
121  if (true && ( (true&&!(((getDoCompute()==0)))) ) )
122  graph->evalOpParm(myType, nodeidx, "type", time, 0);
123  myCuspangle = 60;
124  if (true && ( (true&&!(((getDoCompute()==0))||((int64(getType())!=1)))) ) )
125  graph->evalOpParm(myCuspangle, nodeidx, "cuspangle", time, 0);
126  myMethod = 1;
127  if (true && ( (true&&!(((getDoCompute()==0)))) ) )
128  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
129  myOrigIfZero = true;
130  if (true && ( (true&&!(((getDoCompute()==0)))) ) )
131  graph->evalOpParm(myOrigIfZero, nodeidx, "origifzero", time, 0);
132  myNormalize = false;
133  if (true && ( (true&&!(((getDoCompute()==1)))) ) )
134  graph->evalOpParm(myNormalize, nodeidx, "normalize", time, 0);
135  myReverse = false;
136  if (true)
137  graph->evalOpParm(myReverse, nodeidx, "reverse", time, 0);
138 
139  }
140 
141 
142  void loadFromOpSubclass(const LoadParms &loadparms) override
143  {
144  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
145  }
146 
147 
148  void copyFrom(const OP_NodeParms *src) override
149  {
150  *this = *((const SOP_NormalParms *)src);
151  }
152 
153  template <typename T>
154  void
155  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
156  {
157  if (idx.size() < 1)
158  return;
159  UT_ASSERT(idx.size() == instance.size()+1);
160  if (idx.size() != instance.size()+1)
161  return;
162  switch (idx[0])
163  {
164  case 0:
165  coerceValue(value, myGroup);
166  break;
167  case 1:
168  coerceValue(value, myGrouptype);
169  break;
170  case 2:
171  coerceValue(value, myOverrideNormal);
172  break;
173  case 3:
174  coerceValue(value, myAttribName);
175  break;
176  case 4:
177  coerceValue(value, myDoCompute);
178  break;
179  case 5:
180  coerceValue(value, myType);
181  break;
182  case 6:
183  coerceValue(value, myCuspangle);
184  break;
185  case 7:
186  coerceValue(value, myMethod);
187  break;
188  case 8:
189  coerceValue(value, myOrigIfZero);
190  break;
191  case 9:
192  coerceValue(value, myNormalize);
193  break;
194  case 10:
195  coerceValue(value, myReverse);
196  break;
197 
198  }
199  }
200 
201  bool isParmColorRamp(exint idx) const override
202  {
203  switch (idx)
204  {
205 
206  }
207  return false;
208  }
209 
210  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
231  { doGetParmValue(idx, instance, value); }
232 
233  template <typename T>
234  void
235  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
236  {
237  if (idx.size() < 1)
238  return;
239  UT_ASSERT(idx.size() == instance.size()+1);
240  if (idx.size() != instance.size()+1)
241  return;
242  switch (idx[0])
243  {
244  case 0:
245  coerceValue(myGroup, ( ( value ) ));
246  break;
247  case 1:
248  coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
249  break;
250  case 2:
251  coerceValue(myOverrideNormal, ( ( value ) ));
252  break;
253  case 3:
254  coerceValue(myAttribName, ( ( value ) ));
255  break;
256  case 4:
257  coerceValue(myDoCompute, ( ( value ) ));
258  break;
259  case 5:
260  coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
261  break;
262  case 6:
263  coerceValue(myCuspangle, clampMinValue(0, clampMaxValue(180, value ) ));
264  break;
265  case 7:
266  coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
267  break;
268  case 8:
269  coerceValue(myOrigIfZero, ( ( value ) ));
270  break;
271  case 9:
272  coerceValue(myNormalize, ( ( value ) ));
273  break;
274  case 10:
275  coerceValue(myReverse, ( ( value ) ));
276  break;
277 
278  }
279  }
280 
281  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
282  { doSetParmValue(idx, instance, value); }
283  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
284  { doSetParmValue(idx, instance, value); }
285  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
286  { doSetParmValue(idx, instance, value); }
287  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
288  { doSetParmValue(idx, instance, value); }
289  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
290  { doSetParmValue(idx, instance, value); }
291  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
292  { doSetParmValue(idx, instance, value); }
293  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
302  { doSetParmValue(idx, instance, value); }
303 
304  exint getNestNumParms(TempIndex idx) const override
305  {
306  if (idx.size() == 0)
307  return 11;
308  switch (idx[0])
309  {
310 
311  }
312  // Invalid
313  return 0;
314  }
315 
316  const char *getNestParmName(TempIndex fieldnum) const override
317  {
318  if (fieldnum.size() < 1)
319  return 0;
320  switch (fieldnum[0])
321  {
322  case 0:
323  return "group";
324  case 1:
325  return "grouptype";
326  case 2:
327  return "overridenormal";
328  case 3:
329  return "normalattrib";
330  case 4:
331  return "docompute";
332  case 5:
333  return "type";
334  case 6:
335  return "cuspangle";
336  case 7:
337  return "method";
338  case 8:
339  return "origifzero";
340  case 9:
341  return "normalize";
342  case 10:
343  return "reverse";
344 
345  }
346  return 0;
347  }
348 
349  ParmType getNestParmType(TempIndex fieldnum) const override
350  {
351  if (fieldnum.size() < 1)
352  return PARM_UNSUPPORTED;
353  switch (fieldnum[0])
354  {
355  case 0:
356  return PARM_STRING;
357  case 1:
358  return PARM_INTEGER;
359  case 2:
360  return PARM_INTEGER;
361  case 3:
362  return PARM_STRING;
363  case 4:
364  return PARM_INTEGER;
365  case 5:
366  return PARM_INTEGER;
367  case 6:
368  return PARM_FLOAT;
369  case 7:
370  return PARM_INTEGER;
371  case 8:
372  return PARM_INTEGER;
373  case 9:
374  return PARM_INTEGER;
375  case 10:
376  return PARM_INTEGER;
377 
378  }
379  return PARM_UNSUPPORTED;
380  }
381 
382  // Boiler plate to load individual types.
383  static void loadData(UT_IStream &is, int64 &v)
384  { is.bread(&v, 1); }
385  static void loadData(UT_IStream &is, bool &v)
386  { int64 iv; is.bread(&iv, 1); v = iv; }
387  static void loadData(UT_IStream &is, fpreal64 &v)
388  { is.bread<fpreal64>(&v, 1); }
389  static void loadData(UT_IStream &is, UT_Vector2D &v)
390  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
391  static void loadData(UT_IStream &is, UT_Vector3D &v)
392  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
393  is.bread<fpreal64>(&v.z(), 1); }
394  static void loadData(UT_IStream &is, UT_Vector4D &v)
395  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
396  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
397  static void loadData(UT_IStream &is, UT_Matrix2D &v)
398  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
399  static void loadData(UT_IStream &is, UT_Matrix3D &v)
400  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
401  static void loadData(UT_IStream &is, UT_Matrix4D &v)
402  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
403  static void loadData(UT_IStream &is, UT_Vector2I &v)
404  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
405  static void loadData(UT_IStream &is, UT_Vector3I &v)
406  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
407  is.bread<int64>(&v.z(), 1); }
408  static void loadData(UT_IStream &is, UT_Vector4I &v)
409  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
410  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
412  { is.bread(v); }
414  { UT_StringHolder rampdata;
415  loadData(is, rampdata);
416  if (rampdata.isstring())
417  {
418  v.reset(new UT_Ramp());
419  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
420  v->load(istr);
421  }
422  else v.reset();
423  }
426  loadData(is, data);
427  if (data.isstring())
428  {
429  // Find the data type.
430  const char *colon = UT_StringWrap(data).findChar(':');
431  if (colon)
432  {
433  int typelen = colon - data.buffer();
435  type.strncpy(data.buffer(), typelen);
436  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
437 
438  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
439  }
440  }
441  else v.reset();
442  }
443 
444  static void saveData(std::ostream &os, int64 v)
445  { UTwrite(os, &v); }
446  static void saveData(std::ostream &os, bool v)
447  { int64 iv = v; UTwrite(os, &iv); }
448  static void saveData(std::ostream &os, fpreal64 v)
449  { UTwrite<fpreal64>(os, &v); }
450  static void saveData(std::ostream &os, UT_Vector2D v)
451  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
452  static void saveData(std::ostream &os, UT_Vector3D v)
453  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
454  UTwrite<fpreal64>(os, &v.z()); }
455  static void saveData(std::ostream &os, UT_Vector4D v)
456  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
457  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
458  static void saveData(std::ostream &os, UT_Matrix2D v)
460  static void saveData(std::ostream &os, UT_Matrix3D v)
462  static void saveData(std::ostream &os, UT_Matrix4D v)
464  static void saveData(std::ostream &os, UT_StringHolder s)
465  { UT_StringWrap(s).saveBinary(os); }
466  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
468  UT_OStringStream ostr;
469  if (s) s->save(ostr);
470  result = ostr.str();
471  saveData(os, result);
472  }
473  static void saveData(std::ostream &os, PRM_DataItemHandle s)
475  UT_OStringStream ostr;
476  if (s)
477  {
478  ostr << s->getDataTypeToken();
479  ostr << ":";
480  s->saveBinary(ostr);
481  }
482  result = ostr.str();
483  saveData(os, result);
484  }
485 
486 
487  void save(std::ostream &os) const
488  {
489  int32 v = version();
490  UTwrite(os, &v);
491  saveData(os, myGroup);
492  saveData(os, myGrouptype);
493  saveData(os, myOverrideNormal);
494  saveData(os, myAttribName);
495  saveData(os, myDoCompute);
496  saveData(os, myType);
497  saveData(os, myCuspangle);
498  saveData(os, myMethod);
499  saveData(os, myOrigIfZero);
500  saveData(os, myNormalize);
501  saveData(os, myReverse);
502 
503  }
504 
505  bool load(UT_IStream &is)
506  {
507  int32 v;
508  is.bread(&v, 1);
509  if (version() != v)
510  {
511  // Fail incompatible versions
512  return false;
513  }
514  loadData(is, myGroup);
515  loadData(is, myGrouptype);
516  loadData(is, myOverrideNormal);
517  loadData(is, myAttribName);
518  loadData(is, myDoCompute);
519  loadData(is, myType);
520  loadData(is, myCuspangle);
521  loadData(is, myMethod);
522  loadData(is, myOrigIfZero);
523  loadData(is, myNormalize);
524  loadData(is, myReverse);
525 
526  return true;
527  }
528 
529  const UT_StringHolder & getGroup() const { return myGroup; }
530  void setGroup(const UT_StringHolder & val) { myGroup = val; }
532  {
533  SOP_Node *thissop = cookparms.getNode();
534  if (!thissop) return getGroup();
536  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
537  return result;
538  }
539  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
540  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
542  {
543  SOP_Node *thissop = cookparms.getNode();
544  if (!thissop) return getGrouptype();
545  int64 result;
546  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
547  return Grouptype(result);
548  }
549  bool getOverrideNormal() const { return myOverrideNormal; }
550  void setOverrideNormal(bool val) { myOverrideNormal = val; }
551  bool opOverrideNormal(const SOP_NodeVerb::CookParms &cookparms) const
552  {
553  SOP_Node *thissop = cookparms.getNode();
554  if (!thissop) return getOverrideNormal();
555  bool result;
556  OP_Utils::evalOpParm(result, thissop, "overridenormal", cookparms.getCookTime(), 0);
557  return result;
558  }
559  const UT_StringHolder & getAttribName() const { return myAttribName; }
560  void setAttribName(const UT_StringHolder & val) { myAttribName = val; }
562  {
563  SOP_Node *thissop = cookparms.getNode();
564  if (!thissop) return getAttribName();
566  OP_Utils::evalOpParm(result, thissop, "normalattrib", cookparms.getCookTime(), 0);
567  return result;
568  }
569  bool getDoCompute() const { return myDoCompute; }
570  void setDoCompute(bool val) { myDoCompute = val; }
571  bool opDoCompute(const SOP_NodeVerb::CookParms &cookparms) const
572  {
573  SOP_Node *thissop = cookparms.getNode();
574  if (!thissop) return getDoCompute();
575  bool result;
576  OP_Utils::evalOpParm(result, thissop, "docompute", cookparms.getCookTime(), 0);
577  return result;
578  }
579  Type getType() const { return Type(myType); }
580  void setType(Type val) { myType = int64(val); }
581  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
582  {
583  SOP_Node *thissop = cookparms.getNode();
584  if (!thissop) return getType();
585  int64 result;
586  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
587  return Type(result);
588  }
589  fpreal64 getCuspangle() const { return myCuspangle; }
590  void setCuspangle(fpreal64 val) { myCuspangle = val; }
592  {
593  SOP_Node *thissop = cookparms.getNode();
594  if (!thissop) return getCuspangle();
596  OP_Utils::evalOpParm(result, thissop, "cuspangle", cookparms.getCookTime(), 0);
597  return result;
598  }
599  Method getMethod() const { return Method(myMethod); }
600  void setMethod(Method val) { myMethod = int64(val); }
601  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
602  {
603  SOP_Node *thissop = cookparms.getNode();
604  if (!thissop) return getMethod();
605  int64 result;
606  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
607  return Method(result);
608  }
609  bool getOrigIfZero() const { return myOrigIfZero; }
610  void setOrigIfZero(bool val) { myOrigIfZero = val; }
611  bool opOrigIfZero(const SOP_NodeVerb::CookParms &cookparms) const
612  {
613  SOP_Node *thissop = cookparms.getNode();
614  if (!thissop) return getOrigIfZero();
615  bool result;
616  OP_Utils::evalOpParm(result, thissop, "origifzero", cookparms.getCookTime(), 0);
617  return result;
618  }
619  bool getNormalize() const { return myNormalize; }
620  void setNormalize(bool val) { myNormalize = val; }
621  bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
622  {
623  SOP_Node *thissop = cookparms.getNode();
624  if (!thissop) return getNormalize();
625  bool result;
626  OP_Utils::evalOpParm(result, thissop, "normalize", cookparms.getCookTime(), 0);
627  return result;
628  }
629  bool getReverse() const { return myReverse; }
630  void setReverse(bool val) { myReverse = val; }
631  bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
632  {
633  SOP_Node *thissop = cookparms.getNode();
634  if (!thissop) return getReverse();
635  bool result;
636  OP_Utils::evalOpParm(result, thissop, "reverse", cookparms.getCookTime(), 0);
637  return result;
638  }
639 
640 private:
641  UT_StringHolder myGroup;
642  int64 myGrouptype;
643  bool myOverrideNormal;
644  UT_StringHolder myAttribName;
645  bool myDoCompute;
646  int64 myType;
647  fpreal64 myCuspangle;
648  int64 myMethod;
649  bool myOrigIfZero;
650  bool myNormalize;
651  bool myReverse;
652 
653 };
bool getDoCompute() const
void save(std::ostream &os) const
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
bool getOrigIfZero() const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNormalize(bool val)
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
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal getTime() const
Definition: OP_Context.h:62
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
bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setGrouptype(Grouptype val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void copyFrom(const OP_NodeParms *src) override
bool opDoCompute(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:613
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool operator==(const SOP_NormalParms &src) 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.
static void saveData(std::ostream &os, fpreal64 v)
void setCuspangle(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setReverse(bool val)
void setOverrideNormal(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setType(Type val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
double fpreal64
Definition: SYS_Types.h:201
void setAttribName(const UT_StringHolder &val)
bool opOverrideNormal(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool opOrigIfZero(const SOP_NodeVerb::CookParms &cookparms) const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Method getMethod() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
exint length() const
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static int version()
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, int64 &v)
long long int64
Definition: SYS_Types.h:116
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool getNormalize() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setOrigIfZero(bool val)
Grouptype getGrouptype() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void loadFromOpSubclass(const LoadParms &loadparms) override
bool getReverse() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, int64 v)
bool getOverrideNormal() const
UT_StringHolder opAttribName(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
void setMethod(Method val)
static void loadData(UT_IStream &is, fpreal64 &v)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void setDoCompute(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLuint GLfloat * val
Definition: glcorearb.h:1608
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
#define SOP_API
Definition: SOP_API.h:10
ParmType getNestParmType(TempIndex fieldnum) const override
bool load(UT_IStream &is)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void saveData(std::ostream &os, UT_Matrix4D v)
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
static void saveData(std::ostream &os, UT_Matrix3D v)
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_Vector4I &v)
Type getType() const
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
fpreal64 opCuspangle(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
const UT_StringHolder & getAttribName() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
fpreal64 getCuspangle() const
SYS_FORCE_INLINE bool isstring() const
bool operator!=(const SOP_NormalParms &src) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const UT_StringHolder & getGroup() const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663