HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Remesh.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_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myGroup = ""_sh;
32  myHard_edges = ""_sh;
33  myIterations = 1;
34  myRecompute_normals = false;
35  mySmoothing_level = 0;
36  myTarget_edge = 0.2;
37  myInput_pts_only = false;
38  myElement_sizing = 0;
39  myGradation = 0.25;
40  myDensity = 1;
41  myLimit_below = false;
42  myMin_edge_length = 1e-05;
43  myLimit_above = false;
44  myMax_edge_length = 10000;
45  myLfs_only = false;
46  myVisualize_lfs = false;
47  myLfs_ramp = UT_SharedPtr<UT_Ramp>(0);
48 
49  }
50 
51  explicit SOP_RemeshParms(const SOP_RemeshParms &) = default;
52 
53  ~SOP_RemeshParms() override {}
54 
55  bool operator==(const SOP_RemeshParms &src) const
56  {
57  if (myGroup != src.myGroup) return false;
58  if (myHard_edges != src.myHard_edges) return false;
59  if (myIterations != src.myIterations) return false;
60  if (myRecompute_normals != src.myRecompute_normals) return false;
61  if (mySmoothing_level != src.mySmoothing_level) return false;
62  if (myTarget_edge != src.myTarget_edge) return false;
63  if (myInput_pts_only != src.myInput_pts_only) return false;
64  if (myElement_sizing != src.myElement_sizing) return false;
65  if (myGradation != src.myGradation) return false;
66  if (myDensity != src.myDensity) return false;
67  if (myLimit_below != src.myLimit_below) return false;
68  if (myMin_edge_length != src.myMin_edge_length) return false;
69  if (myLimit_above != src.myLimit_above) return false;
70  if (myMax_edge_length != src.myMax_edge_length) return false;
71  if (myLfs_only != src.myLfs_only) return false;
72  if (myVisualize_lfs != src.myVisualize_lfs) return false;
73  if (myLfs_ramp != src.myLfs_ramp) return false;
74 
75  return true;
76  }
77  bool operator!=(const SOP_RemeshParms &src) const
78  {
79  return !operator==(src);
80  }
81 
82 
83 
84  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
85  {
86  myGroup = ""_sh;
87  if (true)
88  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
89  myHard_edges = ""_sh;
90  if (true)
91  graph->evalOpParm(myHard_edges, nodeidx, "hard_edges", time, 0);
92  myIterations = 1;
93  if (true)
94  graph->evalOpParm(myIterations, nodeidx, "iterations", time, 0);
95  myRecompute_normals = false;
96  if (true)
97  graph->evalOpParm(myRecompute_normals, nodeidx, "recompute_normals", time, 0);
98  mySmoothing_level = 0;
99  if (true)
100  graph->evalOpParm(mySmoothing_level, nodeidx, "smoothing_level", time, 0);
101  myTarget_edge = 0.2;
102  if (true)
103  graph->evalOpParm(myTarget_edge, nodeidx, "target_edge", time, 0);
104  myInput_pts_only = false;
105  if (true)
106  graph->evalOpParm(myInput_pts_only, nodeidx, "input_pts_only", time, 0);
107  myElement_sizing = 0;
108  if (true)
109  graph->evalOpParm(myElement_sizing, nodeidx, "element_sizing", time, 0);
110  myGradation = 0.25;
111  if (true)
112  graph->evalOpParm(myGradation, nodeidx, "gradation", time, 0);
113  myDensity = 1;
114  if (true)
115  graph->evalOpParm(myDensity, nodeidx, "density", time, 0);
116  myLimit_below = false;
117  if (true)
118  graph->evalOpParm(myLimit_below, nodeidx, "limit_below", time, 0);
119  myMin_edge_length = 1e-05;
120  if (true && ( (!(((getLimit_below()==0)))) ) )
121  graph->evalOpParm(myMin_edge_length, nodeidx, "min_edge_length", time, 0);
122  myLimit_above = false;
123  if (true)
124  graph->evalOpParm(myLimit_above, nodeidx, "limit_above", time, 0);
125  myMax_edge_length = 10000;
126  if (true && ( (!(((getLimit_above()==0)))) ) )
127  graph->evalOpParm(myMax_edge_length, nodeidx, "max_edge_length", time, 0);
128  myLfs_only = false;
129  if (true)
130  graph->evalOpParm(myLfs_only, nodeidx, "lfs_only", time, 0);
131  myVisualize_lfs = false;
132  if (true)
133  graph->evalOpParm(myVisualize_lfs, nodeidx, "visualize_lfs", time, 0);
134  myLfs_ramp = UT_SharedPtr<UT_Ramp>(0);
135  if (true && ( (!(((getVisualize_lfs()==0)))) ) )
136  graph->evalOpParm(myLfs_ramp, nodeidx, "lfs_ramp", time, 0);
137 
138  }
139 
140 
141  void loadFromOpSubclass(const LoadParms &loadparms) override
142  {
143  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
144  }
145 
146 
147  void copyFrom(const SOP_NodeParms *src) override
148  {
149  *this = *((const SOP_RemeshParms *)src);
150  }
151 
152  template <typename T>
153  void
154  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
155  {
156  if (idx.size() < 1)
157  return;
158  UT_ASSERT(idx.size() == instance.size()+1);
159  if (idx.size() != instance.size()+1)
160  return;
161  switch (idx[0])
162  {
163  case 0:
164  coerceValue(value, myGroup);
165  break;
166  case 1:
167  coerceValue(value, myHard_edges);
168  break;
169  case 2:
170  coerceValue(value, myIterations);
171  break;
172  case 3:
173  coerceValue(value, myRecompute_normals);
174  break;
175  case 4:
176  coerceValue(value, mySmoothing_level);
177  break;
178  case 5:
179  coerceValue(value, myTarget_edge);
180  break;
181  case 6:
182  coerceValue(value, myInput_pts_only);
183  break;
184  case 7:
185  coerceValue(value, myElement_sizing);
186  break;
187  case 8:
188  coerceValue(value, myGradation);
189  break;
190  case 9:
191  coerceValue(value, myDensity);
192  break;
193  case 10:
194  coerceValue(value, myLimit_below);
195  break;
196  case 11:
197  coerceValue(value, myMin_edge_length);
198  break;
199  case 12:
200  coerceValue(value, myLimit_above);
201  break;
202  case 13:
203  coerceValue(value, myMax_edge_length);
204  break;
205  case 14:
206  coerceValue(value, myLfs_only);
207  break;
208  case 15:
209  coerceValue(value, myVisualize_lfs);
210  break;
211  case 16:
212  coerceValue(value, myLfs_ramp);
213  break;
214 
215  }
216  }
217 
218  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
239  { doGetParmValue(idx, instance, value); }
240 
241  template <typename T>
242  void
243  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
244  {
245  if (idx.size() < 1)
246  return;
247  UT_ASSERT(idx.size() == instance.size()+1);
248  if (idx.size() != instance.size()+1)
249  return;
250  switch (idx[0])
251  {
252  case 0:
253  coerceValue(myGroup, value);
254  break;
255  case 1:
256  coerceValue(myHard_edges, value);
257  break;
258  case 2:
259  coerceValue(myIterations, value);
260  break;
261  case 3:
262  coerceValue(myRecompute_normals, value);
263  break;
264  case 4:
265  coerceValue(mySmoothing_level, value);
266  break;
267  case 5:
268  coerceValue(myTarget_edge, value);
269  break;
270  case 6:
271  coerceValue(myInput_pts_only, value);
272  break;
273  case 7:
274  coerceValue(myElement_sizing, value);
275  break;
276  case 8:
277  coerceValue(myGradation, value);
278  break;
279  case 9:
280  coerceValue(myDensity, value);
281  break;
282  case 10:
283  coerceValue(myLimit_below, value);
284  break;
285  case 11:
286  coerceValue(myMin_edge_length, value);
287  break;
288  case 12:
289  coerceValue(myLimit_above, value);
290  break;
291  case 13:
292  coerceValue(myMax_edge_length, value);
293  break;
294  case 14:
295  coerceValue(myLfs_only, value);
296  break;
297  case 15:
298  coerceValue(myVisualize_lfs, value);
299  break;
300  case 16:
301  coerceValue(myLfs_ramp, value);
302  break;
303 
304  }
305  }
306 
307  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
328  { doSetParmValue(idx, instance, value); }
329 
330  exint getNestNumParms(TempIndex idx) const override
331  {
332  if (idx.size() == 0)
333  return 17;
334  switch (idx[0])
335  {
336 
337  }
338  // Invalid
339  return 0;
340  }
341 
342  const char *getNestParmName(TempIndex fieldnum) const override
343  {
344  if (fieldnum.size() < 1)
345  return 0;
346  switch (fieldnum[0])
347  {
348  case 0:
349  return "group";
350  case 1:
351  return "hard_edges";
352  case 2:
353  return "iterations";
354  case 3:
355  return "recompute_normals";
356  case 4:
357  return "smoothing_level";
358  case 5:
359  return "target_edge";
360  case 6:
361  return "input_pts_only";
362  case 7:
363  return "element_sizing";
364  case 8:
365  return "gradation";
366  case 9:
367  return "density";
368  case 10:
369  return "limit_below";
370  case 11:
371  return "min_edge_length";
372  case 12:
373  return "limit_above";
374  case 13:
375  return "max_edge_length";
376  case 14:
377  return "lfs_only";
378  case 15:
379  return "visualize_lfs";
380  case 16:
381  return "lfs_ramp";
382 
383  }
384  return 0;
385  }
386 
387  ParmType getNestParmType(TempIndex fieldnum) const override
388  {
389  if (fieldnum.size() < 1)
390  return PARM_UNSUPPORTED;
391  switch (fieldnum[0])
392  {
393  case 0:
394  return PARM_STRING;
395  case 1:
396  return PARM_STRING;
397  case 2:
398  return PARM_INTEGER;
399  case 3:
400  return PARM_INTEGER;
401  case 4:
402  return PARM_FLOAT;
403  case 5:
404  return PARM_FLOAT;
405  case 6:
406  return PARM_INTEGER;
407  case 7:
408  return PARM_INTEGER;
409  case 8:
410  return PARM_FLOAT;
411  case 9:
412  return PARM_FLOAT;
413  case 10:
414  return PARM_INTEGER;
415  case 11:
416  return PARM_FLOAT;
417  case 12:
418  return PARM_INTEGER;
419  case 13:
420  return PARM_FLOAT;
421  case 14:
422  return PARM_INTEGER;
423  case 15:
424  return PARM_INTEGER;
425  case 16:
426  return PARM_RAMP;
427 
428  }
429  return PARM_UNSUPPORTED;
430  }
431 
432  // Boiler plate to load individual types.
433  static void loadData(UT_IStream &is, int64 &v)
434  { is.bread(&v, 1); }
435  static void loadData(UT_IStream &is, bool &v)
436  { int64 iv; is.bread(&iv, 1); v = iv; }
437  static void loadData(UT_IStream &is, fpreal64 &v)
438  { is.bread<fpreal64>(&v, 1); }
439  static void loadData(UT_IStream &is, UT_Vector2D &v)
440  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
441  static void loadData(UT_IStream &is, UT_Vector3D &v)
442  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
443  is.bread<fpreal64>(&v.z(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector4D &v)
445  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
446  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
447  static void loadData(UT_IStream &is, UT_Matrix2D &v)
448  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
449  static void loadData(UT_IStream &is, UT_Matrix3D &v)
450  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
451  static void loadData(UT_IStream &is, UT_Matrix4D &v)
452  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
453  static void loadData(UT_IStream &is, UT_Vector2I &v)
454  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
455  static void loadData(UT_IStream &is, UT_Vector3I &v)
456  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
457  is.bread<int64>(&v.z(), 1); }
458  static void loadData(UT_IStream &is, UT_Vector4I &v)
459  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
460  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
462  { is.bread(v); }
464  { UT_StringHolder rampdata;
465  loadData(is, rampdata);
466  if (rampdata.isstring())
467  {
468  v.reset(new UT_Ramp());
469  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
470  v->load(istr);
471  }
472  else v.reset();
473  }
476  loadData(is, data);
477  if (data.isstring())
478  {
479  // Find the data type.
480  const char *colon = UT_StringWrap(data).findChar(':');
481  if (colon)
482  {
483  int typelen = colon - data.buffer();
485  type.strncpy(data.buffer(), typelen);
486  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
487 
488  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
489  }
490  }
491  else v.reset();
492  }
493 
494  static void saveData(std::ostream &os, int64 v)
495  { UTwrite(os, &v); }
496  static void saveData(std::ostream &os, bool v)
497  { int64 iv = v; UTwrite(os, &iv); }
498  static void saveData(std::ostream &os, fpreal64 v)
499  { UTwrite<fpreal64>(os, &v); }
500  static void saveData(std::ostream &os, UT_Vector2D v)
501  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
502  static void saveData(std::ostream &os, UT_Vector3D v)
503  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
504  UTwrite<fpreal64>(os, &v.z()); }
505  static void saveData(std::ostream &os, UT_Vector4D v)
506  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
507  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
508  static void saveData(std::ostream &os, UT_Matrix2D v)
510  static void saveData(std::ostream &os, UT_Matrix3D v)
512  static void saveData(std::ostream &os, UT_Matrix4D v)
514  static void saveData(std::ostream &os, UT_StringHolder s)
515  { UT_StringWrap(s).saveBinary(os); }
516  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
518  UT_OStringStream ostr;
519  if (s) s->save(ostr);
520  result = ostr.str();
521  saveData(os, result);
522  }
523  static void saveData(std::ostream &os, PRM_DataItemHandle s)
525  UT_OStringStream ostr;
526  if (s)
527  {
528  ostr << s->getDataTypeToken();
529  ostr << ":";
530  s->saveBinary(ostr);
531  }
532  result = ostr.str();
533  saveData(os, result);
534  }
535 
536 
537  void save(std::ostream &os) const
538  {
539  int32 v = version();
540  UTwrite(os, &v);
541  saveData(os, myGroup);
542  saveData(os, myHard_edges);
543  saveData(os, myIterations);
544  saveData(os, myRecompute_normals);
545  saveData(os, mySmoothing_level);
546  saveData(os, myTarget_edge);
547  saveData(os, myInput_pts_only);
548  saveData(os, myElement_sizing);
549  saveData(os, myGradation);
550  saveData(os, myDensity);
551  saveData(os, myLimit_below);
552  saveData(os, myMin_edge_length);
553  saveData(os, myLimit_above);
554  saveData(os, myMax_edge_length);
555  saveData(os, myLfs_only);
556  saveData(os, myVisualize_lfs);
557  saveData(os, myLfs_ramp);
558 
559  }
560 
561  bool load(UT_IStream &is)
562  {
563  int32 v;
564  is.bread(&v, 1);
565  if (version() != v)
566  {
567  // Fail incompatible versions
568  return false;
569  }
570  loadData(is, myGroup);
571  loadData(is, myHard_edges);
572  loadData(is, myIterations);
573  loadData(is, myRecompute_normals);
574  loadData(is, mySmoothing_level);
575  loadData(is, myTarget_edge);
576  loadData(is, myInput_pts_only);
577  loadData(is, myElement_sizing);
578  loadData(is, myGradation);
579  loadData(is, myDensity);
580  loadData(is, myLimit_below);
581  loadData(is, myMin_edge_length);
582  loadData(is, myLimit_above);
583  loadData(is, myMax_edge_length);
584  loadData(is, myLfs_only);
585  loadData(is, myVisualize_lfs);
586  loadData(is, myLfs_ramp);
587 
588  return true;
589  }
590 
591  const UT_StringHolder & getGroup() const { return myGroup; }
592  void setGroup(const UT_StringHolder & val) { myGroup = val; }
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return getGroup();
598  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
599  return result;
600  }
601  const UT_StringHolder & getHard_edges() const { return myHard_edges; }
602  void setHard_edges(const UT_StringHolder & val) { myHard_edges = val; }
604  {
605  SOP_Node *thissop = cookparms.getNode();
606  if (!thissop) return getHard_edges();
608  OP_Utils::evalOpParm(result, thissop, "hard_edges", cookparms.getCookTime(), 0);
609  return result;
610  }
611  int64 getIterations() const { return myIterations; }
612  void setIterations(int64 val) { myIterations = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getIterations();
617  int64 result;
618  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
619  return result;
620  }
621  bool getRecompute_normals() const { return myRecompute_normals; }
622  void setRecompute_normals(bool val) { myRecompute_normals = val; }
623  bool opRecompute_normals(const SOP_NodeVerb::CookParms &cookparms) const
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getRecompute_normals();
627  bool result;
628  OP_Utils::evalOpParm(result, thissop, "recompute_normals", cookparms.getCookTime(), 0);
629  return result;
630  }
631  fpreal64 getSmoothing_level() const { return mySmoothing_level; }
632  void setSmoothing_level(fpreal64 val) { mySmoothing_level = val; }
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getSmoothing_level();
638  OP_Utils::evalOpParm(result, thissop, "smoothing_level", cookparms.getCookTime(), 0);
639  return result;
640  }
641  fpreal64 getTarget_edge() const { return myTarget_edge; }
642  void setTarget_edge(fpreal64 val) { myTarget_edge = val; }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getTarget_edge();
648  OP_Utils::evalOpParm(result, thissop, "target_edge", cookparms.getCookTime(), 0);
649  return result;
650  }
651  bool getInput_pts_only() const { return myInput_pts_only; }
652  void setInput_pts_only(bool val) { myInput_pts_only = val; }
653  bool opInput_pts_only(const SOP_NodeVerb::CookParms &cookparms) const
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getInput_pts_only();
657  bool result;
658  OP_Utils::evalOpParm(result, thissop, "input_pts_only", cookparms.getCookTime(), 0);
659  return result;
660  }
661  int64 getElement_sizing() const { return myElement_sizing; }
662  void setElement_sizing(int64 val) { myElement_sizing = val; }
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getElement_sizing();
667  int64 result;
668  OP_Utils::evalOpParm(result, thissop, "element_sizing", cookparms.getCookTime(), 0);
669  return result;
670  }
671  fpreal64 getGradation() const { return myGradation; }
672  void setGradation(fpreal64 val) { myGradation = val; }
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getGradation();
678  OP_Utils::evalOpParm(result, thissop, "gradation", cookparms.getCookTime(), 0);
679  return result;
680  }
681  fpreal64 getDensity() const { return myDensity; }
682  void setDensity(fpreal64 val) { myDensity = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getDensity();
688  OP_Utils::evalOpParm(result, thissop, "density", cookparms.getCookTime(), 0);
689  return result;
690  }
691  bool getLimit_below() const { return myLimit_below; }
692  void setLimit_below(bool val) { myLimit_below = val; }
693  bool opLimit_below(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getLimit_below();
697  bool result;
698  OP_Utils::evalOpParm(result, thissop, "limit_below", cookparms.getCookTime(), 0);
699  return result;
700  }
701  fpreal64 getMin_edge_length() const { return myMin_edge_length; }
702  void setMin_edge_length(fpreal64 val) { myMin_edge_length = val; }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getMin_edge_length();
708  OP_Utils::evalOpParm(result, thissop, "min_edge_length", cookparms.getCookTime(), 0);
709  return result;
710  }
711  bool getLimit_above() const { return myLimit_above; }
712  void setLimit_above(bool val) { myLimit_above = val; }
713  bool opLimit_above(const SOP_NodeVerb::CookParms &cookparms) const
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getLimit_above();
717  bool result;
718  OP_Utils::evalOpParm(result, thissop, "limit_above", cookparms.getCookTime(), 0);
719  return result;
720  }
721  fpreal64 getMax_edge_length() const { return myMax_edge_length; }
722  void setMax_edge_length(fpreal64 val) { myMax_edge_length = val; }
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getMax_edge_length();
728  OP_Utils::evalOpParm(result, thissop, "max_edge_length", cookparms.getCookTime(), 0);
729  return result;
730  }
731  bool getLfs_only() const { return myLfs_only; }
732  void setLfs_only(bool val) { myLfs_only = val; }
733  bool opLfs_only(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getLfs_only();
737  bool result;
738  OP_Utils::evalOpParm(result, thissop, "lfs_only", cookparms.getCookTime(), 0);
739  return result;
740  }
741  bool getVisualize_lfs() const { return myVisualize_lfs; }
742  void setVisualize_lfs(bool val) { myVisualize_lfs = val; }
743  bool opVisualize_lfs(const SOP_NodeVerb::CookParms &cookparms) const
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getVisualize_lfs();
747  bool result;
748  OP_Utils::evalOpParm(result, thissop, "visualize_lfs", cookparms.getCookTime(), 0);
749  return result;
750  }
751  UT_SharedPtr<UT_Ramp> getLfs_ramp() const { return myLfs_ramp; }
752  void setLfs_ramp(UT_SharedPtr<UT_Ramp> val) { myLfs_ramp = val; }
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getLfs_ramp();
758  OP_Utils::evalOpParm(result, thissop, "lfs_ramp", cookparms.getCookTime(), 0);
759  return result;
760  }
761 
762 private:
763  UT_StringHolder myGroup;
764  UT_StringHolder myHard_edges;
765  int64 myIterations;
766  bool myRecompute_normals;
767  fpreal64 mySmoothing_level;
768  fpreal64 myTarget_edge;
769  bool myInput_pts_only;
770  int64 myElement_sizing;
771  fpreal64 myGradation;
772  fpreal64 myDensity;
773  bool myLimit_below;
774  fpreal64 myMin_edge_length;
775  bool myLimit_above;
776  fpreal64 myMax_edge_length;
777  bool myLfs_only;
778  bool myVisualize_lfs;
779  UT_SharedPtr<UT_Ramp> myLfs_ramp;
780 
781 };
void setRecompute_normals(bool val)
GLdouble s
Definition: glew.h:1390
static void loadData(UT_IStream &is, UT_StringHolder &v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool getRecompute_normals() const
fpreal64 opSmoothing_level(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setLimit_above(bool val)
int64 getIterations() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool opVisualize_lfs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
exint bread(int32 *buffer, exint asize=1)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLuint const GLfloat * val
Definition: glew.h:2794
void setElement_sizing(int64 val)
fpreal64 getGradation() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
int64 exint
Definition: SYS_Types.h:125
void setLimit_below(bool val)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
bool operator==(const SOP_RemeshParms &src) const
An output stream object that owns its own string buffer storage.
const GLdouble * v
Definition: glew.h:1391
void setVisualize_lfs(bool val)
int64 getElement_sizing() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void save(std::ostream &os) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool opLimit_above(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opHard_edges(const SOP_NodeVerb::CookParms &cookparms) const
void setMax_edge_length(fpreal64 val)
double fpreal64
Definition: SYS_Types.h:201
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setHard_edges(const UT_StringHolder &val)
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, int64 &v)
void setSmoothing_level(fpreal64 val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal64 getTarget_edge() const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setGradation(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
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:28
bool getLimit_above() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void setIterations(int64 val)
fpreal64 getDensity() const
fpreal64 getMin_edge_length() const
void setGroup(const UT_StringHolder &val)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
UT_SharedPtr< UT_Ramp > getLfs_ramp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const GLfloat * c
Definition: glew.h:16296
void setLfs_only(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getGroup() const
long long int64
Definition: SYS_Types.h:116
static void saveData(std::ostream &os, fpreal64 v)
int64 opElement_sizing(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setLfs_ramp(UT_SharedPtr< UT_Ramp > val)
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 opMin_edge_length(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
fpreal64 getMax_edge_length() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
fpreal64 opGradation(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
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool opLimit_below(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const SOP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool opLfs_only(const SOP_NodeVerb::CookParms &cookparms) const
void setTarget_edge(fpreal64 val)
fpreal64 opDensity(const SOP_NodeVerb::CookParms &cookparms) const
bool getInput_pts_only() const
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 fpreal
Definition: SYS_Types.h:277
void setDensity(fpreal64 val)
fpreal64 opMax_edge_length(const SOP_NodeVerb::CookParms &cookparms) const
void setMin_edge_length(fpreal64 val)
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal64 opTarget_edge(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setInput_pts_only(bool val)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
static void saveData(std::ostream &os, UT_Matrix4D v)
#define SOP_API
Definition: SOP_API.h:10
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool getVisualize_lfs() const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
bool operator!=(const SOP_RemeshParms &src) const
static void saveData(std::ostream &os, UT_Vector3D v)
GLuint64EXT * result
Definition: glew.h:14007
bool getLfs_only() const
static int version()
UT_SharedPtr< UT_Ramp > opLfs_ramp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, bool &v)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
const UT_StringHolder & getHard_edges() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
~SOP_RemeshParms() override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool getLimit_below() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLsizei const GLfloat * value
Definition: glew.h:1849
static void loadData(UT_IStream &is, UT_Vector4D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
exint getNestNumParms(TempIndex idx) const override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE bool isstring() const
bool opInput_pts_only(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
bool opRecompute_normals(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSmoothing_level() const