HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeRasterizeParticles.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 <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_VolumeRasterizeParticlesEnums
24 {
25  enum class Rule
26  {
27  WAVG = 0,
28  THRESHOLD,
31  };
32 }
33 
34 
36 {
37 public:
38  static int version() { return 1; }
39  struct Attribrules
40  {
43 
44 
46  {
47  attribute = ""_sh;
48  rule = 0;
49 
50  }
51 
52  bool operator==(const Attribrules &src) const
53  {
54  if (attribute != src.attribute) return false;
55  if (rule != src.rule) return false;
56 
57  return true;
58  }
59  bool operator!=(const Attribrules &src) const
60  {
61  return !operator==(src);
62  }
63 
64  };
65 
67  {
69 
70  buf.strcat("[ ");
71  for (int i = 0; i < list.entries(); i++)
72  {
73  if (i)
74  buf.strcat(", ");
75  buf.strcat("( ");
76  buf.append("");
77  { UT_String tmp; tmp = UT_StringWrap(list(i).attribute).makeQuotedString('"'); buf.strcat(tmp); }
78  buf.append(", ");
79  buf.appendSprintf("%d", (int) list(i).rule);
80 
81  buf.strcat(" )");
82  }
83  buf.strcat(" ]");
84 
86  return result;
87  }
88 
90  {
91  myGroup = ""_sh;
92  myPoints = ""_sh;
93  myFilter = "gauss"_sh;
94  myDensityattrib = "density"_sh;
95  myDensityscale = 1;
96  myParticlescale = 1;
97  myMinfilter = 0.75;
98  myVelocityblur = false;
99  myShutter = 0.5;
100  myShutteroffset = 1;
101  myBlursamples = 4;
102  myNormalize = false;
103 
104  }
105 
107 
109 
111  {
112  if (myGroup != src.myGroup) return false;
113  if (myPoints != src.myPoints) return false;
114  if (myFilter != src.myFilter) return false;
115  if (myDensityattrib != src.myDensityattrib) return false;
116  if (myDensityscale != src.myDensityscale) return false;
117  if (myParticlescale != src.myParticlescale) return false;
118  if (myMinfilter != src.myMinfilter) return false;
119  if (myVelocityblur != src.myVelocityblur) return false;
120  if (myShutter != src.myShutter) return false;
121  if (myShutteroffset != src.myShutteroffset) return false;
122  if (myBlursamples != src.myBlursamples) return false;
123  if (myNormalize != src.myNormalize) return false;
124  if (myAttribrules != src.myAttribrules) return false;
125 
126  return true;
127  }
129  {
130  return !operator==(src);
131  }
133 
134 
135 
136  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
137  {
138  myGroup = ""_sh;
139  if (true)
140  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
141  myPoints = ""_sh;
142  if (true)
143  graph->evalOpParm(myPoints, nodeidx, "points", time, 0);
144  myFilter = "gauss"_sh;
145  if (true)
146  graph->evalOpParm(myFilter, nodeidx, "filter", time, 0);
147  myDensityattrib = "density"_sh;
148  if (true)
149  graph->evalOpParm(myDensityattrib, nodeidx, "densityattrib", time, 0);
150  myDensityscale = 1;
151  if (true)
152  graph->evalOpParm(myDensityscale, nodeidx, "densityscale", time, 0);
153  myParticlescale = 1;
154  if (true)
155  graph->evalOpParm(myParticlescale, nodeidx, "particlescale", time, 0);
156  myMinfilter = 0.75;
157  if (true)
158  graph->evalOpParm(myMinfilter, nodeidx, "minfilter", time, 0);
159  myVelocityblur = false;
160  if (true)
161  graph->evalOpParm(myVelocityblur, nodeidx, "velocityblur", time, 0);
162  myShutter = 0.5;
163  if (true && ( (!(((getVelocityblur()==0)))) ) )
164  graph->evalOpParm(myShutter, nodeidx, "shutter", time, 0);
165  myShutteroffset = 1;
166  if (true && ( (!(((getVelocityblur()==0)))) ) )
167  graph->evalOpParm(myShutteroffset, nodeidx, "shutteroffset", time, 0);
168  myBlursamples = 4;
169  if (true && ( (!(((getVelocityblur()==0)))) ) )
170  graph->evalOpParm(myBlursamples, nodeidx, "blursamples", time, 0);
171  myNormalize = false;
172  if (true)
173  graph->evalOpParm(myNormalize, nodeidx, "normalize", time, 0);
174  if (true)
175  {
176  int64 length = 0;
177  graph->evalOpParm(length, nodeidx, "attribrules", time, 0);
178  myAttribrules.entries(length);
179  for (exint i = 0; i < length; i++)
180  {
181  int parmidx = i+1;
182  auto && _curentry = myAttribrules(i);
183  (void) _curentry;
184  myAttribrules(i).attribute = ""_sh;
185  if (true)
186  graph->evalOpParmInst(myAttribrules(i).attribute, nodeidx, "attribute#", &parmidx, time, 0);
187  myAttribrules(i).rule = 0;
188  if (true)
189  graph->evalOpParmInst(myAttribrules(i).rule, nodeidx, "rule#", &parmidx, time, 0);
190 
191  }
192  }
193  else
194  myAttribrules.clear();
195 
196  }
197 
198 
199  void loadFromOpSubclass(const LoadParms &loadparms) override
200  {
201  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
202  }
203 
204 
205  void copyFrom(const SOP_NodeParms *src) override
206  {
207  *this = *((const SOP_VolumeRasterizeParticlesParms *)src);
208  }
209 
210  template <typename T>
211  void
212  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
213  {
214  if (idx.size() < 1)
215  return;
216  UT_ASSERT(idx.size() == instance.size()+1);
217  if (idx.size() != instance.size()+1)
218  return;
219  switch (idx[0])
220  {
221  case 0:
222  coerceValue(value, myGroup);
223  break;
224  case 1:
225  coerceValue(value, myPoints);
226  break;
227  case 2:
228  coerceValue(value, myFilter);
229  break;
230  case 3:
231  coerceValue(value, myDensityattrib);
232  break;
233  case 4:
234  coerceValue(value, myDensityscale);
235  break;
236  case 5:
237  coerceValue(value, myParticlescale);
238  break;
239  case 6:
240  coerceValue(value, myMinfilter);
241  break;
242  case 7:
243  coerceValue(value, myVelocityblur);
244  break;
245  case 8:
246  coerceValue(value, myShutter);
247  break;
248  case 9:
249  coerceValue(value, myShutteroffset);
250  break;
251  case 10:
252  coerceValue(value, myBlursamples);
253  break;
254  case 11:
255  coerceValue(value, myNormalize);
256  break;
257  case 12:
258  if (idx.size() == 1)
259  coerceValue(value, myAttribrules.entries());
260  else if (instance[0] < myAttribrules.entries())
261  {
262  auto && _data = myAttribrules(instance[0]);
263  switch (idx[1])
264  {
265  case 0:
266  coerceValue(value, _data.attribute);
267  break;
268  case 1:
269  coerceValue(value, _data.rule);
270  break;
271 
272  }
273  }
274  break;
275 
276  }
277  }
278 
279  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
280  { doGetParmValue(idx, instance, value); }
281  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
282  { doGetParmValue(idx, instance, value); }
283  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
300  { doGetParmValue(idx, instance, value); }
301 
302  template <typename T>
303  void
304  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
305  {
306  if (idx.size() < 1)
307  return;
308  UT_ASSERT(idx.size() == instance.size()+1);
309  if (idx.size() != instance.size()+1)
310  return;
311  switch (idx[0])
312  {
313  case 0:
314  coerceValue(myGroup, value);
315  break;
316  case 1:
317  coerceValue(myPoints, value);
318  break;
319  case 2:
320  coerceValue(myFilter, value);
321  break;
322  case 3:
323  coerceValue(myDensityattrib, value);
324  break;
325  case 4:
326  coerceValue(myDensityscale, value);
327  break;
328  case 5:
329  coerceValue(myParticlescale, value);
330  break;
331  case 6:
332  coerceValue(myMinfilter, value);
333  break;
334  case 7:
335  coerceValue(myVelocityblur, value);
336  break;
337  case 8:
338  coerceValue(myShutter, value);
339  break;
340  case 9:
341  coerceValue(myShutteroffset, value);
342  break;
343  case 10:
344  coerceValue(myBlursamples, value);
345  break;
346  case 11:
347  coerceValue(myNormalize, value);
348  break;
349  case 12:
350  if (idx.size() == 1)
351  {
352  exint newsize;
353  coerceValue(newsize, value);
354  myAttribrules.setSize(newsize);
355  }
356  else
357  {
358  myAttribrules.setSizeIfNeeded(instance[0]+1);
359  auto && _data = myAttribrules(instance[0]);
360  switch (idx[1])
361  {
362  case 0:
363  coerceValue(_data.attribute, value);
364  break;
365  case 1:
366  coerceValue(_data.rule, value);
367  break;
368 
369  }
370  }
371  break;
372 
373  }
374  }
375 
376  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
377  { doSetParmValue(idx, instance, value); }
378  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
379  { doSetParmValue(idx, instance, value); }
380  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
383  { doSetParmValue(idx, instance, value); }
384  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
385  { doSetParmValue(idx, instance, value); }
386  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
387  { doSetParmValue(idx, instance, value); }
388  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
389  { doSetParmValue(idx, instance, value); }
390  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
391  { doSetParmValue(idx, instance, value); }
392  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
393  { doSetParmValue(idx, instance, value); }
394  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
395  { doSetParmValue(idx, instance, value); }
396  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
397  { doSetParmValue(idx, instance, value); }
398 
399  exint getNestNumParms(TempIndex idx) const override
400  {
401  if (idx.size() == 0)
402  return 13;
403  switch (idx[0])
404  {
405  case 12:
406  return 2;
407 
408  }
409  // Invalid
410  return 0;
411  }
412 
413  const char *getNestParmName(TempIndex fieldnum) const override
414  {
415  if (fieldnum.size() < 1)
416  return 0;
417  switch (fieldnum[0])
418  {
419  case 0:
420  return "group";
421  case 1:
422  return "points";
423  case 2:
424  return "filter";
425  case 3:
426  return "densityattrib";
427  case 4:
428  return "densityscale";
429  case 5:
430  return "particlescale";
431  case 6:
432  return "minfilter";
433  case 7:
434  return "velocityblur";
435  case 8:
436  return "shutter";
437  case 9:
438  return "shutteroffset";
439  case 10:
440  return "blursamples";
441  case 11:
442  return "normalize";
443  case 12:
444  if (fieldnum.size() == 1)
445  return "attribrules";
446  switch (fieldnum[1])
447  {
448  case 0:
449  return "attribute#";
450  case 1:
451  return "rule#";
452 
453  }
454  return 0;
455 
456  }
457  return 0;
458  }
459 
460  ParmType getNestParmType(TempIndex fieldnum) const override
461  {
462  if (fieldnum.size() < 1)
463  return PARM_UNSUPPORTED;
464  switch (fieldnum[0])
465  {
466  case 0:
467  return PARM_STRING;
468  case 1:
469  return PARM_STRING;
470  case 2:
471  return PARM_STRING;
472  case 3:
473  return PARM_STRING;
474  case 4:
475  return PARM_FLOAT;
476  case 5:
477  return PARM_FLOAT;
478  case 6:
479  return PARM_FLOAT;
480  case 7:
481  return PARM_INTEGER;
482  case 8:
483  return PARM_FLOAT;
484  case 9:
485  return PARM_FLOAT;
486  case 10:
487  return PARM_INTEGER;
488  case 11:
489  return PARM_INTEGER;
490  case 12:
491  if (fieldnum.size() == 1)
492  return PARM_MULTIPARM;
493  switch (fieldnum[1])
494  {
495  case 0:
496  return PARM_STRING;
497  case 1:
498  return PARM_INTEGER;
499 
500  }
501  return PARM_UNSUPPORTED;
502 
503  }
504  return PARM_UNSUPPORTED;
505  }
506 
507  // Boiler plate to load individual types.
508  static void loadData(UT_IStream &is, int64 &v)
509  { is.bread(&v, 1); }
510  static void loadData(UT_IStream &is, bool &v)
511  { int64 iv; is.bread(&iv, 1); v = iv; }
512  static void loadData(UT_IStream &is, fpreal64 &v)
513  { is.bread<fpreal64>(&v, 1); }
514  static void loadData(UT_IStream &is, UT_Vector2D &v)
515  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
516  static void loadData(UT_IStream &is, UT_Vector3D &v)
517  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
518  is.bread<fpreal64>(&v.z(), 1); }
519  static void loadData(UT_IStream &is, UT_Vector4D &v)
520  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
521  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
522  static void loadData(UT_IStream &is, UT_Matrix2D &v)
523  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
524  static void loadData(UT_IStream &is, UT_Matrix3D &v)
525  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
526  static void loadData(UT_IStream &is, UT_Matrix4D &v)
527  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
528  static void loadData(UT_IStream &is, UT_Vector2I &v)
529  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
530  static void loadData(UT_IStream &is, UT_Vector3I &v)
531  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
532  is.bread<int64>(&v.z(), 1); }
533  static void loadData(UT_IStream &is, UT_Vector4I &v)
534  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
535  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
537  { is.bread(v); }
539  { UT_StringHolder rampdata;
540  loadData(is, rampdata);
541  if (rampdata.isstring())
542  {
543  v.reset(new UT_Ramp());
544  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
545  v->load(istr);
546  }
547  else v.reset();
548  }
551  loadData(is, data);
552  if (data.isstring())
553  {
554  // Find the data type.
555  const char *colon = UT_StringWrap(data).findChar(':');
556  if (colon)
557  {
558  int typelen = colon - data.buffer();
560  type.strncpy(data.buffer(), typelen);
561  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
562 
563  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
564  }
565  }
566  else v.reset();
567  }
568 
569  static void saveData(std::ostream &os, int64 v)
570  { UTwrite(os, &v); }
571  static void saveData(std::ostream &os, bool v)
572  { int64 iv = v; UTwrite(os, &iv); }
573  static void saveData(std::ostream &os, fpreal64 v)
574  { UTwrite<fpreal64>(os, &v); }
575  static void saveData(std::ostream &os, UT_Vector2D v)
576  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
577  static void saveData(std::ostream &os, UT_Vector3D v)
578  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
579  UTwrite<fpreal64>(os, &v.z()); }
580  static void saveData(std::ostream &os, UT_Vector4D v)
581  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
582  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
583  static void saveData(std::ostream &os, UT_Matrix2D v)
585  static void saveData(std::ostream &os, UT_Matrix3D v)
587  static void saveData(std::ostream &os, UT_Matrix4D v)
589  static void saveData(std::ostream &os, UT_StringHolder s)
590  { UT_StringWrap(s).saveBinary(os); }
591  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
593  UT_OStringStream ostr;
594  if (s) s->save(ostr);
595  result = ostr.str();
596  saveData(os, result);
597  }
598  static void saveData(std::ostream &os, PRM_DataItemHandle s)
600  UT_OStringStream ostr;
601  if (s)
602  {
603  ostr << s->getDataTypeToken();
604  ostr << ":";
605  s->saveBinary(ostr);
606  }
607  result = ostr.str();
608  saveData(os, result);
609  }
610 
611 
612  void save(std::ostream &os) const
613  {
614  int32 v = version();
615  UTwrite(os, &v);
616  saveData(os, myGroup);
617  saveData(os, myPoints);
618  saveData(os, myFilter);
619  saveData(os, myDensityattrib);
620  saveData(os, myDensityscale);
621  saveData(os, myParticlescale);
622  saveData(os, myMinfilter);
623  saveData(os, myVelocityblur);
624  saveData(os, myShutter);
625  saveData(os, myShutteroffset);
626  saveData(os, myBlursamples);
627  saveData(os, myNormalize);
628  {
629  int64 length = myAttribrules.entries();
630  UTwrite(os, &length);
631  for (exint i = 0; i < length; i++)
632  {
633  saveData(os, myAttribrules(i).attribute);
634  saveData(os, myAttribrules(i).rule);
635 
636  }
637  }
638 
639  }
640 
641  bool load(UT_IStream &is)
642  {
643  int32 v;
644  is.bread(&v, 1);
645  if (version() != v)
646  {
647  // Fail incompatible versions
648  return false;
649  }
650  loadData(is, myGroup);
651  loadData(is, myPoints);
652  loadData(is, myFilter);
653  loadData(is, myDensityattrib);
654  loadData(is, myDensityscale);
655  loadData(is, myParticlescale);
656  loadData(is, myMinfilter);
657  loadData(is, myVelocityblur);
658  loadData(is, myShutter);
659  loadData(is, myShutteroffset);
660  loadData(is, myBlursamples);
661  loadData(is, myNormalize);
662  {
663  int64 length;
664  is.read(&length, 1);
665  myAttribrules.entries(length);
666  for (exint i = 0; i < length; i++)
667  {
668  loadData(is, myAttribrules(i).attribute);
669  loadData(is, myAttribrules(i).rule);
670 
671  }
672  }
673 
674  return true;
675  }
676 
677  const UT_StringHolder & getGroup() const { return myGroup; }
678  void setGroup(const UT_StringHolder & val) { myGroup = val; }
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getGroup();
684  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
685  return result;
686  }
687  const UT_StringHolder & getPoints() const { return myPoints; }
688  void setPoints(const UT_StringHolder & val) { myPoints = val; }
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getPoints();
694  OP_Utils::evalOpParm(result, thissop, "points", cookparms.getCookTime(), 0);
695  return result;
696  }
697  const UT_StringHolder & getFilter() const { return myFilter; }
698  void setFilter(const UT_StringHolder & val) { myFilter = val; }
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getFilter();
704  OP_Utils::evalOpParm(result, thissop, "filter", cookparms.getCookTime(), 0);
705  return result;
706  }
707  const UT_StringHolder & getDensityattrib() const { return myDensityattrib; }
708  void setDensityattrib(const UT_StringHolder & val) { myDensityattrib = val; }
710  {
711  SOP_Node *thissop = cookparms.getNode();
712  if (!thissop) return getDensityattrib();
714  OP_Utils::evalOpParm(result, thissop, "densityattrib", cookparms.getCookTime(), 0);
715  return result;
716  }
717  fpreal64 getDensityscale() const { return myDensityscale; }
718  void setDensityscale(fpreal64 val) { myDensityscale = val; }
720  {
721  SOP_Node *thissop = cookparms.getNode();
722  if (!thissop) return getDensityscale();
724  OP_Utils::evalOpParm(result, thissop, "densityscale", cookparms.getCookTime(), 0);
725  return result;
726  }
727  fpreal64 getParticlescale() const { return myParticlescale; }
728  void setParticlescale(fpreal64 val) { myParticlescale = val; }
730  {
731  SOP_Node *thissop = cookparms.getNode();
732  if (!thissop) return getParticlescale();
734  OP_Utils::evalOpParm(result, thissop, "particlescale", cookparms.getCookTime(), 0);
735  return result;
736  }
737  fpreal64 getMinfilter() const { return myMinfilter; }
738  void setMinfilter(fpreal64 val) { myMinfilter = val; }
740  {
741  SOP_Node *thissop = cookparms.getNode();
742  if (!thissop) return getMinfilter();
744  OP_Utils::evalOpParm(result, thissop, "minfilter", cookparms.getCookTime(), 0);
745  return result;
746  }
747  bool getVelocityblur() const { return myVelocityblur; }
748  void setVelocityblur(bool val) { myVelocityblur = val; }
749  bool opVelocityblur(const SOP_NodeVerb::CookParms &cookparms) const
750  {
751  SOP_Node *thissop = cookparms.getNode();
752  if (!thissop) return getVelocityblur();
753  bool result;
754  OP_Utils::evalOpParm(result, thissop, "velocityblur", cookparms.getCookTime(), 0);
755  return result;
756  }
757  fpreal64 getShutter() const { return myShutter; }
758  void setShutter(fpreal64 val) { myShutter = val; }
760  {
761  SOP_Node *thissop = cookparms.getNode();
762  if (!thissop) return getShutter();
764  OP_Utils::evalOpParm(result, thissop, "shutter", cookparms.getCookTime(), 0);
765  return result;
766  }
767  fpreal64 getShutteroffset() const { return myShutteroffset; }
768  void setShutteroffset(fpreal64 val) { myShutteroffset = val; }
770  {
771  SOP_Node *thissop = cookparms.getNode();
772  if (!thissop) return getShutteroffset();
774  OP_Utils::evalOpParm(result, thissop, "shutteroffset", cookparms.getCookTime(), 0);
775  return result;
776  }
777  int64 getBlursamples() const { return myBlursamples; }
778  void setBlursamples(int64 val) { myBlursamples = val; }
780  {
781  SOP_Node *thissop = cookparms.getNode();
782  if (!thissop) return getBlursamples();
783  int64 result;
784  OP_Utils::evalOpParm(result, thissop, "blursamples", cookparms.getCookTime(), 0);
785  return result;
786  }
787  bool getNormalize() const { return myNormalize; }
788  void setNormalize(bool val) { myNormalize = val; }
789  bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
790  {
791  SOP_Node *thissop = cookparms.getNode();
792  if (!thissop) return getNormalize();
793  bool result;
794  OP_Utils::evalOpParm(result, thissop, "normalize", cookparms.getCookTime(), 0);
795  return result;
796  }
797  const UT_Array<Attribrules> &getAttribrules() const { return myAttribrules; }
798  void setAttribrules(const UT_Array<Attribrules> &val) { myAttribrules = val; }
800  {
801  SOP_Node *thissop = cookparms.getNode();
802  if (!thissop) return getAttribrules().entries();
803  exint result;
804  OP_Utils::evalOpParm(result, thissop, "attribrules", cookparms.getCookTime(), 0);
805  return result;
806  }
808  {
809  SOP_Node *thissop = cookparms.getNode();
810  if (!thissop) return (myAttribrules(_idx).attribute);
811  int _parmidx = _idx + 1;
813  OP_Utils::evalOpParmInst(result, thissop, "attribute#", &_parmidx, cookparms.getCookTime(), 0);
814  return (result);
815  }
817  {
818  SOP_Node *thissop = cookparms.getNode();
819  if (!thissop) return (myAttribrules(_idx).rule);
820  int _parmidx = _idx + 1;
821  int64 result;
822  OP_Utils::evalOpParmInst(result, thissop, "rule#", &_parmidx, cookparms.getCookTime(), 0);
823  return (result);
824  }
825 
826 
827 private:
828  UT_StringHolder myGroup;
829  UT_StringHolder myPoints;
830  UT_StringHolder myFilter;
831  UT_StringHolder myDensityattrib;
832  fpreal64 myDensityscale;
833  fpreal64 myParticlescale;
834  fpreal64 myMinfilter;
835  bool myVelocityblur;
836  fpreal64 myShutter;
837  fpreal64 myShutteroffset;
838  int64 myBlursamples;
839  bool myNormalize;
840  UT_Array<Attribrules> myAttribrules;
841 
842 };
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
GLdouble s
Definition: glew.h:1390
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
int64 opAttribrules_rule(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opDensityattrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
const UT_Array< Attribrules > & getAttribrules() const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
static void loadData(UT_IStream &is, bool &v)
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Vector4D v)
exint bread(int32 *buffer, exint asize=1)
const UT_StringHolder & getDensityattrib() const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
static void loadData(UT_IStream &is, UT_Vector4I &v)
void copyFrom(const SOP_NodeParms *src) override
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Matrix4D v)
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const GLdouble * v
Definition: glew.h:1391
fpreal64 opDensityscale(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setDensityattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
double fpreal64
Definition: SYS_Types.h:201
exint getNestNumParms(TempIndex idx) const override
fpreal64 opShutteroffset(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void loadFromOpSubclass(const LoadParms &loadparms) override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
bool operator==(const SOP_VolumeRasterizeParticlesParms &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
int64 opBlursamples(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
ParmType getNestParmType(TempIndex fieldnum) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void
Definition: png.h:1083
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, fpreal64 &v)
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opShutter(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 opMinfilter(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opAttribrules_attribute(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator!=(const SOP_VolumeRasterizeParticlesParms &src) const
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
fpreal64 opParticlescale(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static void saveData(std::ostream &os, UT_Vector2D v)
bool opVelocityblur(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 fpreal
Definition: SYS_Types.h:277
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
UT_StringHolder createString(const UT_Array< Attribrules > &list) const
#define SOP_API
Definition: SOP_API.h:10
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
UT_StringHolder opFilter(const SOP_NodeVerb::CookParms &cookparms) const
GLuint64EXT * result
Definition: glew.h:14007
void setAttribrules(const UT_Array< Attribrules > &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1368
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
UT_StringHolder opPoints(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
exint opAttribrules(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glew.h:1849
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override