HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Mirror.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_MirrorEnums
24 {
25  enum class Operation
26  {
27  ALL = 0,
28  CLIP
29  };
30 
32  getToken(Operation enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Operation::ALL: return "all"_sh;
37  case Operation::CLIP: return "clip"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class Dirtype
43  {
44  DIRECTION = 0,
45  XFORM
46  };
47 
49  getToken(Dirtype enum_value)
50  {
51  using namespace UT::Literal;
52  switch (enum_value) {
53  case Dirtype::DIRECTION: return "direction"_sh;
54  case Dirtype::XFORM: return "xform"_sh;
55  default: UT_ASSERT(false); return ""_sh;
56  }
57  }
58 
59  enum class Reversenml
60  {
61  NOREVERSE = 0,
62  REVERSE,
63  REVERSEU,
64  REVERSEV
65  };
66 
68  getToken(Reversenml enum_value)
69  {
70  using namespace UT::Literal;
71  switch (enum_value) {
72  case Reversenml::NOREVERSE: return "noreverse"_sh;
73  case Reversenml::REVERSE: return "reverse"_sh;
74  case Reversenml::REVERSEU: return "reverseu"_sh;
75  case Reversenml::REVERSEV: return "reversev"_sh;
76  default: UT_ASSERT(false); return ""_sh;
77  }
78  }
79 
80 }
81 
82 
84 {
85 public:
86  static int version() { return 1; }
87 
89  {
90  myGroup = ""_UTsh;
91  myOperation = 0;
92  myDirtype = 0;
93  myT = UT_Vector3D(0,0,0);
94  myR = UT_Vector3D(0,0,0);
95  myOrigin = UT_Vector3D(0,0,0);
96  myDir = UT_Vector3D(1,0,0);
97  myDist = 0;
98  myReversenml = 1;
99  myKeeporiginal = true;
100  myConsolidatepts = true;
101  myConsolidatetol = 0.0001;
102  myConsolidateunshared = true;
103  myCreateoutputgroup = false;
104  myOutputgroup = "mirror"_UTsh;
105 
106  }
107 
108  explicit SOP_MirrorParms(const SOP_MirrorParms &) = default;
109  SOP_MirrorParms &operator=(const SOP_MirrorParms &) = default;
110  SOP_MirrorParms(SOP_MirrorParms &&) noexcept = default;
111  SOP_MirrorParms &operator=(SOP_MirrorParms &&) noexcept = default;
112 
113  ~SOP_MirrorParms() override {}
114 
115  bool operator==(const SOP_MirrorParms &src) const
116  {
117  if (myGroup != src.myGroup) return false;
118  if (myOperation != src.myOperation) return false;
119  if (myDirtype != src.myDirtype) return false;
120  if (myT != src.myT) return false;
121  if (myR != src.myR) return false;
122  if (myOrigin != src.myOrigin) return false;
123  if (myDir != src.myDir) return false;
124  if (myDist != src.myDist) return false;
125  if (myReversenml != src.myReversenml) return false;
126  if (myKeeporiginal != src.myKeeporiginal) return false;
127  if (myConsolidatepts != src.myConsolidatepts) return false;
128  if (myConsolidatetol != src.myConsolidatetol) return false;
129  if (myConsolidateunshared != src.myConsolidateunshared) return false;
130  if (myCreateoutputgroup != src.myCreateoutputgroup) return false;
131  if (myOutputgroup != src.myOutputgroup) return false;
132 
133  return true;
134  }
135  bool operator!=(const SOP_MirrorParms &src) const
136  {
137  return !operator==(src);
138  }
142 
143 
144 
145  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
146  {
147  myGroup = ""_UTsh;
148  if (true)
149  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
150  myOperation = 0;
151  if (true)
152  graph->evalOpParm(myOperation, nodeidx, "operation", time, 0);
153  myDirtype = 0;
154  if (true)
155  graph->evalOpParm(myDirtype, nodeidx, "dirtype", time, 0);
156  myT = UT_Vector3D(0,0,0);
157  if (true && ( (true&&!(((int64(getDirtype())!=1))||((int64(getDirtype())!=1)))) ) )
158  graph->evalOpParm(myT, nodeidx, "t", time, 0);
159  myR = UT_Vector3D(0,0,0);
160  if (true && ( (true&&!(((int64(getDirtype())!=1))||((int64(getDirtype())!=1)))) ) )
161  graph->evalOpParm(myR, nodeidx, "r", time, 0);
162  myOrigin = UT_Vector3D(0,0,0);
163  if (true && ( (true&&!(((int64(getDirtype())!=0))||((int64(getDirtype())!=0)))) ) )
164  graph->evalOpParm(myOrigin, nodeidx, "origin", time, 0);
165  myDir = UT_Vector3D(1,0,0);
166  if (true && ( (true&&!(((int64(getDirtype())!=0))||((int64(getDirtype())!=0)))) ) )
167  graph->evalOpParm(myDir, nodeidx, "dir", time, 0);
168  myDist = 0;
169  if (true)
170  graph->evalOpParm(myDist, nodeidx, "dist", time, 0);
171  myReversenml = 1;
172  if (true)
173  graph->evalOpParm(myReversenml, nodeidx, "reversenml", time, 0);
174  myKeeporiginal = true;
175  if (true)
176  graph->evalOpParm(myKeeporiginal, nodeidx, "keepOriginal", time, 0);
177  myConsolidatepts = true;
178  if (true && ( (true&&!(((getKeeporiginal()==0)&&(int64(getOperation())!=1)))) ) )
179  graph->evalOpParm(myConsolidatepts, nodeidx, "consolidatepts", time, 0);
180  myConsolidatetol = 0.0001;
181  if (true && ( (true&&!(((getKeeporiginal()==0)&&(int64(getOperation())!=1))||((getConsolidatepts()==0)))) ) )
182  graph->evalOpParm(myConsolidatetol, nodeidx, "consolidatetol", time, 0);
183  myConsolidateunshared = true;
184  if (true && ( (true&&!(((getKeeporiginal()==0))||((getConsolidatepts()==0)))) ) )
185  graph->evalOpParm(myConsolidateunshared, nodeidx, "consolidateunshared", time, 0);
186  myCreateoutputgroup = false;
187  if (true)
188  graph->evalOpParm(myCreateoutputgroup, nodeidx, "createoutputgroup", time, 0);
189  myOutputgroup = "mirror"_UTsh;
190  if (true && ( (true&&!(((getCreateoutputgroup()==0)))) ) )
191  graph->evalOpParm(myOutputgroup, nodeidx, "outputgroup", time, 0);
192 
193  }
194 
195 
196  void loadFromOpSubclass(const LoadParms &loadparms) override
197  {
198  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
199  }
200 
201 
202  void copyFrom(const OP_NodeParms *src) override
203  {
204  *this = *((const SOP_MirrorParms *)src);
205  }
206 
207  template <typename T>
208  void
209  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
210  {
211  if (idx.size() < 1)
212  return;
213  UT_ASSERT(idx.size() == instance.size()+1);
214  if (idx.size() != instance.size()+1)
215  return;
216  switch (idx[0])
217  {
218  case 0:
219  coerceValue(value, myGroup);
220  break;
221  case 1:
222  coerceValue(value, myOperation);
223  break;
224  case 2:
225  coerceValue(value, myDirtype);
226  break;
227  case 3:
228  coerceValue(value, myT);
229  break;
230  case 4:
231  coerceValue(value, myR);
232  break;
233  case 5:
234  coerceValue(value, myOrigin);
235  break;
236  case 6:
237  coerceValue(value, myDir);
238  break;
239  case 7:
240  coerceValue(value, myDist);
241  break;
242  case 8:
243  coerceValue(value, myReversenml);
244  break;
245  case 9:
246  coerceValue(value, myKeeporiginal);
247  break;
248  case 10:
249  coerceValue(value, myConsolidatepts);
250  break;
251  case 11:
252  coerceValue(value, myConsolidatetol);
253  break;
254  case 12:
255  coerceValue(value, myConsolidateunshared);
256  break;
257  case 13:
258  coerceValue(value, myCreateoutputgroup);
259  break;
260  case 14:
261  coerceValue(value, myOutputgroup);
262  break;
263 
264  }
265  }
266 
267  bool isParmColorRamp(exint idx) const override
268  {
269  switch (idx)
270  {
271 
272  }
273  return false;
274  }
275 
276  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
277  { doGetParmValue(idx, instance, value); }
278  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
279  { doGetParmValue(idx, instance, value); }
280  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
289  { doGetParmValue(idx, instance, value); }
290  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
291  { doGetParmValue(idx, instance, value); }
292  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
297  { doGetParmValue(idx, instance, value); }
298 
299  template <typename T>
300  void
301  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
302  {
303  if (idx.size() < 1)
304  return;
305  UT_ASSERT(idx.size() == instance.size()+1);
306  if (idx.size() != instance.size()+1)
307  return;
308  switch (idx[0])
309  {
310  case 0:
311  coerceValue(myGroup, ( ( value ) ));
312  break;
313  case 1:
314  coerceValue(myOperation, clampMinValue(0, clampMaxValue(1, value ) ));
315  break;
316  case 2:
317  coerceValue(myDirtype, clampMinValue(0, clampMaxValue(1, value ) ));
318  break;
319  case 3:
320  coerceValue(myT, ( ( value ) ));
321  break;
322  case 4:
323  coerceValue(myR, ( ( value ) ));
324  break;
325  case 5:
326  coerceValue(myOrigin, ( ( value ) ));
327  break;
328  case 6:
329  coerceValue(myDir, ( ( value ) ));
330  break;
331  case 7:
332  coerceValue(myDist, ( ( value ) ));
333  break;
334  case 8:
335  coerceValue(myReversenml, clampMinValue(0, clampMaxValue(3, value ) ));
336  break;
337  case 9:
338  coerceValue(myKeeporiginal, ( ( value ) ));
339  break;
340  case 10:
341  coerceValue(myConsolidatepts, ( ( value ) ));
342  break;
343  case 11:
344  coerceValue(myConsolidatetol, ( ( value ) ));
345  break;
346  case 12:
347  coerceValue(myConsolidateunshared, ( ( value ) ));
348  break;
349  case 13:
350  coerceValue(myCreateoutputgroup, ( ( value ) ));
351  break;
352  case 14:
353  coerceValue(myOutputgroup, ( ( value ) ));
354  break;
355 
356  }
357  }
358 
359  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
360  { doSetParmValue(idx, instance, value); }
361  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
362  { doSetParmValue(idx, instance, value); }
363  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
364  { doSetParmValue(idx, instance, value); }
365  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
366  { doSetParmValue(idx, instance, value); }
367  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
368  { doSetParmValue(idx, instance, value); }
369  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
370  { doSetParmValue(idx, instance, value); }
371  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
372  { doSetParmValue(idx, instance, value); }
373  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
380  { doSetParmValue(idx, instance, value); }
381 
382  exint getNestNumParms(TempIndex idx) const override
383  {
384  if (idx.size() == 0)
385  return 15;
386  switch (idx[0])
387  {
388 
389  }
390  // Invalid
391  return 0;
392  }
393 
394  const char *getNestParmName(TempIndex fieldnum) const override
395  {
396  if (fieldnum.size() < 1)
397  return 0;
398  switch (fieldnum[0])
399  {
400  case 0:
401  return "group";
402  case 1:
403  return "operation";
404  case 2:
405  return "dirtype";
406  case 3:
407  return "t";
408  case 4:
409  return "r";
410  case 5:
411  return "origin";
412  case 6:
413  return "dir";
414  case 7:
415  return "dist";
416  case 8:
417  return "reversenml";
418  case 9:
419  return "keepOriginal";
420  case 10:
421  return "consolidatepts";
422  case 11:
423  return "consolidatetol";
424  case 12:
425  return "consolidateunshared";
426  case 13:
427  return "createoutputgroup";
428  case 14:
429  return "outputgroup";
430 
431  }
432  return 0;
433  }
434 
435  ParmType getNestParmType(TempIndex fieldnum) const override
436  {
437  if (fieldnum.size() < 1)
438  return PARM_UNSUPPORTED;
439  switch (fieldnum[0])
440  {
441  case 0:
442  return PARM_STRING;
443  case 1:
444  return PARM_INTEGER;
445  case 2:
446  return PARM_INTEGER;
447  case 3:
448  return PARM_VECTOR3;
449  case 4:
450  return PARM_VECTOR3;
451  case 5:
452  return PARM_VECTOR3;
453  case 6:
454  return PARM_VECTOR3;
455  case 7:
456  return PARM_FLOAT;
457  case 8:
458  return PARM_INTEGER;
459  case 9:
460  return PARM_INTEGER;
461  case 10:
462  return PARM_INTEGER;
463  case 11:
464  return PARM_FLOAT;
465  case 12:
466  return PARM_INTEGER;
467  case 13:
468  return PARM_INTEGER;
469  case 14:
470  return PARM_STRING;
471 
472  }
473  return PARM_UNSUPPORTED;
474  }
475 
476  // Boiler plate to load individual types.
477  static void loadData(UT_IStream &is, int64 &v)
478  { is.bread(&v, 1); }
479  static void loadData(UT_IStream &is, bool &v)
480  { int64 iv; is.bread(&iv, 1); v = iv; }
481  static void loadData(UT_IStream &is, fpreal64 &v)
482  { is.bread<fpreal64>(&v, 1); }
483  static void loadData(UT_IStream &is, UT_Vector2D &v)
484  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
485  static void loadData(UT_IStream &is, UT_Vector3D &v)
486  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
487  is.bread<fpreal64>(&v.z(), 1); }
488  static void loadData(UT_IStream &is, UT_Vector4D &v)
489  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
490  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
491  static void loadData(UT_IStream &is, UT_Matrix2D &v)
492  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
493  static void loadData(UT_IStream &is, UT_Matrix3D &v)
494  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
495  static void loadData(UT_IStream &is, UT_Matrix4D &v)
496  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
497  static void loadData(UT_IStream &is, UT_Vector2I &v)
498  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
499  static void loadData(UT_IStream &is, UT_Vector3I &v)
500  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
501  is.bread<int64>(&v.z(), 1); }
502  static void loadData(UT_IStream &is, UT_Vector4I &v)
503  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
504  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
506  { is.bread(v); }
508  { UT_StringHolder rampdata;
509  loadData(is, rampdata);
510  if (rampdata.isstring())
511  {
512  v.reset(new UT_Ramp());
513  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
514  v->load(istr);
515  }
516  else v.reset();
517  }
520  loadData(is, data);
521  if (data.isstring())
522  {
523  // Find the data type.
524  const char *colon = UT_StringWrap(data).findChar(':');
525  if (colon)
526  {
527  int typelen = colon - data.buffer();
529  type.strncpy(data.buffer(), typelen);
530  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
531 
532  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
533  }
534  }
535  else v.reset();
536  }
537 
538  static void saveData(std::ostream &os, int64 v)
539  { UTwrite(os, &v); }
540  static void saveData(std::ostream &os, bool v)
541  { int64 iv = v; UTwrite(os, &iv); }
542  static void saveData(std::ostream &os, fpreal64 v)
543  { UTwrite<fpreal64>(os, &v); }
544  static void saveData(std::ostream &os, UT_Vector2D v)
545  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
546  static void saveData(std::ostream &os, UT_Vector3D v)
547  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
548  UTwrite<fpreal64>(os, &v.z()); }
549  static void saveData(std::ostream &os, UT_Vector4D v)
550  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
551  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
552  static void saveData(std::ostream &os, UT_Matrix2D v)
554  static void saveData(std::ostream &os, UT_Matrix3D v)
556  static void saveData(std::ostream &os, UT_Matrix4D v)
558  static void saveData(std::ostream &os, UT_StringHolder s)
559  { UT_StringWrap(s).saveBinary(os); }
560  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
562  UT_OStringStream ostr;
563  if (s) s->save(ostr);
564  result = ostr.str();
565  saveData(os, result);
566  }
567  static void saveData(std::ostream &os, PRM_DataItemHandle s)
569  UT_OStringStream ostr;
570  if (s)
571  {
572  ostr << s->getDataTypeToken();
573  ostr << ":";
574  s->saveBinary(ostr);
575  }
576  result = ostr.str();
577  saveData(os, result);
578  }
579 
580 
581  void save(std::ostream &os) const
582  {
583  int32 v = version();
584  UTwrite(os, &v);
585  saveData(os, myGroup);
586  saveData(os, myOperation);
587  saveData(os, myDirtype);
588  saveData(os, myT);
589  saveData(os, myR);
590  saveData(os, myOrigin);
591  saveData(os, myDir);
592  saveData(os, myDist);
593  saveData(os, myReversenml);
594  saveData(os, myKeeporiginal);
595  saveData(os, myConsolidatepts);
596  saveData(os, myConsolidatetol);
597  saveData(os, myConsolidateunshared);
598  saveData(os, myCreateoutputgroup);
599  saveData(os, myOutputgroup);
600 
601  }
602 
603  bool load(UT_IStream &is)
604  {
605  int32 v;
606  is.bread(&v, 1);
607  if (version() != v)
608  {
609  // Fail incompatible versions
610  return false;
611  }
612  loadData(is, myGroup);
613  loadData(is, myOperation);
614  loadData(is, myDirtype);
615  loadData(is, myT);
616  loadData(is, myR);
617  loadData(is, myOrigin);
618  loadData(is, myDir);
619  loadData(is, myDist);
620  loadData(is, myReversenml);
621  loadData(is, myKeeporiginal);
622  loadData(is, myConsolidatepts);
623  loadData(is, myConsolidatetol);
624  loadData(is, myConsolidateunshared);
625  loadData(is, myCreateoutputgroup);
626  loadData(is, myOutputgroup);
627 
628  return true;
629  }
630 
631  const UT_StringHolder & getGroup() const { return myGroup; }
632  void setGroup(const UT_StringHolder & val) { myGroup = val; }
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getGroup();
638  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
639  return result;
640  }
641  Operation getOperation() const { return Operation(myOperation); }
642  void setOperation(Operation val) { myOperation = int64(val); }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getOperation();
647  int64 result;
648  OP_Utils::evalOpParm(result, thissop, "operation", cookparms.getCookTime(), 0);
649  return Operation(result);
650  }
651  Dirtype getDirtype() const { return Dirtype(myDirtype); }
652  void setDirtype(Dirtype val) { myDirtype = int64(val); }
653  Dirtype opDirtype(const SOP_NodeVerb::CookParms &cookparms) const
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getDirtype();
657  int64 result;
658  OP_Utils::evalOpParm(result, thissop, "dirtype", cookparms.getCookTime(), 0);
659  return Dirtype(result);
660  }
661  UT_Vector3D getT() const { return myT; }
662  void setT(UT_Vector3D val) { myT = val; }
663  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getT();
668  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
669  return result;
670  }
671  UT_Vector3D getR() const { return myR; }
672  void setR(UT_Vector3D val) { myR = val; }
673  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getR();
678  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
679  return result;
680  }
681  UT_Vector3D getOrigin() const { return myOrigin; }
682  void setOrigin(UT_Vector3D val) { myOrigin = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getOrigin();
688  OP_Utils::evalOpParm(result, thissop, "origin", cookparms.getCookTime(), 0);
689  return result;
690  }
691  UT_Vector3D getDir() const { return myDir; }
692  void setDir(UT_Vector3D val) { myDir = val; }
693  UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getDir();
698  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
699  return result;
700  }
701  fpreal64 getDist() const { return myDist; }
702  void setDist(fpreal64 val) { myDist = val; }
703  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getDist();
708  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
709  return result;
710  }
711  Reversenml getReversenml() const { return Reversenml(myReversenml); }
712  void setReversenml(Reversenml val) { myReversenml = int64(val); }
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getReversenml();
717  int64 result;
718  OP_Utils::evalOpParm(result, thissop, "reversenml", cookparms.getCookTime(), 0);
719  return Reversenml(result);
720  }
721  bool getKeeporiginal() const { return myKeeporiginal; }
722  void setKeeporiginal(bool val) { myKeeporiginal = val; }
723  bool opKeeporiginal(const SOP_NodeVerb::CookParms &cookparms) const
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getKeeporiginal();
727  bool result;
728  OP_Utils::evalOpParm(result, thissop, "keepOriginal", cookparms.getCookTime(), 0);
729  return result;
730  }
731  bool getConsolidatepts() const { return myConsolidatepts; }
732  void setConsolidatepts(bool val) { myConsolidatepts = val; }
733  bool opConsolidatepts(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getConsolidatepts();
737  bool result;
738  OP_Utils::evalOpParm(result, thissop, "consolidatepts", cookparms.getCookTime(), 0);
739  return result;
740  }
741  fpreal64 getConsolidatetol() const { return myConsolidatetol; }
742  void setConsolidatetol(fpreal64 val) { myConsolidatetol = val; }
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getConsolidatetol();
748  OP_Utils::evalOpParm(result, thissop, "consolidatetol", cookparms.getCookTime(), 0);
749  return result;
750  }
751  bool getConsolidateunshared() const { return myConsolidateunshared; }
752  void setConsolidateunshared(bool val) { myConsolidateunshared = val; }
753  bool opConsolidateunshared(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getConsolidateunshared();
757  bool result;
758  OP_Utils::evalOpParm(result, thissop, "consolidateunshared", cookparms.getCookTime(), 0);
759  return result;
760  }
761  bool getCreateoutputgroup() const { return myCreateoutputgroup; }
762  void setCreateoutputgroup(bool val) { myCreateoutputgroup = val; }
763  bool opCreateoutputgroup(const SOP_NodeVerb::CookParms &cookparms) const
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getCreateoutputgroup();
767  bool result;
768  OP_Utils::evalOpParm(result, thissop, "createoutputgroup", cookparms.getCookTime(), 0);
769  return result;
770  }
771  const UT_StringHolder & getOutputgroup() const { return myOutputgroup; }
772  void setOutputgroup(const UT_StringHolder & val) { myOutputgroup = val; }
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getOutputgroup();
778  OP_Utils::evalOpParm(result, thissop, "outputgroup", cookparms.getCookTime(), 0);
779  return result;
780  }
781 
782 private:
783  UT_StringHolder myGroup;
784  int64 myOperation;
785  int64 myDirtype;
786  UT_Vector3D myT;
787  UT_Vector3D myR;
788  UT_Vector3D myOrigin;
789  UT_Vector3D myDir;
790  fpreal64 myDist;
791  int64 myReversenml;
792  bool myKeeporiginal;
793  bool myConsolidatepts;
794  fpreal64 myConsolidatetol;
795  bool myConsolidateunshared;
796  bool myCreateoutputgroup;
797  UT_StringHolder myOutputgroup;
798 
799 };
void setR(UT_Vector3D val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setOperation(Operation val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
UT_Vector3D getR() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
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
void setReversenml(Reversenml val)
Dirtype opDirtype(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
bool opConsolidatepts(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
void setDist(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
GLdouble s
Definition: glad.h:3009
Operation getOperation() const
An output stream object that owns its own string buffer storage.
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setCreateoutputgroup(bool val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
**But if you need a result
Definition: thread.h:613
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 setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
fpreal64 opConsolidatetol(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, bool v)
exint length() const
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) 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
Operation opOperation(const SOP_NodeVerb::CookParms &cookparms) const
bool getConsolidatepts() const
fpreal64 getDist() const
void setConsolidateunshared(bool val)
void setT(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
UT_StringHolder opOutputgroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getOrigin() const
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
long long int64
Definition: SYS_Types.h:116
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool opKeeporiginal(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
UT_Vector3T< fpreal64 > UT_Vector3D
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector4I &v)
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setOutputgroup(const UT_StringHolder &val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
ParmType getNestParmType(TempIndex fieldnum) const override
void setConsolidatepts(bool val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator!=(const SOP_MirrorParms &src) const
void setOrigin(UT_Vector3D val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void saveData(std::ostream &os, PRM_DataItemHandle s)
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_Vector4D v)
UT_Vector3D getDir() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool operator==(const SOP_MirrorParms &src) const
bool opConsolidateunshared(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputgroup() const
static void saveData(std::ostream &os, UT_StringHolder s)
static int version()
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Vector3D getT() const
Reversenml getReversenml() const
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const 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
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool getCreateoutputgroup() const
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 UT_Vector4D &value) override
void setDir(UT_Vector3D val)
Dirtype getDirtype() const
GLboolean r
Definition: glcorearb.h:1222
SYS_FORCE_INLINE UT_StringHolder getToken(Operation enum_value)
void setDirtype(Dirtype val)
void setConsolidatetol(fpreal64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool getKeeporiginal() const
type
Definition: core.h:1059
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
Reversenml opReversenml(const SOP_NodeVerb::CookParms &cookparms) const
bool getConsolidateunshared() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
static void saveData(std::ostream &os, fpreal64 v)
void save(std::ostream &os) const
SYS_FORCE_INLINE bool isstring() const
fpreal64 getConsolidatetol() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setKeeporiginal(bool val)
bool opCreateoutputgroup(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663