HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Sort.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_NodeVerb.h>
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_SortEnums
22 {
23  enum class Ptsort
24  {
25  NONE = 0,
26  VTXORD,
27  BYX,
28  BYY,
29  BYZ,
30  REV,
31  SEED,
32  SHIF,
33  PROX,
34  VECTOR,
35  EXPRESSION,
36  SPATIAL,
37  ATTRIBUTE
38  };
39  enum class Primsort
40  {
41  NONE = 0,
42  BYX,
43  BYY,
44  BYZ,
45  REV,
46  SEED,
47  SHIF,
48  PROX,
49  VECTOR,
50  EXPRESSION,
51  SPATIAL,
52  ATTRIBUTE
53  };
54 }
55 
56 
58 {
59 public:
60  static int version() { return 1; }
61 
63  {
64  myPtsort = 0;
65  myPointseed = 0;
66  myPointoffset = 0;
67  myPointprox = UT_Vector3D(0,0,0);
68  myPointobjpath = ""_sh;
69  myPointdir = UT_Vector3D(0,1,0);
70  myPointexpr = 0;
71  myPointattrib = ""_sh;
72  myPointattribcomp = 0;
73  myPointreverse = false;
74  myPrimsort = 0;
75  myPrimseed = 0;
76  myPrimoffset = 0;
77  myPrimprox = UT_Vector3D(0,0,0);
78  myPrimobjpath = ""_sh;
79  myPrimdir = UT_Vector3D(0,1,0);
80  myPrimexpr = 0;
81  myPrimattrib = ""_sh;
82  myPrimattribcomp = 0;
83  myPrimreverse = false;
84  myVertexPrimOrder = false;
85 
86  }
87 
88  explicit SOP_SortParms(const SOP_SortParms &) = default;
89 
90  virtual ~SOP_SortParms() {}
91 
92  bool operator==(const SOP_SortParms &src) const
93  {
94  if (myPtsort != src.myPtsort) return false;
95  if (myPointseed != src.myPointseed) return false;
96  if (myPointoffset != src.myPointoffset) return false;
97  if (myPointprox != src.myPointprox) return false;
98  if (myPointobjpath != src.myPointobjpath) return false;
99  if (myPointdir != src.myPointdir) return false;
100  if (myPointexpr != src.myPointexpr) return false;
101  if (myPointattrib != src.myPointattrib) return false;
102  if (myPointattribcomp != src.myPointattribcomp) return false;
103  if (myPointreverse != src.myPointreverse) return false;
104  if (myPrimsort != src.myPrimsort) return false;
105  if (myPrimseed != src.myPrimseed) return false;
106  if (myPrimoffset != src.myPrimoffset) return false;
107  if (myPrimprox != src.myPrimprox) return false;
108  if (myPrimobjpath != src.myPrimobjpath) return false;
109  if (myPrimdir != src.myPrimdir) return false;
110  if (myPrimexpr != src.myPrimexpr) return false;
111  if (myPrimattrib != src.myPrimattrib) return false;
112  if (myPrimattribcomp != src.myPrimattribcomp) return false;
113  if (myPrimreverse != src.myPrimreverse) return false;
114  if (myVertexPrimOrder != src.myVertexPrimOrder) return false;
115 
116  return true;
117  }
118  bool operator!=(const SOP_SortParms &src) const
119  {
120  return !operator==(src);
121  }
124 
125 
126 
127  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
128  {
129  if (true)
130  OP_Utils::evalOpParm(myPtsort, node, "ptsort", time, 0);
131  else myPtsort = 0;
132  if (true && ( (!(((int64(getPtsort())!=6)))) ) )
133  OP_Utils::evalOpParm(myPointseed, node, "pointseed", time, 0);
134  else myPointseed = 0;
135  if (true && ( (!(((int64(getPtsort())!=7)))) ) )
136  OP_Utils::evalOpParm(myPointoffset, node, "pointoffset", time, 0);
137  else myPointoffset = 0;
138  if (true && ( (!(((int64(getPtsort())!=8)))) ) )
139  OP_Utils::evalOpParm(myPointprox, node, "pointprox", time, 0);
140  else myPointprox = UT_Vector3D(0,0,0);
141  if (true && ( (!(((int64(getPtsort())!=9)))) ) )
142  OP_Utils::evalOpParm(myPointobjpath, node, "pointobjpath", time, 0);
143  else myPointobjpath = ""_sh;
144  if (true && ( (!(((int64(getPtsort())!=9)))) ) )
145  OP_Utils::evalOpParm(myPointdir, node, "pointdir", time, 0);
146  else myPointdir = UT_Vector3D(0,1,0);
147  if (true && ( (!(((int64(getPtsort())!=10)))) ) )
148  OP_Utils::evalOpParm(myPointexpr, node, "pointexpr", time, 0);
149  else myPointexpr = 0;
150  if (true && ( (!(((int64(getPtsort())!=12)))) ) )
151  OP_Utils::evalOpParm(myPointattrib, node, "pointattrib", time, 0);
152  else myPointattrib = ""_sh;
153  if (true && ( (!(((int64(getPtsort())!=12)))) ) )
154  OP_Utils::evalOpParm(myPointattribcomp, node, "pointattribcomp", time, 0);
155  else myPointattribcomp = 0;
156  if (true)
157  OP_Utils::evalOpParm(myPointreverse, node, "pointreverse", time, 0);
158  else myPointreverse = false;
159  if (true)
160  OP_Utils::evalOpParm(myPrimsort, node, "primsort", time, 0);
161  else myPrimsort = 0;
162  if (true && ( (!(((int64(getPrimsort())!=5)))) ) )
163  OP_Utils::evalOpParm(myPrimseed, node, "primseed", time, 0);
164  else myPrimseed = 0;
165  if (true && ( (!(((int64(getPrimsort())!=6)))) ) )
166  OP_Utils::evalOpParm(myPrimoffset, node, "primoffset", time, 0);
167  else myPrimoffset = 0;
168  if (true && ( (!(((int64(getPrimsort())!=7)))) ) )
169  OP_Utils::evalOpParm(myPrimprox, node, "primprox", time, 0);
170  else myPrimprox = UT_Vector3D(0,0,0);
171  if (true && ( (!(((int64(getPrimsort())!=8)))) ) )
172  OP_Utils::evalOpParm(myPrimobjpath, node, "primobjpath", time, 0);
173  else myPrimobjpath = ""_sh;
174  if (true && ( (!(((int64(getPrimsort())!=8)))) ) )
175  OP_Utils::evalOpParm(myPrimdir, node, "primdir", time, 0);
176  else myPrimdir = UT_Vector3D(0,1,0);
177  if (true && ( (!(((int64(getPrimsort())!=9)))) ) )
178  OP_Utils::evalOpParm(myPrimexpr, node, "primexpr", time, 0);
179  else myPrimexpr = 0;
180  if (true && ( (!(((int64(getPrimsort())!=11)))) ) )
181  OP_Utils::evalOpParm(myPrimattrib, node, "primattrib", time, 0);
182  else myPrimattrib = ""_sh;
183  if (true && ( (!(((int64(getPrimsort())!=11)))) ) )
184  OP_Utils::evalOpParm(myPrimattribcomp, node, "primattribcomp", time, 0);
185  else myPrimattribcomp = 0;
186  if (true)
187  OP_Utils::evalOpParm(myPrimreverse, node, "primreverse", time, 0);
188  else myPrimreverse = false;
189  if (true)
190  OP_Utils::evalOpParm(myVertexPrimOrder, node, "vertexprimorder", time, 0);
191  else myVertexPrimOrder = false;
192 
193  }
194 
195 
196  virtual void loadFromOpSubclass(const LoadParms &loadparms)
197  {
198  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
199  }
200 
201 
202  virtual void copyFrom(const SOP_NodeParms *src)
203  {
204  *this = *((const SOP_SortParms *)src);
205  }
206 
207  template <typename T>
208  void
209  doGetParmValue(exint idx, T &value) const
210  {
211  switch (idx)
212  {
213  case 0:
214  coerceValue(value, myPtsort);
215  break;
216  case 1:
217  coerceValue(value, myPointseed);
218  break;
219  case 2:
220  coerceValue(value, myPointoffset);
221  break;
222  case 3:
223  coerceValue(value, myPointprox);
224  break;
225  case 4:
226  coerceValue(value, myPointobjpath);
227  break;
228  case 5:
229  coerceValue(value, myPointdir);
230  break;
231  case 6:
232  coerceValue(value, myPointexpr);
233  break;
234  case 7:
235  coerceValue(value, myPointattrib);
236  break;
237  case 8:
238  coerceValue(value, myPointattribcomp);
239  break;
240  case 9:
241  coerceValue(value, myPointreverse);
242  break;
243  case 10:
244  coerceValue(value, myPrimsort);
245  break;
246  case 11:
247  coerceValue(value, myPrimseed);
248  break;
249  case 12:
250  coerceValue(value, myPrimoffset);
251  break;
252  case 13:
253  coerceValue(value, myPrimprox);
254  break;
255  case 14:
256  coerceValue(value, myPrimobjpath);
257  break;
258  case 15:
259  coerceValue(value, myPrimdir);
260  break;
261  case 16:
262  coerceValue(value, myPrimexpr);
263  break;
264  case 17:
265  coerceValue(value, myPrimattrib);
266  break;
267  case 18:
268  coerceValue(value, myPrimattribcomp);
269  break;
270  case 19:
271  coerceValue(value, myPrimreverse);
272  break;
273  case 20:
274  coerceValue(value, myVertexPrimOrder);
275  break;
276 
277  }
278  }
279 
280  void getParmValue(exint idx, exint &value) const
281  { doGetParmValue(idx, value); }
282  void getParmValue(exint idx, fpreal &value) const
283  { doGetParmValue(idx, value); }
285  { doGetParmValue(idx, value); }
287  { doGetParmValue(idx, value); }
289  { doGetParmValue(idx, value); }
291  { doGetParmValue(idx, value); }
293  { doGetParmValue(idx, value); }
295  { doGetParmValue(idx, value); }
297  { doGetParmValue(idx, value); }
299  { doGetParmValue(idx, value); }
301  { doGetParmValue(idx, value); }
302 
303  template <typename T>
304  void
305  doSetParmValue(exint idx, const T &value)
306  {
307  switch (idx)
308  {
309  case 0:
310  coerceValue(myPtsort, value);
311  break;
312  case 1:
313  coerceValue(myPointseed, value);
314  break;
315  case 2:
316  coerceValue(myPointoffset, value);
317  break;
318  case 3:
319  coerceValue(myPointprox, value);
320  break;
321  case 4:
322  coerceValue(myPointobjpath, value);
323  break;
324  case 5:
325  coerceValue(myPointdir, value);
326  break;
327  case 6:
328  coerceValue(myPointexpr, value);
329  break;
330  case 7:
331  coerceValue(myPointattrib, value);
332  break;
333  case 8:
334  coerceValue(myPointattribcomp, value);
335  break;
336  case 9:
337  coerceValue(myPointreverse, value);
338  break;
339  case 10:
340  coerceValue(myPrimsort, value);
341  break;
342  case 11:
343  coerceValue(myPrimseed, value);
344  break;
345  case 12:
346  coerceValue(myPrimoffset, value);
347  break;
348  case 13:
349  coerceValue(myPrimprox, value);
350  break;
351  case 14:
352  coerceValue(myPrimobjpath, value);
353  break;
354  case 15:
355  coerceValue(myPrimdir, value);
356  break;
357  case 16:
358  coerceValue(myPrimexpr, value);
359  break;
360  case 17:
361  coerceValue(myPrimattrib, value);
362  break;
363  case 18:
364  coerceValue(myPrimattribcomp, value);
365  break;
366  case 19:
367  coerceValue(myPrimreverse, value);
368  break;
369  case 20:
370  coerceValue(myVertexPrimOrder, value);
371  break;
372 
373  }
374  }
375 
376  void setParmValue(exint idx, const exint &value)
377  { doSetParmValue(idx, value); }
378  void setParmValue(exint idx, const fpreal &value)
379  { doSetParmValue(idx, value); }
380  void setParmValue(exint idx, const UT_Vector2D &value)
381  { doSetParmValue(idx, value); }
382  void setParmValue(exint idx, const UT_Vector3D &value)
383  { doSetParmValue(idx, value); }
384  void setParmValue(exint idx, const UT_Vector4D &value)
385  { doSetParmValue(idx, value); }
386  void setParmValue(exint idx, const UT_Matrix2D &value)
387  { doSetParmValue(idx, value); }
388  void setParmValue(exint idx, const UT_Matrix3D &value)
389  { doSetParmValue(idx, value); }
390  void setParmValue(exint idx, const UT_Matrix4D &value)
391  { doSetParmValue(idx, value); }
393  { doSetParmValue(idx, value); }
395  { doSetParmValue(idx, value); }
397  { doSetParmValue(idx, value); }
398 
399  virtual exint getNumParms() const
400  {
401  return 21;
402  }
403 
404  virtual const char *getParmName(exint fieldnum) const
405  {
406  switch (fieldnum)
407  {
408  case 0:
409  return "ptsort";
410  case 1:
411  return "pointseed";
412  case 2:
413  return "pointoffset";
414  case 3:
415  return "pointprox";
416  case 4:
417  return "pointobjpath";
418  case 5:
419  return "pointdir";
420  case 6:
421  return "pointexpr";
422  case 7:
423  return "pointattrib";
424  case 8:
425  return "pointattribcomp";
426  case 9:
427  return "pointreverse";
428  case 10:
429  return "primsort";
430  case 11:
431  return "primseed";
432  case 12:
433  return "primoffset";
434  case 13:
435  return "primprox";
436  case 14:
437  return "primobjpath";
438  case 15:
439  return "primdir";
440  case 16:
441  return "primexpr";
442  case 17:
443  return "primattrib";
444  case 18:
445  return "primattribcomp";
446  case 19:
447  return "primreverse";
448  case 20:
449  return "vertexprimorder";
450 
451  }
452  return 0;
453  }
454 
455  virtual ParmType getParmType(exint fieldnum) const
456  {
457  switch (fieldnum)
458  {
459  case 0:
460  return PARM_INTEGER;
461  case 1:
462  return PARM_INTEGER;
463  case 2:
464  return PARM_INTEGER;
465  case 3:
466  return PARM_VECTOR3;
467  case 4:
468  return PARM_STRING;
469  case 5:
470  return PARM_VECTOR3;
471  case 6:
472  return PARM_FLOAT;
473  case 7:
474  return PARM_STRING;
475  case 8:
476  return PARM_INTEGER;
477  case 9:
478  return PARM_INTEGER;
479  case 10:
480  return PARM_INTEGER;
481  case 11:
482  return PARM_INTEGER;
483  case 12:
484  return PARM_INTEGER;
485  case 13:
486  return PARM_VECTOR3;
487  case 14:
488  return PARM_STRING;
489  case 15:
490  return PARM_VECTOR3;
491  case 16:
492  return PARM_FLOAT;
493  case 17:
494  return PARM_STRING;
495  case 18:
496  return PARM_INTEGER;
497  case 19:
498  return PARM_INTEGER;
499  case 20:
500  return PARM_INTEGER;
501 
502  }
503  return PARM_UNSUPPORTED;
504  }
505 
506  // Boiler plate to load individual types.
507  static void loadData(UT_IStream &is, int64 &v)
508  { is.bread(&v, 1); }
509  static void loadData(UT_IStream &is, bool &v)
510  { int64 iv; is.bread(&iv, 1); v = iv; }
511  static void loadData(UT_IStream &is, fpreal64 &v)
512  { is.bread<fpreal64>(&v, 1); }
513  static void loadData(UT_IStream &is, UT_Vector2D &v)
514  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
515  static void loadData(UT_IStream &is, UT_Vector3D &v)
516  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
517  is.bread<fpreal64>(&v.z(), 1); }
518  static void loadData(UT_IStream &is, UT_Vector4D &v)
519  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
520  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
521  static void loadData(UT_IStream &is, UT_Matrix2D &v)
522  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
523  static void loadData(UT_IStream &is, UT_Matrix3D &v)
524  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
525  static void loadData(UT_IStream &is, UT_Matrix4D &v)
526  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
527  static void loadData(UT_IStream &is, UT_Vector2I &v)
528  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
529  static void loadData(UT_IStream &is, UT_Vector3I &v)
530  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
531  is.bread<int64>(&v.z(), 1); }
532  static void loadData(UT_IStream &is, UT_Vector4I &v)
533  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
534  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
536  { is.bread(v); }
538  { UT_StringHolder rampdata;
539  loadData(is, rampdata);
540  if (rampdata.isstring())
541  {
542  v.reset(new UT_Ramp());
543  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
544  v->load(istr);
545  }
546  else v.reset();
547  }
550  loadData(is, data);
551  if (data.isstring())
552  {
553  // Find the data type.
554  char *colon = UT_StringWrap(data).findChar(':');
555  if (colon)
556  {
557  int typelen = colon - data.buffer();
559  type.strncpy(data.buffer(), typelen);
560  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
561 
562  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
563  }
564  }
565  else v.reset();
566  }
567 
568  static void saveData(std::ostream &os, int64 v)
569  { UTwrite(os, &v); }
570  static void saveData(std::ostream &os, bool v)
571  { int64 iv = v; UTwrite(os, &iv); }
572  static void saveData(std::ostream &os, fpreal64 v)
573  { UTwrite<fpreal64>(os, &v); }
574  static void saveData(std::ostream &os, UT_Vector2D v)
575  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
576  static void saveData(std::ostream &os, UT_Vector3D v)
577  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
578  UTwrite<fpreal64>(os, &v.z()); }
579  static void saveData(std::ostream &os, UT_Vector4D v)
580  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
581  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
582  static void saveData(std::ostream &os, UT_Matrix2D v)
584  static void saveData(std::ostream &os, UT_Matrix3D v)
586  static void saveData(std::ostream &os, UT_Matrix4D v)
588  static void saveData(std::ostream &os, UT_StringHolder s)
589  { UT_StringWrap(s).saveBinary(os); }
590  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
591  { UT_StringHolder result;
592  UT_OStringStream ostr;
593  if (s) s->save(ostr);
594  result = ostr.str();
595  saveData(os, result);
596  }
597  static void saveData(std::ostream &os, PRM_DataItemHandle s)
598  { UT_StringHolder result;
599  UT_OStringStream ostr;
600  if (s)
601  {
602  ostr << s->getDataTypeToken();
603  ostr << ":";
604  s->saveBinary(ostr);
605  }
606  result = ostr.str();
607  saveData(os, result);
608  }
609 
610 
611  void save(std::ostream &os) const
612  {
613  int32 v = version();
614  UTwrite(os, &v);
615  saveData(os, myPtsort);
616  saveData(os, myPointseed);
617  saveData(os, myPointoffset);
618  saveData(os, myPointprox);
619  saveData(os, myPointobjpath);
620  saveData(os, myPointdir);
621  saveData(os, myPointexpr);
622  saveData(os, myPointattrib);
623  saveData(os, myPointattribcomp);
624  saveData(os, myPointreverse);
625  saveData(os, myPrimsort);
626  saveData(os, myPrimseed);
627  saveData(os, myPrimoffset);
628  saveData(os, myPrimprox);
629  saveData(os, myPrimobjpath);
630  saveData(os, myPrimdir);
631  saveData(os, myPrimexpr);
632  saveData(os, myPrimattrib);
633  saveData(os, myPrimattribcomp);
634  saveData(os, myPrimreverse);
635  saveData(os, myVertexPrimOrder);
636 
637  }
638 
639  bool load(UT_IStream &is)
640  {
641  int32 v;
642  is.bread(&v, 1);
643  if (version() != v)
644  {
645  // Fail incompatible versions
646  return false;
647  }
648  loadData(is, myPtsort);
649  loadData(is, myPointseed);
650  loadData(is, myPointoffset);
651  loadData(is, myPointprox);
652  loadData(is, myPointobjpath);
653  loadData(is, myPointdir);
654  loadData(is, myPointexpr);
655  loadData(is, myPointattrib);
656  loadData(is, myPointattribcomp);
657  loadData(is, myPointreverse);
658  loadData(is, myPrimsort);
659  loadData(is, myPrimseed);
660  loadData(is, myPrimoffset);
661  loadData(is, myPrimprox);
662  loadData(is, myPrimobjpath);
663  loadData(is, myPrimdir);
664  loadData(is, myPrimexpr);
665  loadData(is, myPrimattrib);
666  loadData(is, myPrimattribcomp);
667  loadData(is, myPrimreverse);
668  loadData(is, myVertexPrimOrder);
669 
670  return true;
671  }
672 
673  Ptsort getPtsort() const { return Ptsort(myPtsort); }
674  void setPtsort(Ptsort val) { myPtsort = int64(val); }
675  Ptsort opPtsort(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getPtsort();
679  int64 result;
680  OP_Utils::evalOpParm(result, thissop, "ptsort", cookparms.getCookTime(), 0);
681  return Ptsort(result);
682  }
683  int64 getPointseed() const { return myPointseed; }
684  void setPointseed(int64 val) { myPointseed = val; }
685  int64 opPointseed(const SOP_NodeVerb::CookParms &cookparms) const
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getPointseed();
689  int64 result;
690  OP_Utils::evalOpParm(result, thissop, "pointseed", cookparms.getCookTime(), 0);
691  return result;
692  }
693  int64 getPointoffset() const { return myPointoffset; }
694  void setPointoffset(int64 val) { myPointoffset = val; }
696  {
697  SOP_Node *thissop = cookparms.getNode();
698  if (!thissop) return getPointoffset();
699  int64 result;
700  OP_Utils::evalOpParm(result, thissop, "pointoffset", cookparms.getCookTime(), 0);
701  return result;
702  }
703  UT_Vector3D getPointprox() const { return myPointprox; }
704  void setPointprox(UT_Vector3D val) { myPointprox = val; }
706  {
707  SOP_Node *thissop = cookparms.getNode();
708  if (!thissop) return getPointprox();
709  UT_Vector3D result;
710  OP_Utils::evalOpParm(result, thissop, "pointprox", cookparms.getCookTime(), 0);
711  return result;
712  }
713  const UT_StringHolder & getPointobjpath() const { return myPointobjpath; }
714  void setPointobjpath(const UT_StringHolder & val) { myPointobjpath = val; }
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getPointobjpath();
719  UT_StringHolder result;
720  OP_Utils::evalOpParm(result, thissop, "pointobjpath", cookparms.getCookTime(), 0);
721  return result;
722  }
723  UT_Vector3D getPointdir() const { return myPointdir; }
724  void setPointdir(UT_Vector3D val) { myPointdir = val; }
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getPointdir();
729  UT_Vector3D result;
730  OP_Utils::evalOpParm(result, thissop, "pointdir", cookparms.getCookTime(), 0);
731  return result;
732  }
733  fpreal64 getPointexpr() const { return myPointexpr; }
734  void setPointexpr(fpreal64 val) { myPointexpr = val; }
736  {
737  SOP_Node *thissop = cookparms.getNode();
738  if (!thissop) return getPointexpr();
739  fpreal64 result;
740  OP_Utils::evalOpParm(result, thissop, "pointexpr", cookparms.getCookTime(), 0);
741  return result;
742  }
743  const UT_StringHolder & getPointattrib() const { return myPointattrib; }
744  void setPointattrib(const UT_StringHolder & val) { myPointattrib = val; }
746  {
747  SOP_Node *thissop = cookparms.getNode();
748  if (!thissop) return getPointattrib();
749  UT_StringHolder result;
750  OP_Utils::evalOpParm(result, thissop, "pointattrib", cookparms.getCookTime(), 0);
751  return result;
752  }
753  int64 getPointattribcomp() const { return myPointattribcomp; }
754  void setPointattribcomp(int64 val) { myPointattribcomp = val; }
756  {
757  SOP_Node *thissop = cookparms.getNode();
758  if (!thissop) return getPointattribcomp();
759  int64 result;
760  OP_Utils::evalOpParm(result, thissop, "pointattribcomp", cookparms.getCookTime(), 0);
761  return result;
762  }
763  bool getPointreverse() const { return myPointreverse; }
764  void setPointreverse(bool val) { myPointreverse = val; }
765  bool opPointreverse(const SOP_NodeVerb::CookParms &cookparms) const
766  {
767  SOP_Node *thissop = cookparms.getNode();
768  if (!thissop) return getPointreverse();
769  bool result;
770  OP_Utils::evalOpParm(result, thissop, "pointreverse", cookparms.getCookTime(), 0);
771  return result;
772  }
773  Primsort getPrimsort() const { return Primsort(myPrimsort); }
774  void setPrimsort(Primsort val) { myPrimsort = int64(val); }
776  {
777  SOP_Node *thissop = cookparms.getNode();
778  if (!thissop) return getPrimsort();
779  int64 result;
780  OP_Utils::evalOpParm(result, thissop, "primsort", cookparms.getCookTime(), 0);
781  return Primsort(result);
782  }
783  int64 getPrimseed() const { return myPrimseed; }
784  void setPrimseed(int64 val) { myPrimseed = val; }
785  int64 opPrimseed(const SOP_NodeVerb::CookParms &cookparms) const
786  {
787  SOP_Node *thissop = cookparms.getNode();
788  if (!thissop) return getPrimseed();
789  int64 result;
790  OP_Utils::evalOpParm(result, thissop, "primseed", cookparms.getCookTime(), 0);
791  return result;
792  }
793  int64 getPrimoffset() const { return myPrimoffset; }
794  void setPrimoffset(int64 val) { myPrimoffset = val; }
796  {
797  SOP_Node *thissop = cookparms.getNode();
798  if (!thissop) return getPrimoffset();
799  int64 result;
800  OP_Utils::evalOpParm(result, thissop, "primoffset", cookparms.getCookTime(), 0);
801  return result;
802  }
803  UT_Vector3D getPrimprox() const { return myPrimprox; }
804  void setPrimprox(UT_Vector3D val) { myPrimprox = val; }
806  {
807  SOP_Node *thissop = cookparms.getNode();
808  if (!thissop) return getPrimprox();
809  UT_Vector3D result;
810  OP_Utils::evalOpParm(result, thissop, "primprox", cookparms.getCookTime(), 0);
811  return result;
812  }
813  const UT_StringHolder & getPrimobjpath() const { return myPrimobjpath; }
814  void setPrimobjpath(const UT_StringHolder & val) { myPrimobjpath = val; }
816  {
817  SOP_Node *thissop = cookparms.getNode();
818  if (!thissop) return getPrimobjpath();
819  UT_StringHolder result;
820  OP_Utils::evalOpParm(result, thissop, "primobjpath", cookparms.getCookTime(), 0);
821  return result;
822  }
823  UT_Vector3D getPrimdir() const { return myPrimdir; }
824  void setPrimdir(UT_Vector3D val) { myPrimdir = val; }
826  {
827  SOP_Node *thissop = cookparms.getNode();
828  if (!thissop) return getPrimdir();
829  UT_Vector3D result;
830  OP_Utils::evalOpParm(result, thissop, "primdir", cookparms.getCookTime(), 0);
831  return result;
832  }
833  fpreal64 getPrimexpr() const { return myPrimexpr; }
834  void setPrimexpr(fpreal64 val) { myPrimexpr = val; }
836  {
837  SOP_Node *thissop = cookparms.getNode();
838  if (!thissop) return getPrimexpr();
839  fpreal64 result;
840  OP_Utils::evalOpParm(result, thissop, "primexpr", cookparms.getCookTime(), 0);
841  return result;
842  }
843  const UT_StringHolder & getPrimattrib() const { return myPrimattrib; }
844  void setPrimattrib(const UT_StringHolder & val) { myPrimattrib = val; }
846  {
847  SOP_Node *thissop = cookparms.getNode();
848  if (!thissop) return getPrimattrib();
849  UT_StringHolder result;
850  OP_Utils::evalOpParm(result, thissop, "primattrib", cookparms.getCookTime(), 0);
851  return result;
852  }
853  int64 getPrimattribcomp() const { return myPrimattribcomp; }
854  void setPrimattribcomp(int64 val) { myPrimattribcomp = val; }
856  {
857  SOP_Node *thissop = cookparms.getNode();
858  if (!thissop) return getPrimattribcomp();
859  int64 result;
860  OP_Utils::evalOpParm(result, thissop, "primattribcomp", cookparms.getCookTime(), 0);
861  return result;
862  }
863  bool getPrimreverse() const { return myPrimreverse; }
864  void setPrimreverse(bool val) { myPrimreverse = val; }
865  bool opPrimreverse(const SOP_NodeVerb::CookParms &cookparms) const
866  {
867  SOP_Node *thissop = cookparms.getNode();
868  if (!thissop) return getPrimreverse();
869  bool result;
870  OP_Utils::evalOpParm(result, thissop, "primreverse", cookparms.getCookTime(), 0);
871  return result;
872  }
873  bool getVertexPrimOrder() const { return myVertexPrimOrder; }
874  void setVertexPrimOrder(bool val) { myVertexPrimOrder = val; }
875  bool opVertexPrimOrder(const SOP_NodeVerb::CookParms &cookparms) const
876  {
877  SOP_Node *thissop = cookparms.getNode();
878  if (!thissop) return getVertexPrimOrder();
879  bool result;
880  OP_Utils::evalOpParm(result, thissop, "vertexprimorder", cookparms.getCookTime(), 0);
881  return result;
882  }
883 
884 private:
885  int64 myPtsort;
886  int64 myPointseed;
887  int64 myPointoffset;
888  UT_Vector3D myPointprox;
889  UT_StringHolder myPointobjpath;
890  UT_Vector3D myPointdir;
891  fpreal64 myPointexpr;
892  UT_StringHolder myPointattrib;
893  int64 myPointattribcomp;
894  bool myPointreverse;
895  int64 myPrimsort;
896  int64 myPrimseed;
897  int64 myPrimoffset;
898  UT_Vector3D myPrimprox;
899  UT_StringHolder myPrimobjpath;
900  UT_Vector3D myPrimdir;
901  fpreal64 myPrimexpr;
902  UT_StringHolder myPrimattrib;
903  int64 myPrimattribcomp;
904  bool myPrimreverse;
905  bool myVertexPrimOrder;
906 
907 };
void setPointreverse(bool val)
void setPointobjpath(const UT_StringHolder &val)
void getParmValue(exint idx, UT_StringHolder &value) const
int64 opPrimattribcomp(const SOP_NodeVerb::CookParms &cookparms) const
bool getVertexPrimOrder() const
int64 getPointseed() const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, int64 &v)
void getParmValue(exint idx, UT_Vector3D &value) const
UT_Vector3D getPrimdir() const
void save(std::ostream &os) const
virtual exint getNumParms() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
void setPrimreverse(bool val)
T & z(void)
Definition: UT_Vector4.h:379
void setPointexpr(fpreal64 val)
void setParmValue(exint idx, const UT_Matrix4D &value)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
int64 opPointattribcomp(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_SortParms &src) const
const UT_StringHolder & getPointobjpath() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Vector4D v)
void setParmValue(exint idx, const exint &value)
fpreal64 getPrimexpr() const
Primsort opPrimsort(const SOP_NodeVerb::CookParms &cookparms) const
void setPointoffset(int64 val)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
int64 getPointattribcomp() const
UT_Vector3D opPointprox(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setPrimexpr(fpreal64 val)
int64 opPrimoffset(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opPrimobjpath(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void getParmValue(exint idx, UT_Vector2D &value) const
bool opPrimreverse(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
Ptsort getPtsort() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
void setPointattribcomp(int64 val)
void setPrimattribcomp(int64 val)
void setParmValue(exint idx, const UT_Vector3D &value)
fpreal64 opPointexpr(const SOP_NodeVerb::CookParms &cookparms) const
Primsort getPrimsort() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, fpreal64 &v)
virtual void copyFrom(const SOP_NodeParms *src)
void getParmValue(exint idx, UT_Vector4D &value) const
UT_Vector3D opPointdir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opVertexPrimOrder(const SOP_NodeVerb::CookParms &cookparms) const
void setPointdir(UT_Vector3D val)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool getPointreverse() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
int64 opPointoffset(const SOP_NodeVerb::CookParms &cookparms) const
virtual ~SOP_SortParms()
void setPrimseed(int64 val)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void setParmValue(exint idx, const UT_Vector2D &value)
static void saveData(std::ostream &os, UT_Vector3D v)
exint length() const
UT_Vector3D getPointprox() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
const UT_StringHolder & getPrimattrib() const
int64 exint
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Vector4I &v)
int64 getPrimattribcomp() const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
int64 getPrimseed() const
void setParmValue(exint idx, const UT_Vector4D &value)
void doGetParmValue(exint idx, T &value) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
static int version()
static void saveData(std::ostream &os, UT_Vector2D v)
void setPrimdir(UT_Vector3D val)
int64 getPointoffset() const
Ptsort opPtsort(const SOP_NodeVerb::CookParms &cookparms) const
void setPointattrib(const UT_StringHolder &val)
UT_StringHolder opPrimattrib(const SOP_NodeVerb::CookParms &cookparms) const
virtual ParmType getParmType(exint fieldnum) const
UT_Vector3T< fpreal64 > UT_Vector3D
void setParmValue(exint idx, const UT_StringHolder &value)
bool load(UT_IStream &is)
GLboolean * data
Definition: glcorearb.h:130
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
void getParmValue(exint idx, UT_Matrix3D &value) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
bool getPrimreverse() const
UT_Vector3D getPointdir() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void setPtsort(Ptsort val)
int64 opPrimseed(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
int64 getPrimoffset() const
UT_Vector3D opPrimprox(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
const UT_StringHolder & getPointattrib() const
double fpreal
Definition: SYS_Types.h:270
void getParmValue(exint idx, UT_Matrix2D &value) const
UT_StringHolder opPointattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setPrimobjpath(const UT_StringHolder &val)
void setPrimoffset(int64 val)
void setPrimprox(UT_Vector3D val)
virtual const char * getParmName(exint fieldnum) const
const UT_StringHolder & getPrimobjpath() const
int64 opPointseed(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
GLuint GLfloat * val
Definition: glcorearb.h:1607
void setPrimsort(Primsort val)
void setVertexPrimOrder(bool val)
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, int64 v)
void getParmValue(exint idx, fpreal &value) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal64 opPrimexpr(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
void setParmValue(exint idx, const UT_Matrix3D &value)
bool opPointreverse(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
T & x(void)
Definition: UT_Vector4.h:375
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void setPrimattrib(const UT_StringHolder &val)
T & y(void)
Definition: UT_Vector2.h:287
void getParmValue(exint idx, exint &value) const
void setParmValue(exint idx, const UT_Matrix2D &value)
static void saveData(std::ostream &os, UT_StringHolder s)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void setParmValue(exint idx, const fpreal &value)
GLboolean r
Definition: glcorearb.h:1221
void doSetParmValue(exint idx, const T &value)
UT_Vector3D getPrimprox() const
T & w(void)
Definition: UT_Vector4.h:381
void getParmValue(exint idx, UT_Matrix4D &value) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setPointseed(int64 val)
void setPointprox(UT_Vector3D val)
bool operator!=(const SOP_SortParms &src) const
UT_StringHolder opPointobjpath(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
fpreal64 getPointexpr() const
UT_Vector3D opPrimdir(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1792