HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeSlice.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_VolumeSliceEnums
24 {
25  enum class Method
26  {
27  VOLUME = 0,
28  MESH,
29  POINTS
30  };
31 
33  getToken(Method enum_value)
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case Method::VOLUME: return "volume"_sh;
38  case Method::MESH: return "mesh"_sh;
39  case Method::POINTS: return "points"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44  enum class Plane
45  {
46  XY = 0,
47  YZ,
48  ZX
49  };
50 
52  getToken(Plane enum_value)
53  {
54  using namespace UT::Literal;
55  switch (enum_value) {
56  case Plane::XY: return "xy"_sh;
57  case Plane::YZ: return "yz"_sh;
58  case Plane::ZX: return "zx"_sh;
59  default: UT_ASSERT(false); return ""_sh;
60  }
61  }
62 
63  enum class Vismode
64  {
65  NONE = 0,
66  FALSE_,
67  PINK,
68  MONO,
69  BLACKBODY,
70  BIPARTITE,
71  CUSTOM
72  };
73 
75  getToken(Vismode enum_value)
76  {
77  using namespace UT::Literal;
78  switch (enum_value) {
79  case Vismode::NONE: return "none"_sh;
80  case Vismode::FALSE_: return "false"_sh;
81  case Vismode::PINK: return "pink"_sh;
82  case Vismode::MONO: return "mono"_sh;
83  case Vismode::BLACKBODY: return "blackbody"_sh;
84  case Vismode::BIPARTITE: return "bipartite"_sh;
85  case Vismode::CUSTOM: return "custom"_sh;
86  default: UT_ASSERT(false); return ""_sh;
87  }
88  }
89 
90 }
91 
92 
94 {
95 public:
96  static int version() { return 1; }
97 
99  {
100  myGroup = ""_UTsh;
101  myMethod = 1;
102  myPlane = 0;
103  myPlaneoffset = 0;
104  myAttrib = "density"_UTsh;
105  myCreatevarmap = false;
106  myLvar = ""_UTsh;
107  myVisualize = true;
108  myVismode = 1;
109  myVisrange = UT_Vector2D(0,1);
110  myCdramp = UT_SharedPtr<UT_Ramp>(0);
111  myKeep = false;
112 
113  }
114 
115  explicit SOP_VolumeSliceParms(const SOP_VolumeSliceParms &) = default;
117  SOP_VolumeSliceParms(SOP_VolumeSliceParms &&) noexcept = default;
118  SOP_VolumeSliceParms &operator=(SOP_VolumeSliceParms &&) noexcept = default;
119 
120  ~SOP_VolumeSliceParms() override {}
121 
123  {
124  if (myGroup != src.myGroup) return false;
125  if (myMethod != src.myMethod) return false;
126  if (myPlane != src.myPlane) return false;
127  if (myPlaneoffset != src.myPlaneoffset) return false;
128  if (myAttrib != src.myAttrib) return false;
129  if (myCreatevarmap != src.myCreatevarmap) return false;
130  if (myLvar != src.myLvar) return false;
131  if (myVisualize != src.myVisualize) return false;
132  if (myVismode != src.myVismode) return false;
133  if (myVisrange != src.myVisrange) return false;
134  if (myCdramp != src.myCdramp)
135  { if (!myCdramp || !src.myCdramp || !(*myCdramp == *src.myCdramp)) return false; }
136  if (myKeep != src.myKeep) return false;
137 
138  return true;
139  }
141  {
142  return !operator==(src);
143  }
147 
148 
149 
150  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
151  {
152  myGroup = ""_UTsh;
153  if (true)
154  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
155  myMethod = 1;
156  if (true)
157  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
158  myPlane = 0;
159  if (true)
160  graph->evalOpParm(myPlane, nodeidx, "plane", time, 0);
161  myPlaneoffset = 0;
162  if (true)
163  graph->evalOpParm(myPlaneoffset, nodeidx, "planeoffset", time, 0);
164  myAttrib = "density"_UTsh;
165  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
166  graph->evalOpParm(myAttrib, nodeidx, "attrib", time, 0);
167  myCreatevarmap = false;
168  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
169  graph->evalOpParm(myCreatevarmap, nodeidx, "createvarmap", time, 0);
170  myLvar = ""_UTsh;
171  if (true && ( (true&&!(((int64(getMethod())==0))||((getCreatevarmap()==0)))) ) )
172  graph->evalOpParm(myLvar, nodeidx, "lvar", time, 0);
173  myVisualize = true;
174  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
175  graph->evalOpParm(myVisualize, nodeidx, "visualize", time, 0);
176  myVismode = 1;
177  if (true && ( (true&&!(((int64(getMethod())==0))||((getVisualize()==0)))) ) )
178  graph->evalOpParm(myVismode, nodeidx, "vismode", time, 0);
179  myVisrange = UT_Vector2D(0,1);
180  if (true && ( (true&&!(((int64(getMethod())==0))||((getVisualize()==0)))) ) )
181  graph->evalOpParm(myVisrange, nodeidx, "visrange", time, 0);
182  myCdramp = UT_SharedPtr<UT_Ramp>(0);
183  if (true && ( (true&&!(((int64(getMethod())==0))||((getVisualize()==0))||((int64(getVismode())!=6)))) ) )
184  graph->evalOpParm(myCdramp, nodeidx, "cdramp", time, 0);
185  myKeep = false;
186  if (true)
187  graph->evalOpParm(myKeep, nodeidx, "keep", time, 0);
188 
189  }
190 
191 
192  void loadFromOpSubclass(const LoadParms &loadparms) override
193  {
194  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
195  }
196 
197 
198  void copyFrom(const OP_NodeParms *src) override
199  {
200  *this = *((const SOP_VolumeSliceParms *)src);
201  }
202 
203  template <typename T>
204  void
205  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
206  {
207  if (idx.size() < 1)
208  return;
209  UT_ASSERT(idx.size() == instance.size()+1);
210  if (idx.size() != instance.size()+1)
211  return;
212  switch (idx[0])
213  {
214  case 0:
215  coerceValue(value, myGroup);
216  break;
217  case 1:
218  coerceValue(value, myMethod);
219  break;
220  case 2:
221  coerceValue(value, myPlane);
222  break;
223  case 3:
224  coerceValue(value, myPlaneoffset);
225  break;
226  case 4:
227  coerceValue(value, myAttrib);
228  break;
229  case 5:
230  coerceValue(value, myCreatevarmap);
231  break;
232  case 6:
233  coerceValue(value, myLvar);
234  break;
235  case 7:
236  coerceValue(value, myVisualize);
237  break;
238  case 8:
239  coerceValue(value, myVismode);
240  break;
241  case 9:
242  coerceValue(value, myVisrange);
243  break;
244  case 10:
245  coerceValue(value, myCdramp);
246  break;
247  case 11:
248  coerceValue(value, myKeep);
249  break;
250 
251  }
252  }
253 
254  bool isParmColorRamp(exint idx) const override
255  {
256  switch (idx)
257  {
258  case 10:
259  return true;
260  }
261  return false;
262  }
263 
264  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
275  { doGetParmValue(idx, instance, value); }
276  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
277  { doGetParmValue(idx, instance, value); }
278  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
279  { doGetParmValue(idx, instance, value); }
280  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
285  { doGetParmValue(idx, instance, value); }
286 
287  template <typename T>
288  void
289  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
290  {
291  if (idx.size() < 1)
292  return;
293  UT_ASSERT(idx.size() == instance.size()+1);
294  if (idx.size() != instance.size()+1)
295  return;
296  switch (idx[0])
297  {
298  case 0:
299  coerceValue(myGroup, ( ( value ) ));
300  break;
301  case 1:
302  coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
303  break;
304  case 2:
305  coerceValue(myPlane, clampMinValue(0, clampMaxValue(2, value ) ));
306  break;
307  case 3:
308  coerceValue(myPlaneoffset, clampMinValue(-1, clampMaxValue(1, value ) ));
309  break;
310  case 4:
311  coerceValue(myAttrib, ( ( value ) ));
312  break;
313  case 5:
314  coerceValue(myCreatevarmap, ( ( value ) ));
315  break;
316  case 6:
317  coerceValue(myLvar, ( ( value ) ));
318  break;
319  case 7:
320  coerceValue(myVisualize, ( ( value ) ));
321  break;
322  case 8:
323  coerceValue(myVismode, clampMinValue(0, clampMaxValue(6, value ) ));
324  break;
325  case 9:
326  coerceValue(myVisrange, ( ( value ) ));
327  break;
328  case 10:
329  coerceValue(myCdramp, ( ( value ) ));
330  break;
331  case 11:
332  coerceValue(myKeep, ( ( value ) ));
333  break;
334 
335  }
336  }
337 
338  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
349  { doSetParmValue(idx, instance, value); }
350  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
351  { doSetParmValue(idx, instance, value); }
352  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
353  { doSetParmValue(idx, instance, value); }
354  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
355  { doSetParmValue(idx, instance, value); }
356  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
357  { doSetParmValue(idx, instance, value); }
358  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
359  { doSetParmValue(idx, instance, value); }
360 
361  exint getNestNumParms(TempIndex idx) const override
362  {
363  if (idx.size() == 0)
364  return 12;
365  switch (idx[0])
366  {
367 
368  }
369  // Invalid
370  return 0;
371  }
372 
373  const char *getNestParmName(TempIndex fieldnum) const override
374  {
375  if (fieldnum.size() < 1)
376  return 0;
377  switch (fieldnum[0])
378  {
379  case 0:
380  return "group";
381  case 1:
382  return "method";
383  case 2:
384  return "plane";
385  case 3:
386  return "planeoffset";
387  case 4:
388  return "attrib";
389  case 5:
390  return "createvarmap";
391  case 6:
392  return "lvar";
393  case 7:
394  return "visualize";
395  case 8:
396  return "vismode";
397  case 9:
398  return "visrange";
399  case 10:
400  return "cdramp";
401  case 11:
402  return "keep";
403 
404  }
405  return 0;
406  }
407 
408  ParmType getNestParmType(TempIndex fieldnum) const override
409  {
410  if (fieldnum.size() < 1)
411  return PARM_UNSUPPORTED;
412  switch (fieldnum[0])
413  {
414  case 0:
415  return PARM_STRING;
416  case 1:
417  return PARM_INTEGER;
418  case 2:
419  return PARM_INTEGER;
420  case 3:
421  return PARM_FLOAT;
422  case 4:
423  return PARM_STRING;
424  case 5:
425  return PARM_INTEGER;
426  case 6:
427  return PARM_STRING;
428  case 7:
429  return PARM_INTEGER;
430  case 8:
431  return PARM_INTEGER;
432  case 9:
433  return PARM_VECTOR2;
434  case 10:
435  return PARM_RAMP;
436  case 11:
437  return PARM_INTEGER;
438 
439  }
440  return PARM_UNSUPPORTED;
441  }
442 
443  // Boiler plate to load individual types.
444  static void loadData(UT_IStream &is, int64 &v)
445  { is.bread(&v, 1); }
446  static void loadData(UT_IStream &is, bool &v)
447  { int64 iv; is.bread(&iv, 1); v = iv; }
448  static void loadData(UT_IStream &is, fpreal64 &v)
449  { is.bread<fpreal64>(&v, 1); }
450  static void loadData(UT_IStream &is, UT_Vector2D &v)
451  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
452  static void loadData(UT_IStream &is, UT_Vector3D &v)
453  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
454  is.bread<fpreal64>(&v.z(), 1); }
455  static void loadData(UT_IStream &is, UT_Vector4D &v)
456  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
457  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
458  static void loadData(UT_IStream &is, UT_Matrix2D &v)
459  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
460  static void loadData(UT_IStream &is, UT_Matrix3D &v)
461  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
462  static void loadData(UT_IStream &is, UT_Matrix4D &v)
463  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
464  static void loadData(UT_IStream &is, UT_Vector2I &v)
465  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
466  static void loadData(UT_IStream &is, UT_Vector3I &v)
467  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
468  is.bread<int64>(&v.z(), 1); }
469  static void loadData(UT_IStream &is, UT_Vector4I &v)
470  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
471  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
473  { is.bread(v); }
475  { UT_StringHolder rampdata;
476  loadData(is, rampdata);
477  if (rampdata.isstring())
478  {
479  v.reset(new UT_Ramp());
480  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
481  v->load(istr);
482  }
483  else v.reset();
484  }
487  loadData(is, data);
488  if (data.isstring())
489  {
490  // Find the data type.
491  const char *colon = UT_StringWrap(data).findChar(':');
492  if (colon)
493  {
494  int typelen = colon - data.buffer();
496  type.strncpy(data.buffer(), typelen);
497  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
498 
499  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
500  }
501  }
502  else v.reset();
503  }
504 
505  static void saveData(std::ostream &os, int64 v)
506  { UTwrite(os, &v); }
507  static void saveData(std::ostream &os, bool v)
508  { int64 iv = v; UTwrite(os, &iv); }
509  static void saveData(std::ostream &os, fpreal64 v)
510  { UTwrite<fpreal64>(os, &v); }
511  static void saveData(std::ostream &os, UT_Vector2D v)
512  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
513  static void saveData(std::ostream &os, UT_Vector3D v)
514  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
515  UTwrite<fpreal64>(os, &v.z()); }
516  static void saveData(std::ostream &os, UT_Vector4D v)
517  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
518  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
519  static void saveData(std::ostream &os, UT_Matrix2D v)
521  static void saveData(std::ostream &os, UT_Matrix3D v)
523  static void saveData(std::ostream &os, UT_Matrix4D v)
525  static void saveData(std::ostream &os, UT_StringHolder s)
526  { UT_StringWrap(s).saveBinary(os); }
527  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
529  UT_OStringStream ostr;
530  if (s) s->save(ostr);
531  result = ostr.str();
532  saveData(os, result);
533  }
534  static void saveData(std::ostream &os, PRM_DataItemHandle s)
536  UT_OStringStream ostr;
537  if (s)
538  {
539  ostr << s->getDataTypeToken();
540  ostr << ":";
541  s->saveBinary(ostr);
542  }
543  result = ostr.str();
544  saveData(os, result);
545  }
546 
547 
548  void save(std::ostream &os) const
549  {
550  int32 v = version();
551  UTwrite(os, &v);
552  saveData(os, myGroup);
553  saveData(os, myMethod);
554  saveData(os, myPlane);
555  saveData(os, myPlaneoffset);
556  saveData(os, myAttrib);
557  saveData(os, myCreatevarmap);
558  saveData(os, myLvar);
559  saveData(os, myVisualize);
560  saveData(os, myVismode);
561  saveData(os, myVisrange);
562  saveData(os, myCdramp);
563  saveData(os, myKeep);
564 
565  }
566 
567  bool load(UT_IStream &is)
568  {
569  int32 v;
570  is.bread(&v, 1);
571  if (version() != v)
572  {
573  // Fail incompatible versions
574  return false;
575  }
576  loadData(is, myGroup);
577  loadData(is, myMethod);
578  loadData(is, myPlane);
579  loadData(is, myPlaneoffset);
580  loadData(is, myAttrib);
581  loadData(is, myCreatevarmap);
582  loadData(is, myLvar);
583  loadData(is, myVisualize);
584  loadData(is, myVismode);
585  loadData(is, myVisrange);
586  loadData(is, myCdramp);
587  loadData(is, myKeep);
588 
589  return true;
590  }
591 
592  const UT_StringHolder & getGroup() const { return myGroup; }
593  void setGroup(const UT_StringHolder & val) { myGroup = val; }
595  {
596  SOP_Node *thissop = cookparms.getNode();
597  if (!thissop) return getGroup();
599  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
600  return result;
601  }
602  Method getMethod() const { return Method(myMethod); }
603  void setMethod(Method val) { myMethod = int64(val); }
604  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
605  {
606  SOP_Node *thissop = cookparms.getNode();
607  if (!thissop) return getMethod();
608  int64 result;
609  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
610  return Method(result);
611  }
612  Plane getPlane() const { return Plane(myPlane); }
613  void setPlane(Plane val) { myPlane = int64(val); }
614  Plane opPlane(const SOP_NodeVerb::CookParms &cookparms) const
615  {
616  SOP_Node *thissop = cookparms.getNode();
617  if (!thissop) return getPlane();
618  int64 result;
619  OP_Utils::evalOpParm(result, thissop, "plane", cookparms.getCookTime(), 0);
620  return Plane(result);
621  }
622  fpreal64 getPlaneoffset() const { return myPlaneoffset; }
623  void setPlaneoffset(fpreal64 val) { myPlaneoffset = val; }
625  {
626  SOP_Node *thissop = cookparms.getNode();
627  if (!thissop) return getPlaneoffset();
629  OP_Utils::evalOpParm(result, thissop, "planeoffset", cookparms.getCookTime(), 0);
630  return result;
631  }
632  const UT_StringHolder & getAttrib() const { return myAttrib; }
633  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
635  {
636  SOP_Node *thissop = cookparms.getNode();
637  if (!thissop) return getAttrib();
639  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
640  return result;
641  }
642  bool getCreatevarmap() const { return myCreatevarmap; }
643  void setCreatevarmap(bool val) { myCreatevarmap = val; }
644  bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
645  {
646  SOP_Node *thissop = cookparms.getNode();
647  if (!thissop) return getCreatevarmap();
648  bool result;
649  OP_Utils::evalOpParm(result, thissop, "createvarmap", cookparms.getCookTime(), 0);
650  return result;
651  }
652  const UT_StringHolder & getLvar() const { return myLvar; }
653  void setLvar(const UT_StringHolder & val) { myLvar = val; }
655  {
656  SOP_Node *thissop = cookparms.getNode();
657  if (!thissop) return getLvar();
659  OP_Utils::evalOpParm(result, thissop, "lvar", cookparms.getCookTime(), 0);
660  return result;
661  }
662  bool getVisualize() const { return myVisualize; }
663  void setVisualize(bool val) { myVisualize = val; }
664  bool opVisualize(const SOP_NodeVerb::CookParms &cookparms) const
665  {
666  SOP_Node *thissop = cookparms.getNode();
667  if (!thissop) return getVisualize();
668  bool result;
669  OP_Utils::evalOpParm(result, thissop, "visualize", cookparms.getCookTime(), 0);
670  return result;
671  }
672  Vismode getVismode() const { return Vismode(myVismode); }
673  void setVismode(Vismode val) { myVismode = int64(val); }
674  Vismode opVismode(const SOP_NodeVerb::CookParms &cookparms) const
675  {
676  SOP_Node *thissop = cookparms.getNode();
677  if (!thissop) return getVismode();
678  int64 result;
679  OP_Utils::evalOpParm(result, thissop, "vismode", cookparms.getCookTime(), 0);
680  return Vismode(result);
681  }
682  UT_Vector2D getVisrange() const { return myVisrange; }
683  void setVisrange(UT_Vector2D val) { myVisrange = val; }
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getVisrange();
689  OP_Utils::evalOpParm(result, thissop, "visrange", cookparms.getCookTime(), 0);
690  return result;
691  }
692  UT_SharedPtr<UT_Ramp> getCdramp() const { return myCdramp; }
693  void setCdramp(UT_SharedPtr<UT_Ramp> val) { myCdramp = val; }
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getCdramp();
699  OP_Utils::evalOpParm(result, thissop, "cdramp", cookparms.getCookTime(), 0);
700  return result;
701  }
702  bool getKeep() const { return myKeep; }
703  void setKeep(bool val) { myKeep = val; }
704  bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getKeep();
708  bool result;
709  OP_Utils::evalOpParm(result, thissop, "keep", cookparms.getCookTime(), 0);
710  return result;
711  }
712 
713 private:
714  UT_StringHolder myGroup;
715  int64 myMethod;
716  int64 myPlane;
717  fpreal64 myPlaneoffset;
718  UT_StringHolder myAttrib;
719  bool myCreatevarmap;
720  UT_StringHolder myLvar;
721  bool myVisualize;
722  int64 myVismode;
723  UT_Vector2D myVisrange;
724  UT_SharedPtr<UT_Ramp> myCdramp;
725  bool myKeep;
726 
727 };
Plane opPlane(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator!=(const SOP_VolumeSliceParms &src) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, UT_Matrix3D v)
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
static void saveData(std::ostream &os, UT_Vector2D v)
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_Vector2T< fpreal64 > UT_Vector2D
bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
Vismode opVismode(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
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
static void saveData(std::ostream &os, fpreal64 v)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLdouble s
Definition: glad.h:3009
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool opVisualize(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
**But if you need a result
Definition: thread.h:613
void setLvar(const UT_StringHolder &val)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
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 save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setPlaneoffset(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix2D v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector3D v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Vector4D v)
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_Vector2D opVisrange(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
exint length() const
bool operator==(const SOP_VolumeSliceParms &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
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setVismode(Vismode val)
static void saveData(std::ostream &os, UT_Matrix4D v)
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setGroup(const UT_StringHolder &val)
void setCdramp(UT_SharedPtr< UT_Ramp > val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
fpreal64 getPlaneoffset() const
GT_API const UT_StringHolder version
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
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)
void setVisrange(UT_Vector2D val)
UT_SharedPtr< UT_Ramp > opCdramp(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opLvar(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
SYS_FORCE_INLINE UT_StringHolder getToken(Method enum_value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
UT_Vector2D getVisrange() const
static void saveData(std::ostream &os, int64 v)
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, bool v)
void copyFrom(const OP_NodeParms *src) override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
const UT_StringHolder & getLvar() const
type
Definition: core.h:1059
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
UT_SharedPtr< UT_Ramp > getCdramp() const
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
fpreal64 opPlaneoffset(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663