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 
32  getToken(Deactivate enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Deactivate::ALL: return "all"_sh;
37  case Deactivate::LATTICE: return "lattice"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class Mode
43  {
44  ATTRIBUTE = 0,
45  VOLUME
46  };
47 
49  getToken(Mode enum_value)
50  {
51  using namespace UT::Literal;
52  switch (enum_value) {
53  case Mode::ATTRIBUTE: return "attribute"_sh;
54  case Mode::VOLUME: return "volume"_sh;
55  default: UT_ASSERT(false); return ""_sh;
56  }
57  }
58 
59 }
60 
61 
63 {
64 public:
65  static int version() { return 1; }
66 
68  {
69  myGroup = ""_UTsh;
70  myEnable_preprocess = true;
71  myDeactivate = 0;
72  myMode = 0;
73  myAttrib = "*"_UTsh;
74  mySourcevols = ""_UTsh;
75  myDosmoothing = false;
76  myScalecompressed = true;
77  myDomaxdensityscale = true;
78  myMaxdensityscale = 10;
79  myPrune = true;
80  myPrunetolerance = 0;
81 
82  }
83 
87  SOP_VolumeRasterizeLatticeParms &operator=(SOP_VolumeRasterizeLatticeParms &&) noexcept = default;
88 
90 
92  {
93  if (myGroup != src.myGroup) return false;
94  if (myEnable_preprocess != src.myEnable_preprocess) return false;
95  if (myDeactivate != src.myDeactivate) return false;
96  if (myMode != src.myMode) return false;
97  if (myAttrib != src.myAttrib) return false;
98  if (mySourcevols != src.mySourcevols) return false;
99  if (myDosmoothing != src.myDosmoothing) return false;
100  if (myScalecompressed != src.myScalecompressed) return false;
101  if (myDomaxdensityscale != src.myDomaxdensityscale) return false;
102  if (myMaxdensityscale != src.myMaxdensityscale) return false;
103  if (myPrune != src.myPrune) return false;
104  if (myPrunetolerance != src.myPrunetolerance) return false;
105 
106  return true;
107  }
109  {
110  return !operator==(src);
111  }
114 
115 
116 
117  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
118  {
119  myGroup = ""_UTsh;
120  if (true)
121  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
122  myEnable_preprocess = true;
123  if (true)
124  graph->evalOpParm(myEnable_preprocess, nodeidx, "enable_preprocess", time, 0);
125  myDeactivate = 0;
126  if (true && ( (true&&!(((getEnable_preprocess()!=1)))) ) )
127  graph->evalOpParm(myDeactivate, nodeidx, "deactivate", time, 0);
128  myMode = 0;
129  if (true)
130  graph->evalOpParm(myMode, nodeidx, "mode", time, 0);
131  myAttrib = "*"_UTsh;
132  if (true && ( (true&&!(((int64(getMode())!=0)))) ) )
133  graph->evalOpParm(myAttrib, nodeidx, "attrib", time, 0);
134  mySourcevols = ""_UTsh;
135  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
136  graph->evalOpParm(mySourcevols, nodeidx, "sourcevols", time, 0);
137  myDosmoothing = false;
138  if (true)
139  graph->evalOpParm(myDosmoothing, nodeidx, "dosmoothing", time, 0);
140  myScalecompressed = true;
141  if (true)
142  graph->evalOpParm(myScalecompressed, nodeidx, "scalecompressed", time, 0);
143  myDomaxdensityscale = true;
144  if (true && ( (true&&!(((getScalecompressed()!=1)))) ) )
145  graph->evalOpParm(myDomaxdensityscale, nodeidx, "domaxdensityscale", time, 0);
146  myMaxdensityscale = 10;
147  if (true && ( (true&&!(((getScalecompressed()!=1))||((getDomaxdensityscale()!=1)))) ) )
148  graph->evalOpParm(myMaxdensityscale, nodeidx, "maxdensityscale", time, 0);
149  myPrune = true;
150  if (true)
151  graph->evalOpParm(myPrune, nodeidx, "prune", time, 0);
152  myPrunetolerance = 0;
153  if (true && ( (true&&!(((getPrune()!=1)))) ) )
154  graph->evalOpParm(myPrunetolerance, nodeidx, "prunetolerance", time, 0);
155 
156  }
157 
158 
159  void loadFromOpSubclass(const LoadParms &loadparms) override
160  {
161  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
162  }
163 
164 
165  void copyFrom(const OP_NodeParms *src) override
166  {
167  *this = *((const SOP_VolumeRasterizeLatticeParms *)src);
168  }
169 
170  template <typename T>
171  void
172  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
173  {
174  if (idx.size() < 1)
175  return;
176  UT_ASSERT(idx.size() == instance.size()+1);
177  if (idx.size() != instance.size()+1)
178  return;
179  switch (idx[0])
180  {
181  case 0:
182  coerceValue(value, myGroup);
183  break;
184  case 1:
185  coerceValue(value, myEnable_preprocess);
186  break;
187  case 2:
188  coerceValue(value, myDeactivate);
189  break;
190  case 3:
191  coerceValue(value, myMode);
192  break;
193  case 4:
194  coerceValue(value, myAttrib);
195  break;
196  case 5:
197  coerceValue(value, mySourcevols);
198  break;
199  case 6:
200  coerceValue(value, myDosmoothing);
201  break;
202  case 7:
203  coerceValue(value, myScalecompressed);
204  break;
205  case 8:
206  coerceValue(value, myDomaxdensityscale);
207  break;
208  case 9:
209  coerceValue(value, myMaxdensityscale);
210  break;
211  case 10:
212  coerceValue(value, myPrune);
213  break;
214  case 11:
215  coerceValue(value, myPrunetolerance);
216  break;
217 
218  }
219  }
220 
221  bool isParmColorRamp(exint idx) const override
222  {
223  switch (idx)
224  {
225 
226  }
227  return false;
228  }
229 
230  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
251  { doGetParmValue(idx, instance, value); }
252 
253  template <typename T>
254  void
255  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
256  {
257  if (idx.size() < 1)
258  return;
259  UT_ASSERT(idx.size() == instance.size()+1);
260  if (idx.size() != instance.size()+1)
261  return;
262  switch (idx[0])
263  {
264  case 0:
265  coerceValue(myGroup, ( ( value ) ));
266  break;
267  case 1:
268  coerceValue(myEnable_preprocess, ( ( value ) ));
269  break;
270  case 2:
271  coerceValue(myDeactivate, clampMinValue(0, clampMaxValue(1, value ) ));
272  break;
273  case 3:
274  coerceValue(myMode, clampMinValue(0, clampMaxValue(1, value ) ));
275  break;
276  case 4:
277  coerceValue(myAttrib, ( ( value ) ));
278  break;
279  case 5:
280  coerceValue(mySourcevols, ( ( value ) ));
281  break;
282  case 6:
283  coerceValue(myDosmoothing, ( ( value ) ));
284  break;
285  case 7:
286  coerceValue(myScalecompressed, ( ( value ) ));
287  break;
288  case 8:
289  coerceValue(myDomaxdensityscale, ( ( value ) ));
290  break;
291  case 9:
292  coerceValue(myMaxdensityscale, ( ( value ) ));
293  break;
294  case 10:
295  coerceValue(myPrune, ( ( value ) ));
296  break;
297  case 11:
298  coerceValue(myPrunetolerance, ( ( value ) ));
299  break;
300 
301  }
302  }
303 
304  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
325  { doSetParmValue(idx, instance, value); }
326 
327  exint getNestNumParms(TempIndex idx) const override
328  {
329  if (idx.size() == 0)
330  return 12;
331  switch (idx[0])
332  {
333 
334  }
335  // Invalid
336  return 0;
337  }
338 
339  const char *getNestParmName(TempIndex fieldnum) const override
340  {
341  if (fieldnum.size() < 1)
342  return 0;
343  switch (fieldnum[0])
344  {
345  case 0:
346  return "group";
347  case 1:
348  return "enable_preprocess";
349  case 2:
350  return "deactivate";
351  case 3:
352  return "mode";
353  case 4:
354  return "attrib";
355  case 5:
356  return "sourcevols";
357  case 6:
358  return "dosmoothing";
359  case 7:
360  return "scalecompressed";
361  case 8:
362  return "domaxdensityscale";
363  case 9:
364  return "maxdensityscale";
365  case 10:
366  return "prune";
367  case 11:
368  return "prunetolerance";
369 
370  }
371  return 0;
372  }
373 
374  ParmType getNestParmType(TempIndex fieldnum) const override
375  {
376  if (fieldnum.size() < 1)
377  return PARM_UNSUPPORTED;
378  switch (fieldnum[0])
379  {
380  case 0:
381  return PARM_STRING;
382  case 1:
383  return PARM_INTEGER;
384  case 2:
385  return PARM_INTEGER;
386  case 3:
387  return PARM_INTEGER;
388  case 4:
389  return PARM_STRING;
390  case 5:
391  return PARM_STRING;
392  case 6:
393  return PARM_INTEGER;
394  case 7:
395  return PARM_INTEGER;
396  case 8:
397  return PARM_INTEGER;
398  case 9:
399  return PARM_FLOAT;
400  case 10:
401  return PARM_INTEGER;
402  case 11:
403  return PARM_FLOAT;
404 
405  }
406  return PARM_UNSUPPORTED;
407  }
408 
409  // Boiler plate to load individual types.
410  static void loadData(UT_IStream &is, int64 &v)
411  { is.bread(&v, 1); }
412  static void loadData(UT_IStream &is, bool &v)
413  { int64 iv; is.bread(&iv, 1); v = iv; }
414  static void loadData(UT_IStream &is, fpreal64 &v)
415  { is.bread<fpreal64>(&v, 1); }
416  static void loadData(UT_IStream &is, UT_Vector2D &v)
417  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
418  static void loadData(UT_IStream &is, UT_Vector3D &v)
419  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
420  is.bread<fpreal64>(&v.z(), 1); }
421  static void loadData(UT_IStream &is, UT_Vector4D &v)
422  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
423  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
424  static void loadData(UT_IStream &is, UT_Matrix2D &v)
425  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
426  static void loadData(UT_IStream &is, UT_Matrix3D &v)
427  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
428  static void loadData(UT_IStream &is, UT_Matrix4D &v)
429  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
430  static void loadData(UT_IStream &is, UT_Vector2I &v)
431  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
432  static void loadData(UT_IStream &is, UT_Vector3I &v)
433  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
434  is.bread<int64>(&v.z(), 1); }
435  static void loadData(UT_IStream &is, UT_Vector4I &v)
436  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
437  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
439  { is.bread(v); }
441  { UT_StringHolder rampdata;
442  loadData(is, rampdata);
443  if (rampdata.isstring())
444  {
445  v.reset(new UT_Ramp());
446  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
447  v->load(istr);
448  }
449  else v.reset();
450  }
453  loadData(is, data);
454  if (data.isstring())
455  {
456  // Find the data type.
457  const char *colon = UT_StringWrap(data).findChar(':');
458  if (colon)
459  {
460  int typelen = colon - data.buffer();
462  type.strncpy(data.buffer(), typelen);
463  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
464 
465  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
466  }
467  }
468  else v.reset();
469  }
470 
471  static void saveData(std::ostream &os, int64 v)
472  { UTwrite(os, &v); }
473  static void saveData(std::ostream &os, bool v)
474  { int64 iv = v; UTwrite(os, &iv); }
475  static void saveData(std::ostream &os, fpreal64 v)
476  { UTwrite<fpreal64>(os, &v); }
477  static void saveData(std::ostream &os, UT_Vector2D v)
478  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
479  static void saveData(std::ostream &os, UT_Vector3D v)
480  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
481  UTwrite<fpreal64>(os, &v.z()); }
482  static void saveData(std::ostream &os, UT_Vector4D v)
483  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
484  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
485  static void saveData(std::ostream &os, UT_Matrix2D v)
487  static void saveData(std::ostream &os, UT_Matrix3D v)
489  static void saveData(std::ostream &os, UT_Matrix4D v)
491  static void saveData(std::ostream &os, UT_StringHolder s)
492  { UT_StringWrap(s).saveBinary(os); }
493  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
495  UT_OStringStream ostr;
496  if (s) s->save(ostr);
497  result = ostr.str();
498  saveData(os, result);
499  }
500  static void saveData(std::ostream &os, PRM_DataItemHandle s)
502  UT_OStringStream ostr;
503  if (s)
504  {
505  ostr << s->getDataTypeToken();
506  ostr << ":";
507  s->saveBinary(ostr);
508  }
509  result = ostr.str();
510  saveData(os, result);
511  }
512 
513 
514  void save(std::ostream &os) const
515  {
516  int32 v = version();
517  UTwrite(os, &v);
518  saveData(os, myGroup);
519  saveData(os, myEnable_preprocess);
520  saveData(os, myDeactivate);
521  saveData(os, myMode);
522  saveData(os, myAttrib);
523  saveData(os, mySourcevols);
524  saveData(os, myDosmoothing);
525  saveData(os, myScalecompressed);
526  saveData(os, myDomaxdensityscale);
527  saveData(os, myMaxdensityscale);
528  saveData(os, myPrune);
529  saveData(os, myPrunetolerance);
530 
531  }
532 
533  bool load(UT_IStream &is)
534  {
535  int32 v;
536  is.bread(&v, 1);
537  if (version() != v)
538  {
539  // Fail incompatible versions
540  return false;
541  }
542  loadData(is, myGroup);
543  loadData(is, myEnable_preprocess);
544  loadData(is, myDeactivate);
545  loadData(is, myMode);
546  loadData(is, myAttrib);
547  loadData(is, mySourcevols);
548  loadData(is, myDosmoothing);
549  loadData(is, myScalecompressed);
550  loadData(is, myDomaxdensityscale);
551  loadData(is, myMaxdensityscale);
552  loadData(is, myPrune);
553  loadData(is, myPrunetolerance);
554 
555  return true;
556  }
557 
558  const UT_StringHolder & getGroup() const { return myGroup; }
559  void setGroup(const UT_StringHolder & val) { myGroup = val; }
561  {
562  SOP_Node *thissop = cookparms.getNode();
563  if (!thissop) return getGroup();
565  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
566  return result;
567  }
568  bool getEnable_preprocess() const { return myEnable_preprocess; }
569  void setEnable_preprocess(bool val) { myEnable_preprocess = val; }
570  bool opEnable_preprocess(const SOP_NodeVerb::CookParms &cookparms) const
571  {
572  SOP_Node *thissop = cookparms.getNode();
573  if (!thissop) return getEnable_preprocess();
574  bool result;
575  OP_Utils::evalOpParm(result, thissop, "enable_preprocess", cookparms.getCookTime(), 0);
576  return result;
577  }
578  Deactivate getDeactivate() const { return Deactivate(myDeactivate); }
579  void setDeactivate(Deactivate val) { myDeactivate = int64(val); }
581  {
582  SOP_Node *thissop = cookparms.getNode();
583  if (!thissop) return getDeactivate();
584  int64 result;
585  OP_Utils::evalOpParm(result, thissop, "deactivate", cookparms.getCookTime(), 0);
586  return Deactivate(result);
587  }
588  Mode getMode() const { return Mode(myMode); }
589  void setMode(Mode val) { myMode = int64(val); }
590  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
591  {
592  SOP_Node *thissop = cookparms.getNode();
593  if (!thissop) return getMode();
594  int64 result;
595  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
596  return Mode(result);
597  }
598  const UT_StringHolder & getAttrib() const { return myAttrib; }
599  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
601  {
602  SOP_Node *thissop = cookparms.getNode();
603  if (!thissop) return getAttrib();
605  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
606  return result;
607  }
608  const UT_StringHolder & getSourcevols() const { return mySourcevols; }
609  void setSourcevols(const UT_StringHolder & val) { mySourcevols = val; }
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getSourcevols();
615  OP_Utils::evalOpParm(result, thissop, "sourcevols", cookparms.getCookTime(), 0);
616  return result;
617  }
618  bool getDosmoothing() const { return myDosmoothing; }
619  void setDosmoothing(bool val) { myDosmoothing = val; }
620  bool opDosmoothing(const SOP_NodeVerb::CookParms &cookparms) const
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getDosmoothing();
624  bool result;
625  OP_Utils::evalOpParm(result, thissop, "dosmoothing", cookparms.getCookTime(), 0);
626  return result;
627  }
628  bool getScalecompressed() const { return myScalecompressed; }
629  void setScalecompressed(bool val) { myScalecompressed = val; }
630  bool opScalecompressed(const SOP_NodeVerb::CookParms &cookparms) const
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getScalecompressed();
634  bool result;
635  OP_Utils::evalOpParm(result, thissop, "scalecompressed", cookparms.getCookTime(), 0);
636  return result;
637  }
638  bool getDomaxdensityscale() const { return myDomaxdensityscale; }
639  void setDomaxdensityscale(bool val) { myDomaxdensityscale = val; }
640  bool opDomaxdensityscale(const SOP_NodeVerb::CookParms &cookparms) const
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getDomaxdensityscale();
644  bool result;
645  OP_Utils::evalOpParm(result, thissop, "domaxdensityscale", cookparms.getCookTime(), 0);
646  return result;
647  }
648  fpreal64 getMaxdensityscale() const { return myMaxdensityscale; }
649  void setMaxdensityscale(fpreal64 val) { myMaxdensityscale = val; }
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getMaxdensityscale();
655  OP_Utils::evalOpParm(result, thissop, "maxdensityscale", cookparms.getCookTime(), 0);
656  return result;
657  }
658  bool getPrune() const { return myPrune; }
659  void setPrune(bool val) { myPrune = val; }
660  bool opPrune(const SOP_NodeVerb::CookParms &cookparms) const
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getPrune();
664  bool result;
665  OP_Utils::evalOpParm(result, thissop, "prune", cookparms.getCookTime(), 0);
666  return result;
667  }
668  fpreal64 getPrunetolerance() const { return myPrunetolerance; }
669  void setPrunetolerance(fpreal64 val) { myPrunetolerance = val; }
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getPrunetolerance();
675  OP_Utils::evalOpParm(result, thissop, "prunetolerance", cookparms.getCookTime(), 0);
676  return result;
677  }
678 
679 private:
680  UT_StringHolder myGroup;
681  bool myEnable_preprocess;
682  int64 myDeactivate;
683  int64 myMode;
684  UT_StringHolder myAttrib;
685  UT_StringHolder mySourcevols;
686  bool myDosmoothing;
687  bool myScalecompressed;
688  bool myDomaxdensityscale;
689  fpreal64 myMaxdensityscale;
690  bool myPrune;
691  fpreal64 myPrunetolerance;
692 
693 };
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
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
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)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
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 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
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
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:1395
#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
SYS_FORCE_INLINE UT_StringHolder getToken(Deactivate enum_value)
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:97
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
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