HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PCA.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_PCAEnums
24 {
25  enum class DataType
26  {
27  POINT = 0,
28  VOLUME
29  };
30 
32  getToken(DataType enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case DataType::POINT: return "point"_sh;
37  case DataType::VOLUME: return "volume"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class Mode
43  {
44  ANALYSE = 0,
45  SCREE,
46  PROJECT,
48  };
49 
51  getToken(Mode enum_value)
52  {
53  using namespace UT::Literal;
54  switch (enum_value) {
55  case Mode::ANALYSE: return "analyse"_sh;
56  case Mode::SCREE: return "scree"_sh;
57  case Mode::PROJECT: return "project"_sh;
58  case Mode::RECONSTRUCT: return "reconstruct"_sh;
59  default: UT_ASSERT(false); return ""_sh;
60  }
61  }
62 
63 }
64 
65 
67 {
68 public:
69  static int version() { return 1; }
70 
72  {
73  myDataType = 0;
74  myAttribs = "P"_UTsh;
75  myStride = 1024;
76  myMode = 0;
77  myIncludeMeanWeight = true;
78  mySkip = 0;
79  myComp = 10;
80  myXscale = 0.1;
81  myYscale = 1;
82  myPropcolor = UT_Vector3D(1,1,0);
83  myCumcolor = UT_Vector3D(0,1,1);
84 
85  }
86 
87  explicit SOP_PCAParms(const SOP_PCAParms &) = default;
88  SOP_PCAParms &operator=(const SOP_PCAParms &) = default;
89  SOP_PCAParms(SOP_PCAParms &&) noexcept = default;
90  SOP_PCAParms &operator=(SOP_PCAParms &&) noexcept = default;
91 
92  ~SOP_PCAParms() override {}
93 
94  bool operator==(const SOP_PCAParms &src) const
95  {
96  if (myDataType != src.myDataType) return false;
97  if (myAttribs != src.myAttribs) return false;
98  if (myStride != src.myStride) return false;
99  if (myMode != src.myMode) return false;
100  if (myIncludeMeanWeight != src.myIncludeMeanWeight) return false;
101  if (mySkip != src.mySkip) return false;
102  if (myComp != src.myComp) return false;
103  if (myXscale != src.myXscale) return false;
104  if (myYscale != src.myYscale) return false;
105  if (myPropcolor != src.myPropcolor) return false;
106  if (myCumcolor != src.myCumcolor) return false;
107 
108 
109  if (baseGetSignature() != src.baseGetSignature()) return false;
110 
111  return true;
112  }
113  bool operator!=(const SOP_PCAParms &src) const
114  {
115  return !operator==(src);
116  }
119 
120 
121 
122  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
123  {
124  myDataType = 0;
125  if (true)
126  graph->evalOpParm(myDataType, nodeidx, "datatype", time, graph->isDirect()?nullptr:depnode);
127  myAttribs = "P"_UTsh;
128  if (true && ( (true&&!(((int64(getDataType())!=0)))) ) )
129  graph->evalOpParm(myAttribs, nodeidx, "attribs", time, graph->isDirect()?nullptr:depnode);
130  myStride = 1024;
131  if (true && ( (true&&!(((int64(getDataType())!=0)))) ) )
132  graph->evalOpParm(myStride, nodeidx, "stride", time, graph->isDirect()?nullptr:depnode);
133  myMode = 0;
134  if (true)
135  graph->evalOpParm(myMode, nodeidx, "mode", time, graph->isDirect()?nullptr:depnode);
136  myIncludeMeanWeight = true;
137  if (true && ( (true&&!(((int64(getMode())==0))||((int64(getMode())==1)))) ) )
138  graph->evalOpParm(myIncludeMeanWeight, nodeidx, "includemeanweight", time, graph->isDirect()?nullptr:depnode);
139  mySkip = 0;
140  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
141  graph->evalOpParm(mySkip, nodeidx, "skip", time, graph->isDirect()?nullptr:depnode);
142  myComp = 10;
143  if (true && ( (true&&!(((int64(getMode())!=0)&&(int64(getMode())!=1)))) ) )
144  graph->evalOpParm(myComp, nodeidx, "comp", time, graph->isDirect()?nullptr:depnode);
145  myXscale = 0.1;
146  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
147  graph->evalOpParm(myXscale, nodeidx, "xscale", time, graph->isDirect()?nullptr:depnode);
148  myYscale = 1;
149  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
150  graph->evalOpParm(myYscale, nodeidx, "yscale", time, graph->isDirect()?nullptr:depnode);
151  myPropcolor = UT_Vector3D(1,1,0);
152  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
153  graph->evalOpParm(myPropcolor, nodeidx, "propcolor", time, graph->isDirect()?nullptr:depnode);
154  myCumcolor = UT_Vector3D(0,1,1);
155  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
156  graph->evalOpParm(myCumcolor, nodeidx, "cumcolor", time, graph->isDirect()?nullptr:depnode);
157 
158  }
159 
160 
161  void loadFromOpSubclass(const LoadParms &loadparms) override
162  {
163  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
164  }
165 
166 
167  void copyFrom(const OP_NodeParms *src) override
168  {
169  *this = *((const SOP_PCAParms *)src);
170  }
171 
172  template <typename T>
173  void
174  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
175  {
176  if (idx.size() < 1)
177  return;
178  UT_ASSERT(idx.size() == instance.size()+1);
179  if (idx.size() != instance.size()+1)
180  return;
181  switch (idx[0])
182  {
183  case 0:
184  coerceValue(value, myDataType);
185  break;
186  case 1:
187  coerceValue(value, myAttribs);
188  break;
189  case 2:
190  coerceValue(value, myStride);
191  break;
192  case 3:
193  coerceValue(value, myMode);
194  break;
195  case 4:
196  coerceValue(value, myIncludeMeanWeight);
197  break;
198  case 5:
199  coerceValue(value, mySkip);
200  break;
201  case 6:
202  coerceValue(value, myComp);
203  break;
204  case 7:
205  coerceValue(value, myXscale);
206  break;
207  case 8:
208  coerceValue(value, myYscale);
209  break;
210  case 9:
211  coerceValue(value, myPropcolor);
212  break;
213  case 10:
214  coerceValue(value, myCumcolor);
215  break;
216 
217  }
218  }
219 
220  bool isParmColorRamp(exint idx) const override
221  {
222  switch (idx)
223  {
224 
225  }
226  return false;
227  }
228 
229  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
250  { doGetParmValue(idx, instance, value); }
251 
252  template <typename T>
253  void
254  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
255  {
256  if (idx.size() < 1)
257  return;
258  UT_ASSERT(idx.size() == instance.size()+1);
259  if (idx.size() != instance.size()+1)
260  return;
261  switch (idx[0])
262  {
263  case 0:
264  coerceValue(myDataType, clampMinValue(0, clampMaxValue(1, value ) ));
265  break;
266  case 1:
267  coerceValue(myAttribs, ( ( value ) ));
268  break;
269  case 2:
270  coerceValue(myStride, clampMinValue(1, ( value ) ));
271  break;
272  case 3:
273  coerceValue(myMode, clampMinValue(0, clampMaxValue(3, value ) ));
274  break;
275  case 4:
276  coerceValue(myIncludeMeanWeight, ( ( value ) ));
277  break;
278  case 5:
279  coerceValue(mySkip, clampMinValue(0, ( value ) ));
280  break;
281  case 6:
282  coerceValue(myComp, clampMinValue(0, ( value ) ));
283  break;
284  case 7:
285  coerceValue(myXscale, clampMinValue(0, ( value ) ));
286  break;
287  case 8:
288  coerceValue(myYscale, clampMinValue(0, ( value ) ));
289  break;
290  case 9:
291  coerceValue(myPropcolor, ( ( value ) ));
292  break;
293  case 10:
294  coerceValue(myCumcolor, ( ( value ) ));
295  break;
296 
297  }
298  }
299 
300  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
321  { doSetParmValue(idx, instance, value); }
322 
323  exint getNestNumParms(TempIndex idx) const override
324  {
325  if (idx.size() == 0)
326  return 11;
327  switch (idx[0])
328  {
329 
330  }
331  // Invalid
332  return 0;
333  }
334 
335  const char *getNestParmName(TempIndex fieldnum) const override
336  {
337  if (fieldnum.size() < 1)
338  return 0;
339  switch (fieldnum[0])
340  {
341  case 0:
342  return "datatype";
343  case 1:
344  return "attribs";
345  case 2:
346  return "stride";
347  case 3:
348  return "mode";
349  case 4:
350  return "includemeanweight";
351  case 5:
352  return "skip";
353  case 6:
354  return "comp";
355  case 7:
356  return "xscale";
357  case 8:
358  return "yscale";
359  case 9:
360  return "propcolor";
361  case 10:
362  return "cumcolor";
363 
364  }
365  return 0;
366  }
367 
368  ParmType getNestParmType(TempIndex fieldnum) const override
369  {
370  if (fieldnum.size() < 1)
371  return PARM_UNSUPPORTED;
372  switch (fieldnum[0])
373  {
374  case 0:
375  return PARM_INTEGER;
376  case 1:
377  return PARM_STRING;
378  case 2:
379  return PARM_INTEGER;
380  case 3:
381  return PARM_INTEGER;
382  case 4:
383  return PARM_INTEGER;
384  case 5:
385  return PARM_INTEGER;
386  case 6:
387  return PARM_INTEGER;
388  case 7:
389  return PARM_FLOAT;
390  case 8:
391  return PARM_FLOAT;
392  case 9:
393  return PARM_VECTOR3;
394  case 10:
395  return PARM_VECTOR3;
396 
397  }
398  return PARM_UNSUPPORTED;
399  }
400 
401  // Boiler plate to load individual types.
402  static void loadData(UT_IStream &is, int64 &v)
403  { is.bread(&v, 1); }
404  static void loadData(UT_IStream &is, bool &v)
405  { int64 iv; is.bread(&iv, 1); v = iv; }
406  static void loadData(UT_IStream &is, fpreal64 &v)
407  { is.bread<fpreal64>(&v, 1); }
408  static void loadData(UT_IStream &is, UT_Vector2D &v)
409  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
410  static void loadData(UT_IStream &is, UT_Vector3D &v)
411  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
412  is.bread<fpreal64>(&v.z(), 1); }
413  static void loadData(UT_IStream &is, UT_Vector4D &v)
414  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
415  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
416  static void loadData(UT_IStream &is, UT_Matrix2D &v)
417  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
418  static void loadData(UT_IStream &is, UT_Matrix3D &v)
419  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
420  static void loadData(UT_IStream &is, UT_Matrix4D &v)
421  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
422  static void loadData(UT_IStream &is, UT_Vector2I &v)
423  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
424  static void loadData(UT_IStream &is, UT_Vector3I &v)
425  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
426  is.bread<int64>(&v.z(), 1); }
427  static void loadData(UT_IStream &is, UT_Vector4I &v)
428  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
429  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
431  { is.bread(v); }
433  { UT_StringHolder rampdata;
434  loadData(is, rampdata);
435  if (rampdata.isstring())
436  {
437  v.reset(new UT_Ramp());
438  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
439  v->load(istr);
440  }
441  else v.reset();
442  }
445  loadData(is, data);
446  if (data.isstring())
447  {
448  // Find the data type.
449  const char *colon = UT_StringWrap(data).findChar(':');
450  if (colon)
451  {
452  int typelen = colon - data.buffer();
454  type.strncpy(data.buffer(), typelen);
455  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
456 
457  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
458  }
459  }
460  else v.reset();
461  }
462 
463  static void saveData(std::ostream &os, int64 v)
464  { UTwrite(os, &v); }
465  static void saveData(std::ostream &os, bool v)
466  { int64 iv = v; UTwrite(os, &iv); }
467  static void saveData(std::ostream &os, fpreal64 v)
468  { UTwrite<fpreal64>(os, &v); }
469  static void saveData(std::ostream &os, UT_Vector2D v)
470  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
471  static void saveData(std::ostream &os, UT_Vector3D v)
472  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
473  UTwrite<fpreal64>(os, &v.z()); }
474  static void saveData(std::ostream &os, UT_Vector4D v)
475  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
476  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
477  static void saveData(std::ostream &os, UT_Matrix2D v)
479  static void saveData(std::ostream &os, UT_Matrix3D v)
481  static void saveData(std::ostream &os, UT_Matrix4D v)
483  static void saveData(std::ostream &os, UT_StringHolder s)
484  { UT_StringWrap(s).saveBinary(os); }
485  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
487  UT_OStringStream ostr;
488  if (s) s->save(ostr);
489  result = ostr.str();
490  saveData(os, result);
491  }
492  static void saveData(std::ostream &os, PRM_DataItemHandle s)
494  UT_OStringStream ostr;
495  if (s)
496  {
497  ostr << s->getDataTypeToken();
498  ostr << ":";
499  s->saveBinary(ostr);
500  }
501  result = ostr.str();
502  saveData(os, result);
503  }
504 
505 
506  void save(std::ostream &os) const
507  {
508  int32 v = version();
509  UTwrite(os, &v);
510  saveData(os, myDataType);
511  saveData(os, myAttribs);
512  saveData(os, myStride);
513  saveData(os, myMode);
514  saveData(os, myIncludeMeanWeight);
515  saveData(os, mySkip);
516  saveData(os, myComp);
517  saveData(os, myXscale);
518  saveData(os, myYscale);
519  saveData(os, myPropcolor);
520  saveData(os, myCumcolor);
521 
522  }
523 
524  bool load(UT_IStream &is)
525  {
526  int32 v;
527  is.bread(&v, 1);
528  if (version() != v)
529  {
530  // Fail incompatible versions
531  return false;
532  }
533  loadData(is, myDataType);
534  loadData(is, myAttribs);
535  loadData(is, myStride);
536  loadData(is, myMode);
537  loadData(is, myIncludeMeanWeight);
538  loadData(is, mySkip);
539  loadData(is, myComp);
540  loadData(is, myXscale);
541  loadData(is, myYscale);
542  loadData(is, myPropcolor);
543  loadData(is, myCumcolor);
544 
545  return true;
546  }
547 
548  DataType getDataType() const { return DataType(myDataType); }
549  void setDataType(DataType val) { myDataType = int64(val); }
551  {
552  SOP_Node *thissop = cookparms.getNode();
553  if (!thissop) return getDataType();
554  int64 result;
555  OP_Utils::evalOpParm(result, thissop, "datatype", cookparms.getCookTime(), 0);
556  return DataType(result);
557  }
558  const UT_StringHolder & getAttribs() const { return myAttribs; }
559  void setAttribs(const UT_StringHolder & val) { myAttribs = val; }
561  {
562  SOP_Node *thissop = cookparms.getNode();
563  if (!thissop) return getAttribs();
565  OP_Utils::evalOpParm(result, thissop, "attribs", cookparms.getCookTime(), 0);
566  return result;
567  }
568  int64 getStride() const { return myStride; }
569  void setStride(int64 val) { myStride = val; }
570  int64 opStride(const SOP_NodeVerb::CookParms &cookparms) const
571  {
572  SOP_Node *thissop = cookparms.getNode();
573  if (!thissop) return getStride();
574  int64 result;
575  OP_Utils::evalOpParm(result, thissop, "stride", cookparms.getCookTime(), 0);
576  return result;
577  }
578  Mode getMode() const { return Mode(myMode); }
579  void setMode(Mode val) { myMode = int64(val); }
580  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
581  {
582  SOP_Node *thissop = cookparms.getNode();
583  if (!thissop) return getMode();
584  int64 result;
585  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
586  return Mode(result);
587  }
588  bool getIncludeMeanWeight() const { return myIncludeMeanWeight; }
589  void setIncludeMeanWeight(bool val) { myIncludeMeanWeight = val; }
590  bool opIncludeMeanWeight(const SOP_NodeVerb::CookParms &cookparms) const
591  {
592  SOP_Node *thissop = cookparms.getNode();
593  if (!thissop) return getIncludeMeanWeight();
594  bool result;
595  OP_Utils::evalOpParm(result, thissop, "includemeanweight", cookparms.getCookTime(), 0);
596  return result;
597  }
598  int64 getSkip() const { return mySkip; }
599  void setSkip(int64 val) { mySkip = val; }
600  int64 opSkip(const SOP_NodeVerb::CookParms &cookparms) const
601  {
602  SOP_Node *thissop = cookparms.getNode();
603  if (!thissop) return getSkip();
604  int64 result;
605  OP_Utils::evalOpParm(result, thissop, "skip", cookparms.getCookTime(), 0);
606  return result;
607  }
608  int64 getComp() const { return myComp; }
609  void setComp(int64 val) { myComp = val; }
610  int64 opComp(const SOP_NodeVerb::CookParms &cookparms) const
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getComp();
614  int64 result;
615  OP_Utils::evalOpParm(result, thissop, "comp", cookparms.getCookTime(), 0);
616  return result;
617  }
618  fpreal64 getXscale() const { return myXscale; }
619  void setXscale(fpreal64 val) { myXscale = val; }
620  fpreal64 opXscale(const SOP_NodeVerb::CookParms &cookparms) const
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getXscale();
625  OP_Utils::evalOpParm(result, thissop, "xscale", cookparms.getCookTime(), 0);
626  return result;
627  }
628  fpreal64 getYscale() const { return myYscale; }
629  void setYscale(fpreal64 val) { myYscale = val; }
630  fpreal64 opYscale(const SOP_NodeVerb::CookParms &cookparms) const
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getYscale();
635  OP_Utils::evalOpParm(result, thissop, "yscale", cookparms.getCookTime(), 0);
636  return result;
637  }
638  UT_Vector3D getPropcolor() const { return myPropcolor; }
639  void setPropcolor(UT_Vector3D val) { myPropcolor = val; }
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getPropcolor();
645  OP_Utils::evalOpParm(result, thissop, "propcolor", cookparms.getCookTime(), 0);
646  return result;
647  }
648  UT_Vector3D getCumcolor() const { return myCumcolor; }
649  void setCumcolor(UT_Vector3D val) { myCumcolor = val; }
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getCumcolor();
655  OP_Utils::evalOpParm(result, thissop, "cumcolor", cookparms.getCookTime(), 0);
656  return result;
657  }
658 
659 private:
660  int64 myDataType;
661  UT_StringHolder myAttribs;
662  int64 myStride;
663  int64 myMode;
664  bool myIncludeMeanWeight;
665  int64 mySkip;
666  int64 myComp;
667  fpreal64 myXscale;
668  fpreal64 myYscale;
669  UT_Vector3D myPropcolor;
670  UT_Vector3D myCumcolor;
671 
672 };
type
Definition: core.h:556
static void loadData(UT_IStream &is, UT_Vector2D &v)
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
void setMode(Mode val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
const char * getNestParmName(TempIndex fieldnum) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
int64 getStride() const
static void saveData(std::ostream &os, UT_Vector3D v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE UT_StringHolder getToken(DataType enum_value)
Definition: SOP_PCA.proto.h:32
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool operator!=(const SOP_PCAParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
DataType getDataType() const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, bool &v)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
UT_Vector3D getCumcolor() const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
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
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void setDataType(DataType val)
An output stream object that owns its own string buffer storage.
bool operator==(const SOP_PCAParms &src) const
Definition: SOP_PCA.proto.h:94
**But if you need a result
Definition: thread.h:622
int64 getComp() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_StringHolder & getAttribs() const
bool load(UT_IStream &is)
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.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setPropcolor(UT_Vector3D val)
void save(std::ostream &os) const
DataType opDataType(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
bool opIncludeMeanWeight(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
int64 getSkip() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
bool isParmColorRamp(exint idx) const override
UT_Vector3D getPropcolor() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_Vector3D opPropcolor(const SOP_NodeVerb::CookParms &cookparms) const
int64 opStride(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal64 opXscale(const SOP_NodeVerb::CookParms &cookparms) const
void setStride(int64 val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
exint length() const
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
fpreal64 getYscale() const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_StringHolder opAttribs(const SOP_NodeVerb::CookParms &cookparms) const
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
long long int64
Definition: SYS_Types.h:116
UT_Vector3T< fpreal64 > UT_Vector3D
ParmType getNestParmType(TempIndex fieldnum) const override
int64 opComp(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setAttribs(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix4D v)
static int version()
Definition: SOP_PCA.proto.h:69
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, bool v)
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setYscale(fpreal64 val)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
fpreal64 opYscale(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void setCumcolor(UT_Vector3D val)
int64 opSkip(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void setXscale(fpreal64 val)
fpreal64 getXscale() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setSkip(int64 val)
GLboolean r
Definition: glcorearb.h:1222
static void saveData(std::ostream &os, fpreal64 v)
bool getIncludeMeanWeight() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
Mode getMode() const
UT_Vector3D opCumcolor(const SOP_NodeVerb::CookParms &cookparms) const
void setIncludeMeanWeight(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setComp(int64 val)
GLenum src
Definition: glcorearb.h:1793
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663