HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PointGenerate.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 
23 {
24 public:
25  static int version() { return 1; }
26 
28  {
29  myGroup = ""_sh;
30  myKeep = false;
31  myPtsperpt = false;
32  myNpts = 5000;
33  myNptsperpt = 10;
34  myDoattrib = false;
35  myAttrib = ""_sh;
36  mySeed = 0;
37  myDogroup = false;
38  myGgroup = "generated"_sh;
39  myDopointnum = false;
40  mySpointnum = "pointnum"_sh;
41  myDopointidx = false;
42  mySpointidx = "pointidx"_sh;
43  myDocopyattribs = false;
44  myAttribstocopy = "*"_sh;
45 
46  }
47 
48  explicit SOP_PointGenerateParms(const SOP_PointGenerateParms &) = default;
49 
51 
53  {
54  if (myGroup != src.myGroup) return false;
55  if (myKeep != src.myKeep) return false;
56  if (myPtsperpt != src.myPtsperpt) return false;
57  if (myNpts != src.myNpts) return false;
58  if (myNptsperpt != src.myNptsperpt) return false;
59  if (myDoattrib != src.myDoattrib) return false;
60  if (myAttrib != src.myAttrib) return false;
61  if (mySeed != src.mySeed) return false;
62  if (myDogroup != src.myDogroup) return false;
63  if (myGgroup != src.myGgroup) return false;
64  if (myDopointnum != src.myDopointnum) return false;
65  if (mySpointnum != src.mySpointnum) return false;
66  if (myDopointidx != src.myDopointidx) return false;
67  if (mySpointidx != src.mySpointidx) return false;
68  if (myDocopyattribs != src.myDocopyattribs) return false;
69  if (myAttribstocopy != src.myAttribstocopy) return false;
70 
71  return true;
72  }
74  {
75  return !operator==(src);
76  }
77 
78 
79 
80  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
81  {
82  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
83  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
84  else myGroup = ""_sh;
85  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
86  OP_Utils::evalOpParm(myKeep, node, "keep", time, 0);
87  else myKeep = false;
88  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
89  OP_Utils::evalOpParm(myPtsperpt, node, "ptsperpt", time, 0);
90  else myPtsperpt = false;
91  if (true && ( (!((((node->getInput(0)!=0)==1)&&(getPtsperpt()==1)))) ) )
92  OP_Utils::evalOpParm(myNpts, node, "npts", time, 0);
93  else myNpts = 5000;
94  if (true && ( (!((((node->getInput(0)!=0)==0))||((getPtsperpt()==0)))) ) )
95  OP_Utils::evalOpParm(myNptsperpt, node, "nptsperpt", time, 0);
96  else myNptsperpt = 10;
97  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
98  OP_Utils::evalOpParm(myDoattrib, node, "doattrib", time, 0);
99  else myDoattrib = false;
100  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDoattrib()==0)))) ) )
101  OP_Utils::evalOpParm(myAttrib, node, "attrib", time, 0);
102  else myAttrib = ""_sh;
103  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
104  OP_Utils::evalOpParm(mySeed, node, "seed", time, 0);
105  else mySeed = 0;
106  if (true)
107  OP_Utils::evalOpParm(myDogroup, node, "dogroup", time, 0);
108  else myDogroup = false;
109  if (true && ( (!(((getDogroup()==0)))) ) )
110  OP_Utils::evalOpParm(myGgroup, node, "ggroup", time, 0);
111  else myGgroup = "generated"_sh;
112  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
113  OP_Utils::evalOpParm(myDopointnum, node, "dopointnum", time, 0);
114  else myDopointnum = false;
115  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDopointnum()==0)))) ) )
116  OP_Utils::evalOpParm(mySpointnum, node, "spointnum", time, 0);
117  else mySpointnum = "pointnum"_sh;
118  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
119  OP_Utils::evalOpParm(myDopointidx, node, "dopointidx", time, 0);
120  else myDopointidx = false;
121  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDopointidx()==0)))) ) )
122  OP_Utils::evalOpParm(mySpointidx, node, "spointidx", time, 0);
123  else mySpointidx = "pointidx"_sh;
124  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
125  OP_Utils::evalOpParm(myDocopyattribs, node, "docopyattribs", time, 0);
126  else myDocopyattribs = false;
127  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDocopyattribs()==0)))) ) )
128  OP_Utils::evalOpParm(myAttribstocopy, node, "attribstocopy", time, 0);
129  else myAttribstocopy = "*"_sh;
130 
131  }
132 
133 
134  virtual void loadFromOpSubclass(const LoadParms &loadparms)
135  {
136  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
137  }
138 
139 
140  virtual void copyFrom(const SOP_NodeParms *src)
141  {
142  *this = *((const SOP_PointGenerateParms *)src);
143  }
144 
145  template <typename T>
146  void
147  doGetParmValue(exint idx, T &value) const
148  {
149  switch (idx)
150  {
151  case 0:
152  coerceValue(value, myGroup);
153  break;
154  case 1:
155  coerceValue(value, myKeep);
156  break;
157  case 2:
158  coerceValue(value, myPtsperpt);
159  break;
160  case 3:
161  coerceValue(value, myNpts);
162  break;
163  case 4:
164  coerceValue(value, myNptsperpt);
165  break;
166  case 5:
167  coerceValue(value, myDoattrib);
168  break;
169  case 6:
170  coerceValue(value, myAttrib);
171  break;
172  case 7:
173  coerceValue(value, mySeed);
174  break;
175  case 8:
176  coerceValue(value, myDogroup);
177  break;
178  case 9:
179  coerceValue(value, myGgroup);
180  break;
181  case 10:
182  coerceValue(value, myDopointnum);
183  break;
184  case 11:
185  coerceValue(value, mySpointnum);
186  break;
187  case 12:
188  coerceValue(value, myDopointidx);
189  break;
190  case 13:
191  coerceValue(value, mySpointidx);
192  break;
193  case 14:
194  coerceValue(value, myDocopyattribs);
195  break;
196  case 15:
197  coerceValue(value, myAttribstocopy);
198  break;
199 
200  }
201  }
202 
203  void getParmValue(exint idx, exint &value) const
204  { doGetParmValue(idx, value); }
205  void getParmValue(exint idx, fpreal &value) const
206  { doGetParmValue(idx, value); }
208  { doGetParmValue(idx, value); }
210  { doGetParmValue(idx, value); }
212  { doGetParmValue(idx, value); }
214  { doGetParmValue(idx, value); }
216  { doGetParmValue(idx, value); }
218  { doGetParmValue(idx, value); }
220  { doGetParmValue(idx, value); }
222  { doGetParmValue(idx, value); }
224  { doGetParmValue(idx, value); }
225 
226  template <typename T>
227  void
228  doSetParmValue(exint idx, const T &value)
229  {
230  switch (idx)
231  {
232  case 0:
233  coerceValue(myGroup, value);
234  break;
235  case 1:
236  coerceValue(myKeep, value);
237  break;
238  case 2:
239  coerceValue(myPtsperpt, value);
240  break;
241  case 3:
242  coerceValue(myNpts, value);
243  break;
244  case 4:
245  coerceValue(myNptsperpt, value);
246  break;
247  case 5:
248  coerceValue(myDoattrib, value);
249  break;
250  case 6:
251  coerceValue(myAttrib, value);
252  break;
253  case 7:
254  coerceValue(mySeed, value);
255  break;
256  case 8:
257  coerceValue(myDogroup, value);
258  break;
259  case 9:
260  coerceValue(myGgroup, value);
261  break;
262  case 10:
263  coerceValue(myDopointnum, value);
264  break;
265  case 11:
266  coerceValue(mySpointnum, value);
267  break;
268  case 12:
269  coerceValue(myDopointidx, value);
270  break;
271  case 13:
272  coerceValue(mySpointidx, value);
273  break;
274  case 14:
275  coerceValue(myDocopyattribs, value);
276  break;
277  case 15:
278  coerceValue(myAttribstocopy, value);
279  break;
280 
281  }
282  }
283 
284  void setParmValue(exint idx, const exint &value)
285  { doSetParmValue(idx, value); }
286  void setParmValue(exint idx, const fpreal &value)
287  { doSetParmValue(idx, value); }
288  void setParmValue(exint idx, const UT_Vector2D &value)
289  { doSetParmValue(idx, value); }
290  void setParmValue(exint idx, const UT_Vector3D &value)
291  { doSetParmValue(idx, value); }
292  void setParmValue(exint idx, const UT_Vector4D &value)
293  { doSetParmValue(idx, value); }
294  void setParmValue(exint idx, const UT_Matrix2D &value)
295  { doSetParmValue(idx, value); }
296  void setParmValue(exint idx, const UT_Matrix3D &value)
297  { doSetParmValue(idx, value); }
298  void setParmValue(exint idx, const UT_Matrix4D &value)
299  { doSetParmValue(idx, value); }
301  { doSetParmValue(idx, value); }
303  { doSetParmValue(idx, value); }
305  { doSetParmValue(idx, value); }
306 
307  virtual exint getNumParms() const
308  {
309  return 16;
310  }
311 
312  virtual const char *getParmName(exint fieldnum) const
313  {
314  switch (fieldnum)
315  {
316  case 0:
317  return "group";
318  case 1:
319  return "keep";
320  case 2:
321  return "ptsperpt";
322  case 3:
323  return "npts";
324  case 4:
325  return "nptsperpt";
326  case 5:
327  return "doattrib";
328  case 6:
329  return "attrib";
330  case 7:
331  return "seed";
332  case 8:
333  return "dogroup";
334  case 9:
335  return "ggroup";
336  case 10:
337  return "dopointnum";
338  case 11:
339  return "spointnum";
340  case 12:
341  return "dopointidx";
342  case 13:
343  return "spointidx";
344  case 14:
345  return "docopyattribs";
346  case 15:
347  return "attribstocopy";
348 
349  }
350  return 0;
351  }
352 
353  virtual ParmType getParmType(exint fieldnum) const
354  {
355  switch (fieldnum)
356  {
357  case 0:
358  return PARM_STRING;
359  case 1:
360  return PARM_INTEGER;
361  case 2:
362  return PARM_INTEGER;
363  case 3:
364  return PARM_INTEGER;
365  case 4:
366  return PARM_FLOAT;
367  case 5:
368  return PARM_INTEGER;
369  case 6:
370  return PARM_STRING;
371  case 7:
372  return PARM_FLOAT;
373  case 8:
374  return PARM_INTEGER;
375  case 9:
376  return PARM_STRING;
377  case 10:
378  return PARM_INTEGER;
379  case 11:
380  return PARM_STRING;
381  case 12:
382  return PARM_INTEGER;
383  case 13:
384  return PARM_STRING;
385  case 14:
386  return PARM_INTEGER;
387  case 15:
388  return PARM_STRING;
389 
390  }
391  return PARM_UNSUPPORTED;
392  }
393 
394  // Boiler plate to load individual types.
395  static void loadData(UT_IStream &is, int64 &v)
396  { is.bread(&v, 1); }
397  static void loadData(UT_IStream &is, bool &v)
398  { int64 iv; is.bread(&iv, 1); v = iv; }
399  static void loadData(UT_IStream &is, fpreal64 &v)
400  { is.bread<fpreal64>(&v, 1); }
401  static void loadData(UT_IStream &is, UT_Vector2D &v)
402  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
403  static void loadData(UT_IStream &is, UT_Vector3D &v)
404  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
405  is.bread<fpreal64>(&v.z(), 1); }
406  static void loadData(UT_IStream &is, UT_Vector4D &v)
407  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
408  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
409  static void loadData(UT_IStream &is, UT_Matrix2D &v)
410  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
411  static void loadData(UT_IStream &is, UT_Matrix3D &v)
412  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
413  static void loadData(UT_IStream &is, UT_Matrix4D &v)
414  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
415  static void loadData(UT_IStream &is, UT_Vector2I &v)
416  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
417  static void loadData(UT_IStream &is, UT_Vector3I &v)
418  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
419  is.bread<int64>(&v.z(), 1); }
420  static void loadData(UT_IStream &is, UT_Vector4I &v)
421  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
422  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
424  { is.bread(v); }
426  { UT_StringHolder rampdata;
427  loadData(is, rampdata);
428  if (rampdata.isstring())
429  {
430  v.reset(new UT_Ramp());
431  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
432  v->load(istr);
433  }
434  else v.reset();
435  }
438  loadData(is, data);
439  if (data.isstring())
440  {
441  // Find the data type.
442  char *colon = UT_StringWrap(data).findChar(':');
443  if (colon)
444  {
445  int typelen = colon - data.buffer();
447  type.strncpy(data.buffer(), typelen);
448  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
449 
450  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
451  }
452  }
453  else v.reset();
454  }
455 
456  static void saveData(std::ostream &os, int64 v)
457  { UTwrite(os, &v); }
458  static void saveData(std::ostream &os, bool v)
459  { int64 iv = v; UTwrite(os, &iv); }
460  static void saveData(std::ostream &os, fpreal64 v)
461  { UTwrite<fpreal64>(os, &v); }
462  static void saveData(std::ostream &os, UT_Vector2D v)
463  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
464  static void saveData(std::ostream &os, UT_Vector3D v)
465  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
466  UTwrite<fpreal64>(os, &v.z()); }
467  static void saveData(std::ostream &os, UT_Vector4D v)
468  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
469  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
470  static void saveData(std::ostream &os, UT_Matrix2D v)
472  static void saveData(std::ostream &os, UT_Matrix3D v)
474  static void saveData(std::ostream &os, UT_Matrix4D v)
476  static void saveData(std::ostream &os, UT_StringHolder s)
477  { UT_StringWrap(s).saveBinary(os); }
478  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
479  { UT_StringHolder result;
480  UT_OStringStream ostr;
481  if (s) s->save(ostr);
482  result = ostr.str();
483  saveData(os, result);
484  }
485  static void saveData(std::ostream &os, PRM_DataItemHandle s)
486  { UT_StringHolder result;
487  UT_OStringStream ostr;
488  if (s)
489  {
490  ostr << s->getDataTypeToken();
491  ostr << ":";
492  s->saveBinary(ostr);
493  }
494  result = ostr.str();
495  saveData(os, result);
496  }
497 
498 
499  void save(std::ostream &os) const
500  {
501  int32 v = version();
502  UTwrite(os, &v);
503  saveData(os, myGroup);
504  saveData(os, myKeep);
505  saveData(os, myPtsperpt);
506  saveData(os, myNpts);
507  saveData(os, myNptsperpt);
508  saveData(os, myDoattrib);
509  saveData(os, myAttrib);
510  saveData(os, mySeed);
511  saveData(os, myDogroup);
512  saveData(os, myGgroup);
513  saveData(os, myDopointnum);
514  saveData(os, mySpointnum);
515  saveData(os, myDopointidx);
516  saveData(os, mySpointidx);
517  saveData(os, myDocopyattribs);
518  saveData(os, myAttribstocopy);
519 
520  }
521 
522  bool load(UT_IStream &is)
523  {
524  int32 v;
525  is.bread(&v, 1);
526  if (version() != v)
527  {
528  // Fail incompatible versions
529  return false;
530  }
531  loadData(is, myGroup);
532  loadData(is, myKeep);
533  loadData(is, myPtsperpt);
534  loadData(is, myNpts);
535  loadData(is, myNptsperpt);
536  loadData(is, myDoattrib);
537  loadData(is, myAttrib);
538  loadData(is, mySeed);
539  loadData(is, myDogroup);
540  loadData(is, myGgroup);
541  loadData(is, myDopointnum);
542  loadData(is, mySpointnum);
543  loadData(is, myDopointidx);
544  loadData(is, mySpointidx);
545  loadData(is, myDocopyattribs);
546  loadData(is, myAttribstocopy);
547 
548  return true;
549  }
550 
551  const UT_StringHolder & getGroup() const { return myGroup; }
552  void setGroup(const UT_StringHolder & val) { myGroup = val; }
554  {
555  SOP_Node *thissop = cookparms.getNode();
556  if (!thissop) return getGroup();
557  UT_StringHolder result;
558  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
559  return result;
560  }
561  bool getKeep() const { return myKeep; }
562  void setKeep(bool val) { myKeep = val; }
563  bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
564  {
565  SOP_Node *thissop = cookparms.getNode();
566  if (!thissop) return getKeep();
567  bool result;
568  OP_Utils::evalOpParm(result, thissop, "keep", cookparms.getCookTime(), 0);
569  return result;
570  }
571  bool getPtsperpt() const { return myPtsperpt; }
572  void setPtsperpt(bool val) { myPtsperpt = val; }
573  bool opPtsperpt(const SOP_NodeVerb::CookParms &cookparms) const
574  {
575  SOP_Node *thissop = cookparms.getNode();
576  if (!thissop) return getPtsperpt();
577  bool result;
578  OP_Utils::evalOpParm(result, thissop, "ptsperpt", cookparms.getCookTime(), 0);
579  return result;
580  }
581  int64 getNpts() const { return myNpts; }
582  void setNpts(int64 val) { myNpts = val; }
583  int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
584  {
585  SOP_Node *thissop = cookparms.getNode();
586  if (!thissop) return getNpts();
587  int64 result;
588  OP_Utils::evalOpParm(result, thissop, "npts", cookparms.getCookTime(), 0);
589  return result;
590  }
591  fpreal64 getNptsperpt() const { return myNptsperpt; }
592  void setNptsperpt(fpreal64 val) { myNptsperpt = val; }
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return getNptsperpt();
597  fpreal64 result;
598  OP_Utils::evalOpParm(result, thissop, "nptsperpt", cookparms.getCookTime(), 0);
599  return result;
600  }
601  bool getDoattrib() const { return myDoattrib; }
602  void setDoattrib(bool val) { myDoattrib = val; }
603  bool opDoattrib(const SOP_NodeVerb::CookParms &cookparms) const
604  {
605  SOP_Node *thissop = cookparms.getNode();
606  if (!thissop) return getDoattrib();
607  bool result;
608  OP_Utils::evalOpParm(result, thissop, "doattrib", cookparms.getCookTime(), 0);
609  return result;
610  }
611  const UT_StringHolder & getAttrib() const { return myAttrib; }
612  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getAttrib();
617  UT_StringHolder result;
618  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
619  return result;
620  }
621  fpreal64 getSeed() const { return mySeed; }
622  void setSeed(fpreal64 val) { mySeed = val; }
623  fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getSeed();
627  fpreal64 result;
628  OP_Utils::evalOpParm(result, thissop, "seed", cookparms.getCookTime(), 0);
629  return result;
630  }
631  bool getDogroup() const { return myDogroup; }
632  void setDogroup(bool val) { myDogroup = val; }
633  bool opDogroup(const SOP_NodeVerb::CookParms &cookparms) const
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getDogroup();
637  bool result;
638  OP_Utils::evalOpParm(result, thissop, "dogroup", cookparms.getCookTime(), 0);
639  return result;
640  }
641  const UT_StringHolder & getGgroup() const { return myGgroup; }
642  void setGgroup(const UT_StringHolder & val) { myGgroup = val; }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getGgroup();
647  UT_StringHolder result;
648  OP_Utils::evalOpParm(result, thissop, "ggroup", cookparms.getCookTime(), 0);
649  return result;
650  }
651  bool getDopointnum() const { return myDopointnum; }
652  void setDopointnum(bool val) { myDopointnum = val; }
653  bool opDopointnum(const SOP_NodeVerb::CookParms &cookparms) const
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getDopointnum();
657  bool result;
658  OP_Utils::evalOpParm(result, thissop, "dopointnum", cookparms.getCookTime(), 0);
659  return result;
660  }
661  const UT_StringHolder & getSpointnum() const { return mySpointnum; }
662  void setSpointnum(const UT_StringHolder & val) { mySpointnum = val; }
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getSpointnum();
667  UT_StringHolder result;
668  OP_Utils::evalOpParm(result, thissop, "spointnum", cookparms.getCookTime(), 0);
669  return result;
670  }
671  bool getDopointidx() const { return myDopointidx; }
672  void setDopointidx(bool val) { myDopointidx = val; }
673  bool opDopointidx(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getDopointidx();
677  bool result;
678  OP_Utils::evalOpParm(result, thissop, "dopointidx", cookparms.getCookTime(), 0);
679  return result;
680  }
681  const UT_StringHolder & getSpointidx() const { return mySpointidx; }
682  void setSpointidx(const UT_StringHolder & val) { mySpointidx = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getSpointidx();
687  UT_StringHolder result;
688  OP_Utils::evalOpParm(result, thissop, "spointidx", cookparms.getCookTime(), 0);
689  return result;
690  }
691  bool getDocopyattribs() const { return myDocopyattribs; }
692  void setDocopyattribs(bool val) { myDocopyattribs = val; }
693  bool opDocopyattribs(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getDocopyattribs();
697  bool result;
698  OP_Utils::evalOpParm(result, thissop, "docopyattribs", cookparms.getCookTime(), 0);
699  return result;
700  }
701  const UT_StringHolder & getAttribstocopy() const { return myAttribstocopy; }
702  void setAttribstocopy(const UT_StringHolder & val) { myAttribstocopy = val; }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getAttribstocopy();
707  UT_StringHolder result;
708  OP_Utils::evalOpParm(result, thissop, "attribstocopy", cookparms.getCookTime(), 0);
709  return result;
710  }
711 
712 private:
713  UT_StringHolder myGroup;
714  bool myKeep;
715  bool myPtsperpt;
716  int64 myNpts;
717  fpreal64 myNptsperpt;
718  bool myDoattrib;
719  UT_StringHolder myAttrib;
720  fpreal64 mySeed;
721  bool myDogroup;
722  UT_StringHolder myGgroup;
723  bool myDopointnum;
724  UT_StringHolder mySpointnum;
725  bool myDopointidx;
726  UT_StringHolder mySpointidx;
727  bool myDocopyattribs;
728  UT_StringHolder myAttribstocopy;
729 
730 };
static void saveData(std::ostream &os, UT_Vector4D v)
void doSetParmValue(exint idx, const T &value)
virtual void copyFrom(const SOP_NodeParms *src)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
static void loadData(UT_IStream &is, UT_Vector3I &v)
T & z(void)
Definition: UT_Vector4.h:379
virtual exint getNumParms() const
bool opDoattrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSpointidx(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setParmValue(exint idx, const UT_Vector4D &value)
static void saveData(std::ostream &os, UT_Vector3D v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void getParmValue(exint idx, UT_Vector3D &value) const
bool operator==(const SOP_PointGenerateParms &src) const
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opGgroup(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
static void saveData(std::ostream &os, UT_Matrix2D v)
bool opPtsperpt(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
An output stream object that owns its own string buffer storage.
void getParmValue(exint idx, fpreal &value) const
void setParmValue(exint idx, const UT_Matrix3D &value)
static void saveData(std::ostream &os, int64 v)
const UT_StringHolder & getGroup() const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void getParmValue(exint idx, UT_Vector4D &value) const
virtual const char * getParmName(exint fieldnum) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
const UT_StringHolder & getAttrib() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void doGetParmValue(exint idx, T &value) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setAttrib(const UT_StringHolder &val)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void setParmValue(exint idx, const PRM_DataItemHandle &value)
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 & getGgroup() const
int64 exint
Definition: SYS_Types.h:116
void setParmValue(exint idx, const UT_Matrix4D &value)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
bool opDopointnum(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:192
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
virtual ParmType getParmType(exint fieldnum) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void getParmValue(exint idx, UT_Vector2D &value) const
OP_Node * getInput(unsigned idx, bool mark_used=false) const
Returns the node connected to a particular input (may be null).
fpreal64 opNptsperpt(const SOP_NodeVerb::CookParms &cookparms) const
bool opDogroup(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, exint &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_PointGenerateParms &src) const
void setGroup(const UT_StringHolder &val)
GLboolean * data
Definition: glcorearb.h:130
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const exint &value)
void setParmValue(exint idx, const UT_Matrix2D &value)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const UT_StringHolder & getAttribstocopy() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_StringHolder opSpointnum(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
bool opDocopyattribs(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setGgroup(const UT_StringHolder &val)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void setParmValue(exint idx, const fpreal &value)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
const UT_StringHolder & getSpointidx() const
void getParmValue(exint idx, UT_Matrix4D &value) const
const UT_StringHolder & getSpointnum() const
void getParmValue(exint idx, UT_Matrix3D &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setParmValue(exint idx, const UT_StringHolder &value)
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SOP_API
Definition: SOP_API.h:10
void setSpointnum(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Matrix2D &value) const
int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
void setSpointidx(const UT_StringHolder &val)
T & x(void)
Definition: UT_Vector4.h:375
static void loadData(UT_IStream &is, UT_Matrix2D &v)
T & y(void)
Definition: UT_Vector2.h:287
static void saveData(std::ostream &os, UT_Matrix3D v)
GLboolean r
Definition: glcorearb.h:1221
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setAttribstocopy(const UT_StringHolder &val)
T & w(void)
Definition: UT_Vector4.h:381
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opDopointidx(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttribstocopy(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE bool isstring() const
void setParmValue(exint idx, const UT_Vector3D &value)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix4D v)
GLenum src
Definition: glcorearb.h:1792