HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Knife.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_KnifeEnums
24 {
25  enum class Knifeop
26  {
27  ABOVE = 0,
28  BELOW,
29  BOTH
30  };
31 
33  getToken(Knifeop enum_value)
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case Knifeop::ABOVE: return "above"_sh;
38  case Knifeop::BELOW: return "below"_sh;
39  case Knifeop::BOTH: return "both"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44 }
45 
46 
48 {
49 public:
50  static int version() { return 1; }
51 
53  {
54  myGroup = ""_UTsh;
55  myKnifeop = 0;
56  myOrigin = UT_Vector3D(0,0,0);
57  myDist = 0;
58  myDir = UT_Vector3D(0,1,0);
59  myNewg = false;
60  myAbove = "above_plane"_UTsh;
61  myBelow = "below_plane"_UTsh;
62  myClippts = true;
63 
64  }
65 
66  explicit SOP_KnifeParms(const SOP_KnifeParms &) = default;
67  SOP_KnifeParms &operator=(const SOP_KnifeParms &) = default;
68  SOP_KnifeParms(SOP_KnifeParms &&) noexcept = default;
69  SOP_KnifeParms &operator=(SOP_KnifeParms &&) noexcept = default;
70 
71  ~SOP_KnifeParms() override {}
72 
73  bool operator==(const SOP_KnifeParms &src) const
74  {
75  if (myGroup != src.myGroup) return false;
76  if (myKnifeop != src.myKnifeop) return false;
77  if (myOrigin != src.myOrigin) return false;
78  if (myDist != src.myDist) return false;
79  if (myDir != src.myDir) return false;
80  if (myNewg != src.myNewg) return false;
81  if (myAbove != src.myAbove) return false;
82  if (myBelow != src.myBelow) return false;
83  if (myClippts != src.myClippts) return false;
84 
85  return true;
86  }
87  bool operator!=(const SOP_KnifeParms &src) const
88  {
89  return !operator==(src);
90  }
92 
93 
94 
95  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
96  {
97  myGroup = ""_UTsh;
98  if (true)
99  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
100  myKnifeop = 0;
101  if (true)
102  graph->evalOpParm(myKnifeop, nodeidx, "knifeop", time, 0);
103  myOrigin = UT_Vector3D(0,0,0);
104  if (true)
105  graph->evalOpParm(myOrigin, nodeidx, "origin", time, 0);
106  myDist = 0;
107  if (true)
108  graph->evalOpParm(myDist, nodeidx, "dist", time, 0);
109  myDir = UT_Vector3D(0,1,0);
110  if (true)
111  graph->evalOpParm(myDir, nodeidx, "dir", time, 0);
112  myNewg = false;
113  if (true && ( (true&&!(((int64(getKnifeop())!=2)))) ) )
114  graph->evalOpParm(myNewg, nodeidx, "newg", time, 0);
115  myAbove = "above_plane"_UTsh;
116  if (true && ( (true&&!(((int64(getKnifeop())!=2))||((getNewg()==0)))) ) )
117  graph->evalOpParm(myAbove, nodeidx, "above", time, 0);
118  myBelow = "below_plane"_UTsh;
119  if (true && ( (true&&!(((int64(getKnifeop())!=2))||((getNewg()==0)))) ) )
120  graph->evalOpParm(myBelow, nodeidx, "below", time, 0);
121  myClippts = true;
122  if (true)
123  graph->evalOpParm(myClippts, nodeidx, "clippts", time, 0);
124 
125  }
126 
127 
128  void loadFromOpSubclass(const LoadParms &loadparms) override
129  {
130  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
131  }
132 
133 
134  void copyFrom(const OP_NodeParms *src) override
135  {
136  *this = *((const SOP_KnifeParms *)src);
137  }
138 
139  template <typename T>
140  void
141  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
142  {
143  if (idx.size() < 1)
144  return;
145  UT_ASSERT(idx.size() == instance.size()+1);
146  if (idx.size() != instance.size()+1)
147  return;
148  switch (idx[0])
149  {
150  case 0:
151  coerceValue(value, myGroup);
152  break;
153  case 1:
154  coerceValue(value, myKnifeop);
155  break;
156  case 2:
157  coerceValue(value, myOrigin);
158  break;
159  case 3:
160  coerceValue(value, myDist);
161  break;
162  case 4:
163  coerceValue(value, myDir);
164  break;
165  case 5:
166  coerceValue(value, myNewg);
167  break;
168  case 6:
169  coerceValue(value, myAbove);
170  break;
171  case 7:
172  coerceValue(value, myBelow);
173  break;
174  case 8:
175  coerceValue(value, myClippts);
176  break;
177 
178  }
179  }
180 
181  bool isParmColorRamp(exint idx) const override
182  {
183  switch (idx)
184  {
185 
186  }
187  return false;
188  }
189 
190  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
191  { doGetParmValue(idx, instance, value); }
192  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
193  { doGetParmValue(idx, instance, value); }
194  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
195  { doGetParmValue(idx, instance, value); }
196  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
197  { doGetParmValue(idx, instance, value); }
198  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
199  { doGetParmValue(idx, instance, value); }
200  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
201  { doGetParmValue(idx, instance, value); }
202  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
203  { doGetParmValue(idx, instance, value); }
204  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
205  { doGetParmValue(idx, instance, value); }
206  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
207  { doGetParmValue(idx, instance, value); }
208  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
211  { doGetParmValue(idx, instance, value); }
212 
213  template <typename T>
214  void
215  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
216  {
217  if (idx.size() < 1)
218  return;
219  UT_ASSERT(idx.size() == instance.size()+1);
220  if (idx.size() != instance.size()+1)
221  return;
222  switch (idx[0])
223  {
224  case 0:
225  coerceValue(myGroup, ( ( value ) ));
226  break;
227  case 1:
228  coerceValue(myKnifeop, clampMinValue(0, clampMaxValue(2, value ) ));
229  break;
230  case 2:
231  coerceValue(myOrigin, ( ( value ) ));
232  break;
233  case 3:
234  coerceValue(myDist, ( ( value ) ));
235  break;
236  case 4:
237  coerceValue(myDir, ( ( value ) ));
238  break;
239  case 5:
240  coerceValue(myNewg, ( ( value ) ));
241  break;
242  case 6:
243  coerceValue(myAbove, ( ( value ) ));
244  break;
245  case 7:
246  coerceValue(myBelow, ( ( value ) ));
247  break;
248  case 8:
249  coerceValue(myClippts, ( ( value ) ));
250  break;
251 
252  }
253  }
254 
255  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
256  { doSetParmValue(idx, instance, value); }
257  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
258  { doSetParmValue(idx, instance, value); }
259  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
260  { doSetParmValue(idx, instance, value); }
261  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
262  { doSetParmValue(idx, instance, value); }
263  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
264  { doSetParmValue(idx, instance, value); }
265  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
266  { doSetParmValue(idx, instance, value); }
267  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
268  { doSetParmValue(idx, instance, value); }
269  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
270  { doSetParmValue(idx, instance, value); }
271  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
272  { doSetParmValue(idx, instance, value); }
273  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
274  { doSetParmValue(idx, instance, value); }
275  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
276  { doSetParmValue(idx, instance, value); }
277 
278  exint getNestNumParms(TempIndex idx) const override
279  {
280  if (idx.size() == 0)
281  return 9;
282  switch (idx[0])
283  {
284 
285  }
286  // Invalid
287  return 0;
288  }
289 
290  const char *getNestParmName(TempIndex fieldnum) const override
291  {
292  if (fieldnum.size() < 1)
293  return 0;
294  switch (fieldnum[0])
295  {
296  case 0:
297  return "group";
298  case 1:
299  return "knifeop";
300  case 2:
301  return "origin";
302  case 3:
303  return "dist";
304  case 4:
305  return "dir";
306  case 5:
307  return "newg";
308  case 6:
309  return "above";
310  case 7:
311  return "below";
312  case 8:
313  return "clippts";
314 
315  }
316  return 0;
317  }
318 
319  ParmType getNestParmType(TempIndex fieldnum) const override
320  {
321  if (fieldnum.size() < 1)
322  return PARM_UNSUPPORTED;
323  switch (fieldnum[0])
324  {
325  case 0:
326  return PARM_STRING;
327  case 1:
328  return PARM_INTEGER;
329  case 2:
330  return PARM_VECTOR3;
331  case 3:
332  return PARM_FLOAT;
333  case 4:
334  return PARM_VECTOR3;
335  case 5:
336  return PARM_INTEGER;
337  case 6:
338  return PARM_STRING;
339  case 7:
340  return PARM_STRING;
341  case 8:
342  return PARM_INTEGER;
343 
344  }
345  return PARM_UNSUPPORTED;
346  }
347 
348  // Boiler plate to load individual types.
349  static void loadData(UT_IStream &is, int64 &v)
350  { is.bread(&v, 1); }
351  static void loadData(UT_IStream &is, bool &v)
352  { int64 iv; is.bread(&iv, 1); v = iv; }
353  static void loadData(UT_IStream &is, fpreal64 &v)
354  { is.bread<fpreal64>(&v, 1); }
355  static void loadData(UT_IStream &is, UT_Vector2D &v)
356  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
357  static void loadData(UT_IStream &is, UT_Vector3D &v)
358  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
359  is.bread<fpreal64>(&v.z(), 1); }
360  static void loadData(UT_IStream &is, UT_Vector4D &v)
361  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
362  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
363  static void loadData(UT_IStream &is, UT_Matrix2D &v)
364  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
365  static void loadData(UT_IStream &is, UT_Matrix3D &v)
366  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
367  static void loadData(UT_IStream &is, UT_Matrix4D &v)
368  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
369  static void loadData(UT_IStream &is, UT_Vector2I &v)
370  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
371  static void loadData(UT_IStream &is, UT_Vector3I &v)
372  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
373  is.bread<int64>(&v.z(), 1); }
374  static void loadData(UT_IStream &is, UT_Vector4I &v)
375  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
376  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
378  { is.bread(v); }
380  { UT_StringHolder rampdata;
381  loadData(is, rampdata);
382  if (rampdata.isstring())
383  {
384  v.reset(new UT_Ramp());
385  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
386  v->load(istr);
387  }
388  else v.reset();
389  }
392  loadData(is, data);
393  if (data.isstring())
394  {
395  // Find the data type.
396  const char *colon = UT_StringWrap(data).findChar(':');
397  if (colon)
398  {
399  int typelen = colon - data.buffer();
401  type.strncpy(data.buffer(), typelen);
402  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
403 
404  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
405  }
406  }
407  else v.reset();
408  }
409 
410  static void saveData(std::ostream &os, int64 v)
411  { UTwrite(os, &v); }
412  static void saveData(std::ostream &os, bool v)
413  { int64 iv = v; UTwrite(os, &iv); }
414  static void saveData(std::ostream &os, fpreal64 v)
415  { UTwrite<fpreal64>(os, &v); }
416  static void saveData(std::ostream &os, UT_Vector2D v)
417  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
418  static void saveData(std::ostream &os, UT_Vector3D v)
419  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
420  UTwrite<fpreal64>(os, &v.z()); }
421  static void saveData(std::ostream &os, UT_Vector4D v)
422  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
423  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
424  static void saveData(std::ostream &os, UT_Matrix2D v)
426  static void saveData(std::ostream &os, UT_Matrix3D v)
428  static void saveData(std::ostream &os, UT_Matrix4D v)
430  static void saveData(std::ostream &os, UT_StringHolder s)
431  { UT_StringWrap(s).saveBinary(os); }
432  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
434  UT_OStringStream ostr;
435  if (s) s->save(ostr);
436  result = ostr.str();
437  saveData(os, result);
438  }
439  static void saveData(std::ostream &os, PRM_DataItemHandle s)
441  UT_OStringStream ostr;
442  if (s)
443  {
444  ostr << s->getDataTypeToken();
445  ostr << ":";
446  s->saveBinary(ostr);
447  }
448  result = ostr.str();
449  saveData(os, result);
450  }
451 
452 
453  void save(std::ostream &os) const
454  {
455  int32 v = version();
456  UTwrite(os, &v);
457  saveData(os, myGroup);
458  saveData(os, myKnifeop);
459  saveData(os, myOrigin);
460  saveData(os, myDist);
461  saveData(os, myDir);
462  saveData(os, myNewg);
463  saveData(os, myAbove);
464  saveData(os, myBelow);
465  saveData(os, myClippts);
466 
467  }
468 
469  bool load(UT_IStream &is)
470  {
471  int32 v;
472  is.bread(&v, 1);
473  if (version() != v)
474  {
475  // Fail incompatible versions
476  return false;
477  }
478  loadData(is, myGroup);
479  loadData(is, myKnifeop);
480  loadData(is, myOrigin);
481  loadData(is, myDist);
482  loadData(is, myDir);
483  loadData(is, myNewg);
484  loadData(is, myAbove);
485  loadData(is, myBelow);
486  loadData(is, myClippts);
487 
488  return true;
489  }
490 
491  const UT_StringHolder & getGroup() const { return myGroup; }
492  void setGroup(const UT_StringHolder & val) { myGroup = val; }
494  {
495  SOP_Node *thissop = cookparms.getNode();
496  if (!thissop) return getGroup();
498  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
499  return result;
500  }
501  Knifeop getKnifeop() const { return Knifeop(myKnifeop); }
502  void setKnifeop(Knifeop val) { myKnifeop = int64(val); }
503  Knifeop opKnifeop(const SOP_NodeVerb::CookParms &cookparms) const
504  {
505  SOP_Node *thissop = cookparms.getNode();
506  if (!thissop) return getKnifeop();
507  int64 result;
508  OP_Utils::evalOpParm(result, thissop, "knifeop", cookparms.getCookTime(), 0);
509  return Knifeop(result);
510  }
511  UT_Vector3D getOrigin() const { return myOrigin; }
512  void setOrigin(UT_Vector3D val) { myOrigin = val; }
514  {
515  SOP_Node *thissop = cookparms.getNode();
516  if (!thissop) return getOrigin();
518  OP_Utils::evalOpParm(result, thissop, "origin", cookparms.getCookTime(), 0);
519  return result;
520  }
521  fpreal64 getDist() const { return myDist; }
522  void setDist(fpreal64 val) { myDist = val; }
523  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
524  {
525  SOP_Node *thissop = cookparms.getNode();
526  if (!thissop) return getDist();
528  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
529  return result;
530  }
531  UT_Vector3D getDir() const { return myDir; }
532  void setDir(UT_Vector3D val) { myDir = val; }
533  UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
534  {
535  SOP_Node *thissop = cookparms.getNode();
536  if (!thissop) return getDir();
538  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
539  return result;
540  }
541  bool getNewg() const { return myNewg; }
542  void setNewg(bool val) { myNewg = val; }
543  bool opNewg(const SOP_NodeVerb::CookParms &cookparms) const
544  {
545  SOP_Node *thissop = cookparms.getNode();
546  if (!thissop) return getNewg();
547  bool result;
548  OP_Utils::evalOpParm(result, thissop, "newg", cookparms.getCookTime(), 0);
549  return result;
550  }
551  const UT_StringHolder & getAbove() const { return myAbove; }
552  void setAbove(const UT_StringHolder & val) { myAbove = val; }
554  {
555  SOP_Node *thissop = cookparms.getNode();
556  if (!thissop) return getAbove();
558  OP_Utils::evalOpParm(result, thissop, "above", cookparms.getCookTime(), 0);
559  return result;
560  }
561  const UT_StringHolder & getBelow() const { return myBelow; }
562  void setBelow(const UT_StringHolder & val) { myBelow = val; }
564  {
565  SOP_Node *thissop = cookparms.getNode();
566  if (!thissop) return getBelow();
568  OP_Utils::evalOpParm(result, thissop, "below", cookparms.getCookTime(), 0);
569  return result;
570  }
571  bool getClippts() const { return myClippts; }
572  void setClippts(bool val) { myClippts = val; }
573  bool opClippts(const SOP_NodeVerb::CookParms &cookparms) const
574  {
575  SOP_Node *thissop = cookparms.getNode();
576  if (!thissop) return getClippts();
577  bool result;
578  OP_Utils::evalOpParm(result, thissop, "clippts", cookparms.getCookTime(), 0);
579  return result;
580  }
581 
582 private:
583  UT_StringHolder myGroup;
584  int64 myKnifeop;
585  UT_Vector3D myOrigin;
586  fpreal64 myDist;
587  UT_Vector3D myDir;
588  bool myNewg;
589  UT_StringHolder myAbove;
590  UT_StringHolder myBelow;
591  bool myClippts;
592 
593 };
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix3D v)
fpreal64 getDist() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool getClippts() const
void setKnifeop(Knifeop val)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNewg(bool val)
static void saveData(std::ostream &os, int64 v)
static int version()
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, int64 &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_Matrix4D v)
const GLdouble * v
Definition: glcorearb.h:837
bool getNewg() const
fpreal getTime() const
Definition: OP_Context.h:62
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool operator==(const SOP_KnifeParms &src) const
static void saveData(std::ostream &os, UT_Vector2D v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE const char * buffer() const
UT_Vector3D getOrigin() const
GLdouble s
Definition: glad.h:3009
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
**But if you need a result
Definition: thread.h:613
const char * getNestParmName(TempIndex fieldnum) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Knifeop enum_value)
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 setOrigin(UT_Vector3D val)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Matrix4D &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, UT_SharedPtr< UT_Ramp > &value) const override
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator!=(const SOP_KnifeParms &src) const
static void saveData(std::ostream &os, bool v)
void setBelow(const UT_StringHolder &val)
exint length() 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
const UT_StringHolder & getGroup() const
Knifeop getKnifeop() const
static void loadData(UT_IStream &is, bool &v)
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_Vector3T< fpreal64 > UT_Vector3D
void setAbove(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
GT_API const UT_StringHolder version
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opAbove(const SOP_NodeVerb::CookParms &cookparms) const
void setDist(fpreal64 val)
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
bool opNewg(const SOP_NodeVerb::CookParms &cookparms) const
bool opClippts(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setDir(UT_Vector3D val)
Knifeop opKnifeop(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
UT_Vector3D getDir() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
const UT_StringHolder & getAbove() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const 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
void setClippts(bool val)
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
UT_StringHolder opBelow(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getBelow() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool isParmColorRamp(exint idx) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663