HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeRasterizeLattice.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_VolumeRasterizeLatticeEnums
24 {
25  enum class Deactivate
26  {
27  ALL = 0,
28  LATTICE
29  };
30  enum class Mode
31  {
32  ATTRIBUTE = 0,
33  VOLUME
34  };
35 }
36 
37 
39 {
40 public:
41  static int version() { return 1; }
42 
44  {
45  myGroup = ""_UTsh;
46  myEnable_preprocess = true;
47  myDeactivate = 0;
48  myMode = 0;
49  myAttrib = "*"_UTsh;
50  mySourcevols = ""_UTsh;
51  myDosmoothing = false;
52  myScalecompressed = true;
53  myDomaxdensityscale = true;
54  myMaxdensityscale = 10;
55  myPrune = true;
56  myPrunetolerance = 0;
57 
58  }
59 
63  SOP_VolumeRasterizeLatticeParms &operator=(SOP_VolumeRasterizeLatticeParms &&) noexcept = default;
64 
66 
68  {
69  if (myGroup != src.myGroup) return false;
70  if (myEnable_preprocess != src.myEnable_preprocess) return false;
71  if (myDeactivate != src.myDeactivate) return false;
72  if (myMode != src.myMode) return false;
73  if (myAttrib != src.myAttrib) return false;
74  if (mySourcevols != src.mySourcevols) return false;
75  if (myDosmoothing != src.myDosmoothing) return false;
76  if (myScalecompressed != src.myScalecompressed) return false;
77  if (myDomaxdensityscale != src.myDomaxdensityscale) return false;
78  if (myMaxdensityscale != src.myMaxdensityscale) return false;
79  if (myPrune != src.myPrune) return false;
80  if (myPrunetolerance != src.myPrunetolerance) return false;
81 
82  return true;
83  }
85  {
86  return !operator==(src);
87  }
90 
91 
92 
93  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
94  {
95  myGroup = ""_UTsh;
96  if (true)
97  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
98  myEnable_preprocess = true;
99  if (true)
100  graph->evalOpParm(myEnable_preprocess, nodeidx, "enable_preprocess", time, 0);
101  myDeactivate = 0;
102  if (true && ( (true&&!(((getEnable_preprocess()!=1)))) ) )
103  graph->evalOpParm(myDeactivate, nodeidx, "deactivate", time, 0);
104  myMode = 0;
105  if (true)
106  graph->evalOpParm(myMode, nodeidx, "mode", time, 0);
107  myAttrib = "*"_UTsh;
108  if (true && ( (true&&!(((int64(getMode())!=0)))) ) )
109  graph->evalOpParm(myAttrib, nodeidx, "attrib", time, 0);
110  mySourcevols = ""_UTsh;
111  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
112  graph->evalOpParm(mySourcevols, nodeidx, "sourcevols", time, 0);
113  myDosmoothing = false;
114  if (true)
115  graph->evalOpParm(myDosmoothing, nodeidx, "dosmoothing", time, 0);
116  myScalecompressed = true;
117  if (true)
118  graph->evalOpParm(myScalecompressed, nodeidx, "scalecompressed", time, 0);
119  myDomaxdensityscale = true;
120  if (true && ( (true&&!(((getScalecompressed()!=1)))) ) )
121  graph->evalOpParm(myDomaxdensityscale, nodeidx, "domaxdensityscale", time, 0);
122  myMaxdensityscale = 10;
123  if (true && ( (true&&!(((getScalecompressed()!=1))||((getDomaxdensityscale()!=1)))) ) )
124  graph->evalOpParm(myMaxdensityscale, nodeidx, "maxdensityscale", time, 0);
125  myPrune = true;
126  if (true)
127  graph->evalOpParm(myPrune, nodeidx, "prune", time, 0);
128  myPrunetolerance = 0;
129  if (true && ( (true&&!(((getPrune()!=1)))) ) )
130  graph->evalOpParm(myPrunetolerance, nodeidx, "prunetolerance", time, 0);
131 
132  }
133 
134 
135  void loadFromOpSubclass(const LoadParms &loadparms) override
136  {
137  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
138  }
139 
140 
141  void copyFrom(const OP_NodeParms *src) override
142  {
143  *this = *((const SOP_VolumeRasterizeLatticeParms *)src);
144  }
145 
146  template <typename T>
147  void
148  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
149  {
150  if (idx.size() < 1)
151  return;
152  UT_ASSERT(idx.size() == instance.size()+1);
153  if (idx.size() != instance.size()+1)
154  return;
155  switch (idx[0])
156  {
157  case 0:
158  coerceValue(value, myGroup);
159  break;
160  case 1:
161  coerceValue(value, myEnable_preprocess);
162  break;
163  case 2:
164  coerceValue(value, myDeactivate);
165  break;
166  case 3:
167  coerceValue(value, myMode);
168  break;
169  case 4:
170  coerceValue(value, myAttrib);
171  break;
172  case 5:
173  coerceValue(value, mySourcevols);
174  break;
175  case 6:
176  coerceValue(value, myDosmoothing);
177  break;
178  case 7:
179  coerceValue(value, myScalecompressed);
180  break;
181  case 8:
182  coerceValue(value, myDomaxdensityscale);
183  break;
184  case 9:
185  coerceValue(value, myMaxdensityscale);
186  break;
187  case 10:
188  coerceValue(value, myPrune);
189  break;
190  case 11:
191  coerceValue(value, myPrunetolerance);
192  break;
193 
194  }
195  }
196 
197  bool isParmColorRamp(exint idx) const override
198  {
199  switch (idx)
200  {
201 
202  }
203  return false;
204  }
205 
206  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
207  { doGetParmValue(idx, instance, value); }
208  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
227  { doGetParmValue(idx, instance, value); }
228 
229  template <typename T>
230  void
231  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
232  {
233  if (idx.size() < 1)
234  return;
235  UT_ASSERT(idx.size() == instance.size()+1);
236  if (idx.size() != instance.size()+1)
237  return;
238  switch (idx[0])
239  {
240  case 0:
241  coerceValue(myGroup, ( ( value ) ));
242  break;
243  case 1:
244  coerceValue(myEnable_preprocess, ( ( value ) ));
245  break;
246  case 2:
247  coerceValue(myDeactivate, clampMinValue(0, clampMaxValue(1, value ) ));
248  break;
249  case 3:
250  coerceValue(myMode, clampMinValue(0, clampMaxValue(1, value ) ));
251  break;
252  case 4:
253  coerceValue(myAttrib, ( ( value ) ));
254  break;
255  case 5:
256  coerceValue(mySourcevols, ( ( value ) ));
257  break;
258  case 6:
259  coerceValue(myDosmoothing, ( ( value ) ));
260  break;
261  case 7:
262  coerceValue(myScalecompressed, ( ( value ) ));
263  break;
264  case 8:
265  coerceValue(myDomaxdensityscale, ( ( value ) ));
266  break;
267  case 9:
268  coerceValue(myMaxdensityscale, ( ( value ) ));
269  break;
270  case 10:
271  coerceValue(myPrune, ( ( value ) ));
272  break;
273  case 11:
274  coerceValue(myPrunetolerance, ( ( value ) ));
275  break;
276 
277  }
278  }
279 
280  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
281  { doSetParmValue(idx, instance, value); }
282  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
283  { doSetParmValue(idx, instance, value); }
284  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
285  { doSetParmValue(idx, instance, value); }
286  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
287  { doSetParmValue(idx, instance, value); }
288  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
289  { doSetParmValue(idx, instance, value); }
290  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
295  { doSetParmValue(idx, instance, value); }
296  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
299  { doSetParmValue(idx, instance, value); }
300  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
301  { doSetParmValue(idx, instance, value); }
302 
303  exint getNestNumParms(TempIndex idx) const override
304  {
305  if (idx.size() == 0)
306  return 12;
307  switch (idx[0])
308  {
309 
310  }
311  // Invalid
312  return 0;
313  }
314 
315  const char *getNestParmName(TempIndex fieldnum) const override
316  {
317  if (fieldnum.size() < 1)
318  return 0;
319  switch (fieldnum[0])
320  {
321  case 0:
322  return "group";
323  case 1:
324  return "enable_preprocess";
325  case 2:
326  return "deactivate";
327  case 3:
328  return "mode";
329  case 4:
330  return "attrib";
331  case 5:
332  return "sourcevols";
333  case 6:
334  return "dosmoothing";
335  case 7:
336  return "scalecompressed";
337  case 8:
338  return "domaxdensityscale";
339  case 9:
340  return "maxdensityscale";
341  case 10:
342  return "prune";
343  case 11:
344  return "prunetolerance";
345 
346  }
347  return 0;
348  }
349 
350  ParmType getNestParmType(TempIndex fieldnum) const override
351  {
352  if (fieldnum.size() < 1)
353  return PARM_UNSUPPORTED;
354  switch (fieldnum[0])
355  {
356  case 0:
357  return PARM_STRING;
358  case 1:
359  return PARM_INTEGER;
360  case 2:
361  return PARM_INTEGER;
362  case 3:
363  return PARM_INTEGER;
364  case 4:
365  return PARM_STRING;
366  case 5:
367  return PARM_STRING;
368  case 6:
369  return PARM_INTEGER;
370  case 7:
371  return PARM_INTEGER;
372  case 8:
373  return PARM_INTEGER;
374  case 9:
375  return PARM_FLOAT;
376  case 10:
377  return PARM_INTEGER;
378  case 11:
379  return PARM_FLOAT;
380 
381  }
382  return PARM_UNSUPPORTED;
383  }
384 
385  // Boiler plate to load individual types.
386  static void loadData(UT_IStream &is, int64 &v)
387  { is.bread(&v, 1); }
388  static void loadData(UT_IStream &is, bool &v)
389  { int64 iv; is.bread(&iv, 1); v = iv; }
390  static void loadData(UT_IStream &is, fpreal64 &v)
391  { is.bread<fpreal64>(&v, 1); }
392  static void loadData(UT_IStream &is, UT_Vector2D &v)
393  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
394  static void loadData(UT_IStream &is, UT_Vector3D &v)
395  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
396  is.bread<fpreal64>(&v.z(), 1); }
397  static void loadData(UT_IStream &is, UT_Vector4D &v)
398  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
399  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
400  static void loadData(UT_IStream &is, UT_Matrix2D &v)
401  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
402  static void loadData(UT_IStream &is, UT_Matrix3D &v)
403  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
404  static void loadData(UT_IStream &is, UT_Matrix4D &v)
405  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
406  static void loadData(UT_IStream &is, UT_Vector2I &v)
407  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
408  static void loadData(UT_IStream &is, UT_Vector3I &v)
409  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
410  is.bread<int64>(&v.z(), 1); }
411  static void loadData(UT_IStream &is, UT_Vector4I &v)
412  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
413  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
415  { is.bread(v); }
417  { UT_StringHolder rampdata;
418  loadData(is, rampdata);
419  if (rampdata.isstring())
420  {
421  v.reset(new UT_Ramp());
422  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
423  v->load(istr);
424  }
425  else v.reset();
426  }
429  loadData(is, data);
430  if (data.isstring())
431  {
432  // Find the data type.
433  const char *colon = UT_StringWrap(data).findChar(':');
434  if (colon)
435  {
436  int typelen = colon - data.buffer();
438  type.strncpy(data.buffer(), typelen);
439  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
440 
441  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
442  }
443  }
444  else v.reset();
445  }
446 
447  static void saveData(std::ostream &os, int64 v)
448  { UTwrite(os, &v); }
449  static void saveData(std::ostream &os, bool v)
450  { int64 iv = v; UTwrite(os, &iv); }
451  static void saveData(std::ostream &os, fpreal64 v)
452  { UTwrite<fpreal64>(os, &v); }
453  static void saveData(std::ostream &os, UT_Vector2D v)
454  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
455  static void saveData(std::ostream &os, UT_Vector3D v)
456  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
457  UTwrite<fpreal64>(os, &v.z()); }
458  static void saveData(std::ostream &os, UT_Vector4D v)
459  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
460  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
461  static void saveData(std::ostream &os, UT_Matrix2D v)
463  static void saveData(std::ostream &os, UT_Matrix3D v)
465  static void saveData(std::ostream &os, UT_Matrix4D v)
467  static void saveData(std::ostream &os, UT_StringHolder s)
468  { UT_StringWrap(s).saveBinary(os); }
469  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
471  UT_OStringStream ostr;
472  if (s) s->save(ostr);
473  result = ostr.str();
474  saveData(os, result);
475  }
476  static void saveData(std::ostream &os, PRM_DataItemHandle s)
478  UT_OStringStream ostr;
479  if (s)
480  {
481  ostr << s->getDataTypeToken();
482  ostr << ":";
483  s->saveBinary(ostr);
484  }
485  result = ostr.str();
486  saveData(os, result);
487  }
488 
489 
490  void save(std::ostream &os) const
491  {
492  int32 v = version();
493  UTwrite(os, &v);
494  saveData(os, myGroup);
495  saveData(os, myEnable_preprocess);
496  saveData(os, myDeactivate);
497  saveData(os, myMode);
498  saveData(os, myAttrib);
499  saveData(os, mySourcevols);
500  saveData(os, myDosmoothing);
501  saveData(os, myScalecompressed);
502  saveData(os, myDomaxdensityscale);
503  saveData(os, myMaxdensityscale);
504  saveData(os, myPrune);
505  saveData(os, myPrunetolerance);
506 
507  }
508 
509  bool load(UT_IStream &is)
510  {
511  int32 v;
512  is.bread(&v, 1);
513  if (version() != v)
514  {
515  // Fail incompatible versions
516  return false;
517  }
518  loadData(is, myGroup);
519  loadData(is, myEnable_preprocess);
520  loadData(is, myDeactivate);
521  loadData(is, myMode);
522  loadData(is, myAttrib);
523  loadData(is, mySourcevols);
524  loadData(is, myDosmoothing);
525  loadData(is, myScalecompressed);
526  loadData(is, myDomaxdensityscale);
527  loadData(is, myMaxdensityscale);
528  loadData(is, myPrune);
529  loadData(is, myPrunetolerance);
530 
531  return true;
532  }
533 
534  const UT_StringHolder & getGroup() const { return myGroup; }
535  void setGroup(const UT_StringHolder & val) { myGroup = val; }
537  {
538  SOP_Node *thissop = cookparms.getNode();
539  if (!thissop) return getGroup();
541  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
542  return result;
543  }
544  bool getEnable_preprocess() const { return myEnable_preprocess; }
545  void setEnable_preprocess(bool val) { myEnable_preprocess = val; }
546  bool opEnable_preprocess(const SOP_NodeVerb::CookParms &cookparms) const
547  {
548  SOP_Node *thissop = cookparms.getNode();
549  if (!thissop) return getEnable_preprocess();
550  bool result;
551  OP_Utils::evalOpParm(result, thissop, "enable_preprocess", cookparms.getCookTime(), 0);
552  return result;
553  }
554  Deactivate getDeactivate() const { return Deactivate(myDeactivate); }
555  void setDeactivate(Deactivate val) { myDeactivate = int64(val); }
557  {
558  SOP_Node *thissop = cookparms.getNode();
559  if (!thissop) return getDeactivate();
560  int64 result;
561  OP_Utils::evalOpParm(result, thissop, "deactivate", cookparms.getCookTime(), 0);
562  return Deactivate(result);
563  }
564  Mode getMode() const { return Mode(myMode); }
565  void setMode(Mode val) { myMode = int64(val); }
566  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
567  {
568  SOP_Node *thissop = cookparms.getNode();
569  if (!thissop) return getMode();
570  int64 result;
571  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
572  return Mode(result);
573  }
574  const UT_StringHolder & getAttrib() const { return myAttrib; }
575  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getAttrib();
581  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
582  return result;
583  }
584  const UT_StringHolder & getSourcevols() const { return mySourcevols; }
585  void setSourcevols(const UT_StringHolder & val) { mySourcevols = val; }
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getSourcevols();
591  OP_Utils::evalOpParm(result, thissop, "sourcevols", cookparms.getCookTime(), 0);
592  return result;
593  }
594  bool getDosmoothing() const { return myDosmoothing; }
595  void setDosmoothing(bool val) { myDosmoothing = val; }
596  bool opDosmoothing(const SOP_NodeVerb::CookParms &cookparms) const
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getDosmoothing();
600  bool result;
601  OP_Utils::evalOpParm(result, thissop, "dosmoothing", cookparms.getCookTime(), 0);
602  return result;
603  }
604  bool getScalecompressed() const { return myScalecompressed; }
605  void setScalecompressed(bool val) { myScalecompressed = val; }
606  bool opScalecompressed(const SOP_NodeVerb::CookParms &cookparms) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getScalecompressed();
610  bool result;
611  OP_Utils::evalOpParm(result, thissop, "scalecompressed", cookparms.getCookTime(), 0);
612  return result;
613  }
614  bool getDomaxdensityscale() const { return myDomaxdensityscale; }
615  void setDomaxdensityscale(bool val) { myDomaxdensityscale = val; }
616  bool opDomaxdensityscale(const SOP_NodeVerb::CookParms &cookparms) const
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getDomaxdensityscale();
620  bool result;
621  OP_Utils::evalOpParm(result, thissop, "domaxdensityscale", cookparms.getCookTime(), 0);
622  return result;
623  }
624  fpreal64 getMaxdensityscale() const { return myMaxdensityscale; }
625  void setMaxdensityscale(fpreal64 val) { myMaxdensityscale = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getMaxdensityscale();
631  OP_Utils::evalOpParm(result, thissop, "maxdensityscale", cookparms.getCookTime(), 0);
632  return result;
633  }
634  bool getPrune() const { return myPrune; }
635  void setPrune(bool val) { myPrune = val; }
636  bool opPrune(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getPrune();
640  bool result;
641  OP_Utils::evalOpParm(result, thissop, "prune", cookparms.getCookTime(), 0);
642  return result;
643  }
644  fpreal64 getPrunetolerance() const { return myPrunetolerance; }
645  void setPrunetolerance(fpreal64 val) { myPrunetolerance = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getPrunetolerance();
651  OP_Utils::evalOpParm(result, thissop, "prunetolerance", cookparms.getCookTime(), 0);
652  return result;
653  }
654 
655 private:
656  UT_StringHolder myGroup;
657  bool myEnable_preprocess;
658  int64 myDeactivate;
659  int64 myMode;
660  UT_StringHolder myAttrib;
661  UT_StringHolder mySourcevols;
662  bool myDosmoothing;
663  bool myScalecompressed;
664  bool myDomaxdensityscale;
665  fpreal64 myMaxdensityscale;
666  bool myPrune;
667  fpreal64 myPrunetolerance;
668 
669 };
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 opMaxdensityscale(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
bool opScalecompressed(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GLdouble s
Definition: glad.h:3009
const UT_StringHolder & getGroup() const
fpreal64 opPrunetolerance(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
**But if you need a result
Definition: thread.h:613
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
UT_StringHolder opSourcevols(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setAttrib(const UT_StringHolder &val)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool opDosmoothing(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator!=(const SOP_VolumeRasterizeLatticeParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
bool opPrune(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setSourcevols(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, fpreal64 v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint length() const
bool operator==(const SOP_VolumeRasterizeLatticeParms &src) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
const UT_StringHolder & getAttrib() const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opDomaxdensityscale(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
Deactivate opDeactivate(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
exint getNestNumParms(TempIndex idx) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setGroup(const UT_StringHolder &val)
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
bool opEnable_preprocess(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const UT_StringHolder & getSourcevols() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
type
Definition: core.h:1059
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663