HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  }
120 
121 
122 
123  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
124  {
125  if (true)
126  OP_Utils::evalOpParm(myPtsort, node, "ptsort", time, 0);
127  else myPtsort = 0;
128  if (true && ( (!(((int64(getPtsort())!=6)))) ) )
129  OP_Utils::evalOpParm(myPointseed, node, "pointseed", time, 0);
130  else myPointseed = 0;
131  if (true && ( (!(((int64(getPtsort())!=7)))) ) )
132  OP_Utils::evalOpParm(myPointoffset, node, "pointoffset", time, 0);
133  else myPointoffset = 0;
134  if (true && ( (!(((int64(getPtsort())!=8)))) ) )
135  OP_Utils::evalOpParm(myPointprox, node, "pointprox", time, 0);
136  else myPointprox = UT_Vector3D(0,0,0);
137  if (true && ( (!(((int64(getPtsort())!=9)))) ) )
138  OP_Utils::evalOpParm(myPointobjpath, node, "pointobjpath", time, 0);
139  else myPointobjpath = ""_sh;
140  if (true && ( (!(((int64(getPtsort())!=9)))) ) )
141  OP_Utils::evalOpParm(myPointdir, node, "pointdir", time, 0);
142  else myPointdir = UT_Vector3D(0,1,0);
143  if (true && ( (!(((int64(getPtsort())!=10)))) ) )
144  OP_Utils::evalOpParm(myPointexpr, node, "pointexpr", time, 0);
145  else myPointexpr = 0;
146  if (true && ( (!(((int64(getPtsort())!=12)))) ) )
147  OP_Utils::evalOpParm(myPointattrib, node, "pointattrib", time, 0);
148  else myPointattrib = ""_sh;
149  if (true && ( (!(((int64(getPtsort())!=12)))) ) )
150  OP_Utils::evalOpParm(myPointattribcomp, node, "pointattribcomp", time, 0);
151  else myPointattribcomp = 0;
152  if (true)
153  OP_Utils::evalOpParm(myPointreverse, node, "pointreverse", time, 0);
154  else myPointreverse = false;
155  if (true)
156  OP_Utils::evalOpParm(myPrimsort, node, "primsort", time, 0);
157  else myPrimsort = 0;
158  if (true && ( (!(((int64(getPrimsort())!=5)))) ) )
159  OP_Utils::evalOpParm(myPrimseed, node, "primseed", time, 0);
160  else myPrimseed = 0;
161  if (true && ( (!(((int64(getPrimsort())!=6)))) ) )
162  OP_Utils::evalOpParm(myPrimoffset, node, "primoffset", time, 0);
163  else myPrimoffset = 0;
164  if (true && ( (!(((int64(getPrimsort())!=7)))) ) )
165  OP_Utils::evalOpParm(myPrimprox, node, "primprox", time, 0);
166  else myPrimprox = UT_Vector3D(0,0,0);
167  if (true && ( (!(((int64(getPrimsort())!=8)))) ) )
168  OP_Utils::evalOpParm(myPrimobjpath, node, "primobjpath", time, 0);
169  else myPrimobjpath = ""_sh;
170  if (true && ( (!(((int64(getPrimsort())!=8)))) ) )
171  OP_Utils::evalOpParm(myPrimdir, node, "primdir", time, 0);
172  else myPrimdir = UT_Vector3D(0,1,0);
173  if (true && ( (!(((int64(getPrimsort())!=9)))) ) )
174  OP_Utils::evalOpParm(myPrimexpr, node, "primexpr", time, 0);
175  else myPrimexpr = 0;
176  if (true && ( (!(((int64(getPrimsort())!=11)))) ) )
177  OP_Utils::evalOpParm(myPrimattrib, node, "primattrib", time, 0);
178  else myPrimattrib = ""_sh;
179  if (true && ( (!(((int64(getPrimsort())!=11)))) ) )
180  OP_Utils::evalOpParm(myPrimattribcomp, node, "primattribcomp", time, 0);
181  else myPrimattribcomp = 0;
182  if (true)
183  OP_Utils::evalOpParm(myPrimreverse, node, "primreverse", time, 0);
184  else myPrimreverse = false;
185  if (true)
186  OP_Utils::evalOpParm(myVertexPrimOrder, node, "vertexprimorder", time, 0);
187  else myVertexPrimOrder = false;
188 
189  }
190 
191 
192  virtual void loadFromOpSubclass(const LoadParms &loadparms)
193  {
194  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
195  }
196 
197 
198  virtual void copyFrom(const SOP_NodeParms *src)
199  {
200  *this = *((const SOP_SortParms *)src);
201  }
202 
203  template <typename T>
204  void
205  doGetParmValue(exint idx, T &value) const
206  {
207  switch (idx)
208  {
209  case 0:
210  coerceValue(value, myPtsort);
211  break;
212  case 1:
213  coerceValue(value, myPointseed);
214  break;
215  case 2:
216  coerceValue(value, myPointoffset);
217  break;
218  case 3:
219  coerceValue(value, myPointprox);
220  break;
221  case 4:
222  coerceValue(value, myPointobjpath);
223  break;
224  case 5:
225  coerceValue(value, myPointdir);
226  break;
227  case 6:
228  coerceValue(value, myPointexpr);
229  break;
230  case 7:
231  coerceValue(value, myPointattrib);
232  break;
233  case 8:
234  coerceValue(value, myPointattribcomp);
235  break;
236  case 9:
237  coerceValue(value, myPointreverse);
238  break;
239  case 10:
240  coerceValue(value, myPrimsort);
241  break;
242  case 11:
243  coerceValue(value, myPrimseed);
244  break;
245  case 12:
246  coerceValue(value, myPrimoffset);
247  break;
248  case 13:
249  coerceValue(value, myPrimprox);
250  break;
251  case 14:
252  coerceValue(value, myPrimobjpath);
253  break;
254  case 15:
255  coerceValue(value, myPrimdir);
256  break;
257  case 16:
258  coerceValue(value, myPrimexpr);
259  break;
260  case 17:
261  coerceValue(value, myPrimattrib);
262  break;
263  case 18:
264  coerceValue(value, myPrimattribcomp);
265  break;
266  case 19:
267  coerceValue(value, myPrimreverse);
268  break;
269  case 20:
270  coerceValue(value, myVertexPrimOrder);
271  break;
272 
273  }
274  }
275 
276  void getParmValue(exint idx, exint &value) const
277  { doGetParmValue(idx, value); }
278  void getParmValue(exint idx, fpreal &value) const
279  { doGetParmValue(idx, value); }
281  { doGetParmValue(idx, value); }
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); }
298 
299  template <typename T>
300  void
301  doSetParmValue(exint idx, const T &value)
302  {
303  switch (idx)
304  {
305  case 0:
306  coerceValue(myPtsort, value);
307  break;
308  case 1:
309  coerceValue(myPointseed, value);
310  break;
311  case 2:
312  coerceValue(myPointoffset, value);
313  break;
314  case 3:
315  coerceValue(myPointprox, value);
316  break;
317  case 4:
318  coerceValue(myPointobjpath, value);
319  break;
320  case 5:
321  coerceValue(myPointdir, value);
322  break;
323  case 6:
324  coerceValue(myPointexpr, value);
325  break;
326  case 7:
327  coerceValue(myPointattrib, value);
328  break;
329  case 8:
330  coerceValue(myPointattribcomp, value);
331  break;
332  case 9:
333  coerceValue(myPointreverse, value);
334  break;
335  case 10:
336  coerceValue(myPrimsort, value);
337  break;
338  case 11:
339  coerceValue(myPrimseed, value);
340  break;
341  case 12:
342  coerceValue(myPrimoffset, value);
343  break;
344  case 13:
345  coerceValue(myPrimprox, value);
346  break;
347  case 14:
348  coerceValue(myPrimobjpath, value);
349  break;
350  case 15:
351  coerceValue(myPrimdir, value);
352  break;
353  case 16:
354  coerceValue(myPrimexpr, value);
355  break;
356  case 17:
357  coerceValue(myPrimattrib, value);
358  break;
359  case 18:
360  coerceValue(myPrimattribcomp, value);
361  break;
362  case 19:
363  coerceValue(myPrimreverse, value);
364  break;
365  case 20:
366  coerceValue(myVertexPrimOrder, value);
367  break;
368 
369  }
370  }
371 
372  void setParmValue(exint idx, const exint &value)
373  { doSetParmValue(idx, value); }
374  void setParmValue(exint idx, const fpreal &value)
375  { doSetParmValue(idx, value); }
376  void setParmValue(exint idx, const UT_Vector2D &value)
377  { doSetParmValue(idx, value); }
378  void setParmValue(exint idx, const UT_Vector3D &value)
379  { doSetParmValue(idx, value); }
380  void setParmValue(exint idx, const UT_Vector4D &value)
381  { doSetParmValue(idx, value); }
382  void setParmValue(exint idx, const UT_Matrix2D &value)
383  { doSetParmValue(idx, value); }
384  void setParmValue(exint idx, const UT_Matrix3D &value)
385  { doSetParmValue(idx, value); }
386  void setParmValue(exint idx, const UT_Matrix4D &value)
387  { doSetParmValue(idx, value); }
389  { doSetParmValue(idx, value); }
391  { doSetParmValue(idx, value); }
393  { doSetParmValue(idx, value); }
394 
395  virtual exint getNumParms() const
396  {
397  return 21;
398  }
399 
400  virtual const char *getParmName(exint fieldnum) const
401  {
402  switch (fieldnum)
403  {
404  case 0:
405  return "ptsort";
406  case 1:
407  return "pointseed";
408  case 2:
409  return "pointoffset";
410  case 3:
411  return "pointprox";
412  case 4:
413  return "pointobjpath";
414  case 5:
415  return "pointdir";
416  case 6:
417  return "pointexpr";
418  case 7:
419  return "pointattrib";
420  case 8:
421  return "pointattribcomp";
422  case 9:
423  return "pointreverse";
424  case 10:
425  return "primsort";
426  case 11:
427  return "primseed";
428  case 12:
429  return "primoffset";
430  case 13:
431  return "primprox";
432  case 14:
433  return "primobjpath";
434  case 15:
435  return "primdir";
436  case 16:
437  return "primexpr";
438  case 17:
439  return "primattrib";
440  case 18:
441  return "primattribcomp";
442  case 19:
443  return "primreverse";
444  case 20:
445  return "vertexprimorder";
446 
447  }
448  return 0;
449  }
450 
451  virtual ParmType getParmType(exint fieldnum) const
452  {
453  switch (fieldnum)
454  {
455  case 0:
456  return PARM_INTEGER;
457  case 1:
458  return PARM_INTEGER;
459  case 2:
460  return PARM_INTEGER;
461  case 3:
462  return PARM_VECTOR3;
463  case 4:
464  return PARM_STRING;
465  case 5:
466  return PARM_VECTOR3;
467  case 6:
468  return PARM_FLOAT;
469  case 7:
470  return PARM_STRING;
471  case 8:
472  return PARM_INTEGER;
473  case 9:
474  return PARM_INTEGER;
475  case 10:
476  return PARM_INTEGER;
477  case 11:
478  return PARM_INTEGER;
479  case 12:
480  return PARM_INTEGER;
481  case 13:
482  return PARM_VECTOR3;
483  case 14:
484  return PARM_STRING;
485  case 15:
486  return PARM_VECTOR3;
487  case 16:
488  return PARM_FLOAT;
489  case 17:
490  return PARM_STRING;
491  case 18:
492  return PARM_INTEGER;
493  case 19:
494  return PARM_INTEGER;
495  case 20:
496  return PARM_INTEGER;
497 
498  }
499  return PARM_UNSUPPORTED;
500  }
501 
502  // Boiler plate to load individual types.
503  static void loadData(UT_IStream &is, int64 &v)
504  { is.bread(&v, 1); }
505  static void loadData(UT_IStream &is, bool &v)
506  { int64 iv; is.bread(&iv, 1); v = iv; }
507  static void loadData(UT_IStream &is, fpreal64 &v)
508  { is.bread<fpreal64>(&v, 1); }
509  static void loadData(UT_IStream &is, UT_Vector2D &v)
510  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
511  static void loadData(UT_IStream &is, UT_Vector3D &v)
512  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
513  is.bread<fpreal64>(&v.z(), 1); }
514  static void loadData(UT_IStream &is, UT_Vector4D &v)
515  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
516  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
517  static void loadData(UT_IStream &is, UT_Matrix2D &v)
518  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
519  static void loadData(UT_IStream &is, UT_Matrix3D &v)
520  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
521  static void loadData(UT_IStream &is, UT_Matrix4D &v)
522  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
523  static void loadData(UT_IStream &is, UT_Vector2I &v)
524  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
525  static void loadData(UT_IStream &is, UT_Vector3I &v)
526  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
527  is.bread<int64>(&v.z(), 1); }
528  static void loadData(UT_IStream &is, UT_Vector4I &v)
529  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
530  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
532  { is.bread(v); }
534  { UT_StringHolder rampdata;
535  loadData(is, rampdata);
536  if (rampdata.isstring())
537  {
538  v.reset(new UT_Ramp());
539  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
540  v->load(istr);
541  }
542  else v.reset();
543  }
546  loadData(is, data);
547  if (data.isstring())
548  {
549  // Find the data type.
550  char *colon = UT_StringWrap(data).findChar(':');
551  if (colon)
552  {
553  int typelen = colon - data.buffer();
555  type.strncpy(data.buffer(), typelen);
556  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
557 
558  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
559  }
560  }
561  else v.reset();
562  }
563 
564  static void saveData(std::ostream &os, int64 v)
565  { UTwrite(os, &v); }
566  static void saveData(std::ostream &os, bool v)
567  { int64 iv = v; UTwrite(os, &iv); }
568  static void saveData(std::ostream &os, fpreal64 v)
569  { UTwrite<fpreal64>(os, &v); }
570  static void saveData(std::ostream &os, UT_Vector2D v)
571  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
572  static void saveData(std::ostream &os, UT_Vector3D v)
573  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
574  UTwrite<fpreal64>(os, &v.z()); }
575  static void saveData(std::ostream &os, UT_Vector4D v)
576  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
577  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
578  static void saveData(std::ostream &os, UT_Matrix2D v)
580  static void saveData(std::ostream &os, UT_Matrix3D v)
582  static void saveData(std::ostream &os, UT_Matrix4D v)
584  static void saveData(std::ostream &os, UT_StringHolder s)
585  { UT_StringWrap(s).saveBinary(os); }
586  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
587  { UT_StringHolder result;
588  UT_OStringStream ostr;
589  if (s) s->save(ostr);
590  result = ostr.str();
591  saveData(os, result);
592  }
593  static void saveData(std::ostream &os, PRM_DataItemHandle s)
594  { UT_StringHolder result;
595  UT_OStringStream ostr;
596  if (s)
597  {
598  ostr << s->getDataTypeToken();
599  ostr << ":";
600  s->saveBinary(ostr);
601  }
602  result = ostr.str();
603  saveData(os, result);
604  }
605 
606 
607  void save(std::ostream &os) const
608  {
609  int32 v = version();
610  UTwrite(os, &v);
611  saveData(os, myPtsort);
612  saveData(os, myPointseed);
613  saveData(os, myPointoffset);
614  saveData(os, myPointprox);
615  saveData(os, myPointobjpath);
616  saveData(os, myPointdir);
617  saveData(os, myPointexpr);
618  saveData(os, myPointattrib);
619  saveData(os, myPointattribcomp);
620  saveData(os, myPointreverse);
621  saveData(os, myPrimsort);
622  saveData(os, myPrimseed);
623  saveData(os, myPrimoffset);
624  saveData(os, myPrimprox);
625  saveData(os, myPrimobjpath);
626  saveData(os, myPrimdir);
627  saveData(os, myPrimexpr);
628  saveData(os, myPrimattrib);
629  saveData(os, myPrimattribcomp);
630  saveData(os, myPrimreverse);
631  saveData(os, myVertexPrimOrder);
632 
633  }
634 
635  bool load(UT_IStream &is)
636  {
637  int32 v;
638  is.bread(&v, 1);
639  if (version() != v)
640  {
641  // Fail incompatible versions
642  return false;
643  }
644  loadData(is, myPtsort);
645  loadData(is, myPointseed);
646  loadData(is, myPointoffset);
647  loadData(is, myPointprox);
648  loadData(is, myPointobjpath);
649  loadData(is, myPointdir);
650  loadData(is, myPointexpr);
651  loadData(is, myPointattrib);
652  loadData(is, myPointattribcomp);
653  loadData(is, myPointreverse);
654  loadData(is, myPrimsort);
655  loadData(is, myPrimseed);
656  loadData(is, myPrimoffset);
657  loadData(is, myPrimprox);
658  loadData(is, myPrimobjpath);
659  loadData(is, myPrimdir);
660  loadData(is, myPrimexpr);
661  loadData(is, myPrimattrib);
662  loadData(is, myPrimattribcomp);
663  loadData(is, myPrimreverse);
664  loadData(is, myVertexPrimOrder);
665 
666  return true;
667  }
668 
669  Ptsort getPtsort() const { return Ptsort(myPtsort); }
670  void setPtsort(Ptsort val) { myPtsort = int64(val); }
671  Ptsort opPtsort(const SOP_NodeVerb::CookParms &cookparms) const
672  {
673  SOP_Node *thissop = cookparms.getNode();
674  if (!thissop) return getPtsort();
675  int64 result;
676  OP_Utils::evalOpParm(result, thissop, "ptsort", cookparms.getCookTime(), 0);
677  return Ptsort(result);
678  }
679  int64 getPointseed() const { return myPointseed; }
680  void setPointseed(int64 val) { myPointseed = val; }
681  int64 opPointseed(const SOP_NodeVerb::CookParms &cookparms) const
682  {
683  SOP_Node *thissop = cookparms.getNode();
684  if (!thissop) return getPointseed();
685  int64 result;
686  OP_Utils::evalOpParm(result, thissop, "pointseed", cookparms.getCookTime(), 0);
687  return result;
688  }
689  int64 getPointoffset() const { return myPointoffset; }
690  void setPointoffset(int64 val) { myPointoffset = val; }
692  {
693  SOP_Node *thissop = cookparms.getNode();
694  if (!thissop) return getPointoffset();
695  int64 result;
696  OP_Utils::evalOpParm(result, thissop, "pointoffset", cookparms.getCookTime(), 0);
697  return result;
698  }
699  UT_Vector3D getPointprox() const { return myPointprox; }
700  void setPointprox(UT_Vector3D val) { myPointprox = val; }
702  {
703  SOP_Node *thissop = cookparms.getNode();
704  if (!thissop) return getPointprox();
705  UT_Vector3D result;
706  OP_Utils::evalOpParm(result, thissop, "pointprox", cookparms.getCookTime(), 0);
707  return result;
708  }
709  const UT_StringHolder & getPointobjpath() const { return myPointobjpath; }
710  void setPointobjpath(const UT_StringHolder & val) { myPointobjpath = val; }
712  {
713  SOP_Node *thissop = cookparms.getNode();
714  if (!thissop) return getPointobjpath();
715  UT_StringHolder result;
716  OP_Utils::evalOpParm(result, thissop, "pointobjpath", cookparms.getCookTime(), 0);
717  return result;
718  }
719  UT_Vector3D getPointdir() const { return myPointdir; }
720  void setPointdir(UT_Vector3D val) { myPointdir = val; }
722  {
723  SOP_Node *thissop = cookparms.getNode();
724  if (!thissop) return getPointdir();
725  UT_Vector3D result;
726  OP_Utils::evalOpParm(result, thissop, "pointdir", cookparms.getCookTime(), 0);
727  return result;
728  }
729  fpreal64 getPointexpr() const { return myPointexpr; }
730  void setPointexpr(fpreal64 val) { myPointexpr = val; }
732  {
733  SOP_Node *thissop = cookparms.getNode();
734  if (!thissop) return getPointexpr();
735  fpreal64 result;
736  OP_Utils::evalOpParm(result, thissop, "pointexpr", cookparms.getCookTime(), 0);
737  return result;
738  }
739  const UT_StringHolder & getPointattrib() const { return myPointattrib; }
740  void setPointattrib(const UT_StringHolder & val) { myPointattrib = val; }
742  {
743  SOP_Node *thissop = cookparms.getNode();
744  if (!thissop) return getPointattrib();
745  UT_StringHolder result;
746  OP_Utils::evalOpParm(result, thissop, "pointattrib", cookparms.getCookTime(), 0);
747  return result;
748  }
749  int64 getPointattribcomp() const { return myPointattribcomp; }
750  void setPointattribcomp(int64 val) { myPointattribcomp = val; }
752  {
753  SOP_Node *thissop = cookparms.getNode();
754  if (!thissop) return getPointattribcomp();
755  int64 result;
756  OP_Utils::evalOpParm(result, thissop, "pointattribcomp", cookparms.getCookTime(), 0);
757  return result;
758  }
759  bool getPointreverse() const { return myPointreverse; }
760  void setPointreverse(bool val) { myPointreverse = val; }
761  bool opPointreverse(const SOP_NodeVerb::CookParms &cookparms) const
762  {
763  SOP_Node *thissop = cookparms.getNode();
764  if (!thissop) return getPointreverse();
765  bool result;
766  OP_Utils::evalOpParm(result, thissop, "pointreverse", cookparms.getCookTime(), 0);
767  return result;
768  }
769  Primsort getPrimsort() const { return Primsort(myPrimsort); }
770  void setPrimsort(Primsort val) { myPrimsort = int64(val); }
772  {
773  SOP_Node *thissop = cookparms.getNode();
774  if (!thissop) return getPrimsort();
775  int64 result;
776  OP_Utils::evalOpParm(result, thissop, "primsort", cookparms.getCookTime(), 0);
777  return Primsort(result);
778  }
779  int64 getPrimseed() const { return myPrimseed; }
780  void setPrimseed(int64 val) { myPrimseed = val; }
781  int64 opPrimseed(const SOP_NodeVerb::CookParms &cookparms) const
782  {
783  SOP_Node *thissop = cookparms.getNode();
784  if (!thissop) return getPrimseed();
785  int64 result;
786  OP_Utils::evalOpParm(result, thissop, "primseed", cookparms.getCookTime(), 0);
787  return result;
788  }
789  int64 getPrimoffset() const { return myPrimoffset; }
790  void setPrimoffset(int64 val) { myPrimoffset = val; }
792  {
793  SOP_Node *thissop = cookparms.getNode();
794  if (!thissop) return getPrimoffset();
795  int64 result;
796  OP_Utils::evalOpParm(result, thissop, "primoffset", cookparms.getCookTime(), 0);
797  return result;
798  }
799  UT_Vector3D getPrimprox() const { return myPrimprox; }
800  void setPrimprox(UT_Vector3D val) { myPrimprox = val; }
802  {
803  SOP_Node *thissop = cookparms.getNode();
804  if (!thissop) return getPrimprox();
805  UT_Vector3D result;
806  OP_Utils::evalOpParm(result, thissop, "primprox", cookparms.getCookTime(), 0);
807  return result;
808  }
809  const UT_StringHolder & getPrimobjpath() const { return myPrimobjpath; }
810  void setPrimobjpath(const UT_StringHolder & val) { myPrimobjpath = val; }
812  {
813  SOP_Node *thissop = cookparms.getNode();
814  if (!thissop) return getPrimobjpath();
815  UT_StringHolder result;
816  OP_Utils::evalOpParm(result, thissop, "primobjpath", cookparms.getCookTime(), 0);
817  return result;
818  }
819  UT_Vector3D getPrimdir() const { return myPrimdir; }
820  void setPrimdir(UT_Vector3D val) { myPrimdir = val; }
822  {
823  SOP_Node *thissop = cookparms.getNode();
824  if (!thissop) return getPrimdir();
825  UT_Vector3D result;
826  OP_Utils::evalOpParm(result, thissop, "primdir", cookparms.getCookTime(), 0);
827  return result;
828  }
829  fpreal64 getPrimexpr() const { return myPrimexpr; }
830  void setPrimexpr(fpreal64 val) { myPrimexpr = val; }
832  {
833  SOP_Node *thissop = cookparms.getNode();
834  if (!thissop) return getPrimexpr();
835  fpreal64 result;
836  OP_Utils::evalOpParm(result, thissop, "primexpr", cookparms.getCookTime(), 0);
837  return result;
838  }
839  const UT_StringHolder & getPrimattrib() const { return myPrimattrib; }
840  void setPrimattrib(const UT_StringHolder & val) { myPrimattrib = val; }
842  {
843  SOP_Node *thissop = cookparms.getNode();
844  if (!thissop) return getPrimattrib();
845  UT_StringHolder result;
846  OP_Utils::evalOpParm(result, thissop, "primattrib", cookparms.getCookTime(), 0);
847  return result;
848  }
849  int64 getPrimattribcomp() const { return myPrimattribcomp; }
850  void setPrimattribcomp(int64 val) { myPrimattribcomp = val; }
852  {
853  SOP_Node *thissop = cookparms.getNode();
854  if (!thissop) return getPrimattribcomp();
855  int64 result;
856  OP_Utils::evalOpParm(result, thissop, "primattribcomp", cookparms.getCookTime(), 0);
857  return result;
858  }
859  bool getPrimreverse() const { return myPrimreverse; }
860  void setPrimreverse(bool val) { myPrimreverse = val; }
861  bool opPrimreverse(const SOP_NodeVerb::CookParms &cookparms) const
862  {
863  SOP_Node *thissop = cookparms.getNode();
864  if (!thissop) return getPrimreverse();
865  bool result;
866  OP_Utils::evalOpParm(result, thissop, "primreverse", cookparms.getCookTime(), 0);
867  return result;
868  }
869  bool getVertexPrimOrder() const { return myVertexPrimOrder; }
870  void setVertexPrimOrder(bool val) { myVertexPrimOrder = val; }
871  bool opVertexPrimOrder(const SOP_NodeVerb::CookParms &cookparms) const
872  {
873  SOP_Node *thissop = cookparms.getNode();
874  if (!thissop) return getVertexPrimOrder();
875  bool result;
876  OP_Utils::evalOpParm(result, thissop, "vertexprimorder", cookparms.getCookTime(), 0);
877  return result;
878  }
879 
880 private:
881  int64 myPtsort;
882  int64 myPointseed;
883  int64 myPointoffset;
884  UT_Vector3D myPointprox;
885  UT_StringHolder myPointobjpath;
886  UT_Vector3D myPointdir;
887  fpreal64 myPointexpr;
888  UT_StringHolder myPointattrib;
889  int64 myPointattribcomp;
890  bool myPointreverse;
891  int64 myPrimsort;
892  int64 myPrimseed;
893  int64 myPrimoffset;
894  UT_Vector3D myPrimprox;
895  UT_StringHolder myPrimobjpath;
896  UT_Vector3D myPrimdir;
897  fpreal64 myPrimexpr;
898  UT_StringHolder myPrimattrib;
899  int64 myPrimattribcomp;
900  bool myPrimreverse;
901  bool myVertexPrimOrder;
902 
903 };
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:492
void setPrimreverse(bool val)
T & z(void)
Definition: UT_Vector4.h:372
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)
fpreal getTime() const
Definition: OP_Context.h:34
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)
T & x(void)
Definition: UT_Vector2.h:284
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:581
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:585
bool getPointreverse() const
long long int64
Definition: SYS_Types.h:106
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
const UT_StringHolder & getPrimattrib() const
int64 exint
Definition: SYS_Types.h:115
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:191
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:34
T & y(void)
Definition: UT_Vector4.h:370
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
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:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
const UT_StringHolder & getPointattrib() const
double fpreal
Definition: SYS_Types.h:269
void getParmValue(exint idx, UT_Matrix2D &value) const
UT_StringHolder opPointattrib(const SOP_NodeVerb::CookParms &cookparms) const
void strncpy(const char *src, exint maxlen)
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
const char * buffer() const
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:499
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:368
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void setPrimattrib(const UT_StringHolder &val)
T & y(void)
Definition: UT_Vector2.h:286
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:374
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)
UT_StringHolder opPointobjpath(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
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)
GLenum src
Definition: glcorearb.h:1792