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