32 myHard_edges =
""_UTsh;
34 myRecompute_normals =
false;
35 mySmoothing_level = 0;
37 myInput_pts_only =
false;
41 myLimit_below =
false;
42 myMin_edge_length = 1e-05;
43 myLimit_above =
false;
44 myMax_edge_length = 10000;
46 myVisualize_lfs =
false;
60 if (myGroup != src.myGroup)
return false;
61 if (myHard_edges != src.myHard_edges)
return false;
62 if (myIterations != src.myIterations)
return false;
63 if (myRecompute_normals != src.myRecompute_normals)
return false;
64 if (mySmoothing_level != src.mySmoothing_level)
return false;
65 if (myTarget_edge != src.myTarget_edge)
return false;
66 if (myInput_pts_only != src.myInput_pts_only)
return false;
67 if (myElement_sizing != src.myElement_sizing)
return false;
68 if (myGradation != src.myGradation)
return false;
69 if (myDensity != src.myDensity)
return false;
70 if (myLimit_below != src.myLimit_below)
return false;
71 if (myMin_edge_length != src.myMin_edge_length)
return false;
72 if (myLimit_above != src.myLimit_above)
return false;
73 if (myMax_edge_length != src.myMax_edge_length)
return false;
74 if (myLfs_only != src.myLfs_only)
return false;
75 if (myVisualize_lfs != src.myVisualize_lfs)
return false;
76 if (myLfs_ramp != src.myLfs_ramp)
77 {
if (!myLfs_ramp || !src.myLfs_ramp || !(*myLfs_ramp == *src.myLfs_ramp))
return false; }
92 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
93 myHard_edges =
""_UTsh;
95 graph->
evalOpParm(myHard_edges, nodeidx,
"hard_edges", time, 0);
98 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, 0);
99 myRecompute_normals =
false;
101 graph->
evalOpParm(myRecompute_normals, nodeidx,
"recompute_normals", time, 0);
102 mySmoothing_level = 0;
104 graph->
evalOpParm(mySmoothing_level, nodeidx,
"smoothing_level", time, 0);
107 graph->
evalOpParm(myTarget_edge, nodeidx,
"target_edge", time, 0);
108 myInput_pts_only =
false;
110 graph->
evalOpParm(myInput_pts_only, nodeidx,
"input_pts_only", time, 0);
111 myElement_sizing = 0;
113 graph->
evalOpParm(myElement_sizing, nodeidx,
"element_sizing", time, 0);
116 graph->
evalOpParm(myGradation, nodeidx,
"gradation", time, 0);
119 graph->
evalOpParm(myDensity, nodeidx,
"density", time, 0);
120 myLimit_below =
false;
122 graph->
evalOpParm(myLimit_below, nodeidx,
"limit_below", time, 0);
123 myMin_edge_length = 1e-05;
124 if (
true && ( (
true&&!(((getLimit_below()==0)))) ) )
125 graph->
evalOpParm(myMin_edge_length, nodeidx,
"min_edge_length", time, 0);
126 myLimit_above =
false;
128 graph->
evalOpParm(myLimit_above, nodeidx,
"limit_above", time, 0);
129 myMax_edge_length = 10000;
130 if (
true && ( (
true&&!(((getLimit_above()==0)))) ) )
131 graph->
evalOpParm(myMax_edge_length, nodeidx,
"max_edge_length", time, 0);
134 graph->
evalOpParm(myLfs_only, nodeidx,
"lfs_only", time, 0);
135 myVisualize_lfs =
false;
137 graph->
evalOpParm(myVisualize_lfs, nodeidx,
"visualize_lfs", time, 0);
139 if (
true && ( (
true&&!(((getVisualize_lfs()==0)))) ) )
140 graph->
evalOpParm(myLfs_ramp, nodeidx,
"lfs_ramp", time, 0);
156 template <
typename T>
163 if (idx.
size() != instance.
size()+1)
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 template <
typename T>
262 if (idx.
size() != instance.
size()+1)
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
326 { doSetParmValue(idx, instance, value); }
328 { doSetParmValue(idx, instance, value); }
330 { doSetParmValue(idx, instance, value); }
332 { doSetParmValue(idx, instance, value); }
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
342 { doSetParmValue(idx, instance, value); }
358 if (fieldnum.
size() < 1)
369 return "recompute_normals";
371 return "smoothing_level";
373 return "target_edge";
375 return "input_pts_only";
377 return "element_sizing";
383 return "limit_below";
385 return "min_edge_length";
387 return "limit_above";
389 return "max_edge_length";
393 return "visualize_lfs";
403 if (fieldnum.
size() < 1)
404 return PARM_UNSUPPORTED;
479 loadData(is, rampdata);
497 int typelen = colon - data.
buffer();
511 {
int64 iv =
v; UTwrite(os, &iv); }
513 { UTwrite<fpreal64>(os, &
v); }
515 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
517 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
518 UTwrite<fpreal64>(os, &v.
z()); }
520 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
521 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
533 if (s) s->save(ostr);
535 saveData(os, result);
542 ostr << s->getDataTypeToken();
547 saveData(os, result);
551 void save(std::ostream &os)
const
555 saveData(os, myGroup);
556 saveData(os, myHard_edges);
557 saveData(os, myIterations);
558 saveData(os, myRecompute_normals);
559 saveData(os, mySmoothing_level);
560 saveData(os, myTarget_edge);
561 saveData(os, myInput_pts_only);
562 saveData(os, myElement_sizing);
563 saveData(os, myGradation);
564 saveData(os, myDensity);
565 saveData(os, myLimit_below);
566 saveData(os, myMin_edge_length);
567 saveData(os, myLimit_above);
568 saveData(os, myMax_edge_length);
569 saveData(os, myLfs_only);
570 saveData(os, myVisualize_lfs);
571 saveData(os, myLfs_ramp);
584 loadData(is, myGroup);
585 loadData(is, myHard_edges);
586 loadData(is, myIterations);
587 loadData(is, myRecompute_normals);
588 loadData(is, mySmoothing_level);
589 loadData(is, myTarget_edge);
590 loadData(is, myInput_pts_only);
591 loadData(is, myElement_sizing);
592 loadData(is, myGradation);
593 loadData(is, myDensity);
594 loadData(is, myLimit_below);
595 loadData(is, myMin_edge_length);
596 loadData(is, myLimit_above);
597 loadData(is, myMax_edge_length);
598 loadData(is, myLfs_only);
599 loadData(is, myVisualize_lfs);
600 loadData(is, myLfs_ramp);
610 if (!thissop)
return getGroup();
612 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
620 if (!thissop)
return getHard_edges();
622 OP_Utils::evalOpParm(result, thissop,
"hard_edges", cookparms.
getCookTime(), 0);
630 if (!thissop)
return getIterations();
632 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
640 if (!thissop)
return getRecompute_normals();
642 OP_Utils::evalOpParm(result, thissop,
"recompute_normals", cookparms.
getCookTime(), 0);
650 if (!thissop)
return getSmoothing_level();
652 OP_Utils::evalOpParm(result, thissop,
"smoothing_level", cookparms.
getCookTime(), 0);
660 if (!thissop)
return getTarget_edge();
662 OP_Utils::evalOpParm(result, thissop,
"target_edge", cookparms.
getCookTime(), 0);
670 if (!thissop)
return getInput_pts_only();
672 OP_Utils::evalOpParm(result, thissop,
"input_pts_only", cookparms.
getCookTime(), 0);
680 if (!thissop)
return getElement_sizing();
682 OP_Utils::evalOpParm(result, thissop,
"element_sizing", cookparms.
getCookTime(), 0);
690 if (!thissop)
return getGradation();
692 OP_Utils::evalOpParm(result, thissop,
"gradation", cookparms.
getCookTime(), 0);
700 if (!thissop)
return getDensity();
702 OP_Utils::evalOpParm(result, thissop,
"density", cookparms.
getCookTime(), 0);
710 if (!thissop)
return getLimit_below();
712 OP_Utils::evalOpParm(result, thissop,
"limit_below", cookparms.
getCookTime(), 0);
720 if (!thissop)
return getMin_edge_length();
722 OP_Utils::evalOpParm(result, thissop,
"min_edge_length", cookparms.
getCookTime(), 0);
730 if (!thissop)
return getLimit_above();
732 OP_Utils::evalOpParm(result, thissop,
"limit_above", cookparms.
getCookTime(), 0);
740 if (!thissop)
return getMax_edge_length();
742 OP_Utils::evalOpParm(result, thissop,
"max_edge_length", cookparms.
getCookTime(), 0);
750 if (!thissop)
return getLfs_only();
752 OP_Utils::evalOpParm(result, thissop,
"lfs_only", cookparms.
getCookTime(), 0);
760 if (!thissop)
return getVisualize_lfs();
762 OP_Utils::evalOpParm(result, thissop,
"visualize_lfs", cookparms.
getCookTime(), 0);
770 if (!thissop)
return getLfs_ramp();
772 OP_Utils::evalOpParm(result, thissop,
"lfs_ramp", cookparms.
getCookTime(), 0);
780 bool myRecompute_normals;
783 bool myInput_pts_only;
784 int64 myElement_sizing;
792 bool myVisualize_lfs;
void setRecompute_normals(bool val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool getRecompute_normals() const
fpreal64 opSmoothing_level(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
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
T clampMaxValue(fpreal maxvalue, const T &src) 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
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setElement_sizing(int64 val)
const OP_Context & context() const
fpreal64 getGradation() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
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
bool isParmColorRamp(exint idx) const override
bool operator==(const SOP_RemeshParms &src) const
An output stream object that owns its own string buffer storage.
**But if you need a result
void setVisualize_lfs(bool val)
T clampMinValue(fpreal minvalue, const T &src) const
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)
constexpr SYS_FORCE_INLINE T & x() noexcept
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)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
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
void setGradation(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
bool getLimit_above() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
void setIterations(int64 val)
fpreal64 getDensity() const
fpreal64 getMin_edge_length() const
void setGroup(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
UT_SharedPtr< UT_Ramp > getLfs_ramp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
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
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
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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.
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
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 setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void coerceValue(T &result, const S &src) const
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)
void setDensity(fpreal64 val)
fpreal64 opMax_edge_length(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void setMin_edge_length(fpreal64 val)
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
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)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_Matrix4D v)
bool getVisualize_lfs() const
fpreal getCookTime() const
bool operator!=(const SOP_RemeshParms &src) const
static void saveData(std::ostream &os, UT_Vector3D v)
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
const UT_StringHolder & getHard_edges() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool getLimit_below() const
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
exint getNestNumParms(TempIndex idx) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
bool opInput_pts_only(const SOP_NodeVerb::CookParms &cookparms) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opRecompute_normals(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSmoothing_level() const
constexpr SYS_FORCE_INLINE T & x() noexcept
void copyFrom(const OP_NodeParms *src) override