23 namespace SOP_BoneCaptureBiharmonicEnums
34 using namespace UT::Literal;
55 myDestroyWeights =
true;
59 myOutputCaptureTets =
false;
73 if (myGroup != src.myGroup)
return false;
74 if (myMaxIterations != src.myMaxIterations)
return false;
75 if (myDiffTol != src.myDiffTol)
return false;
76 if (myDestroyWeights != src.myDestroyWeights)
return false;
77 if (myBlendFactor != src.myBlendFactor)
return false;
78 if (myPointColoring != src.myPointColoring)
return false;
79 if (myZeroWeightColor != src.myZeroWeightColor)
return false;
80 if (myOutputCaptureTets != src.myOutputCaptureTets)
return false;
81 if (myVerbose != src.myVerbose)
return false;
100 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
103 graph->
evalOpParm(myMaxIterations, nodeidx,
"maxiter", time, graph->
isDirect()?
nullptr:depnode);
106 graph->
evalOpParm(myDiffTol, nodeidx,
"difftol", time, graph->
isDirect()?
nullptr:depnode);
107 myDestroyWeights =
true;
109 graph->
evalOpParm(myDestroyWeights, nodeidx,
"destroyweights", time, graph->
isDirect()?
nullptr:depnode);
111 if (
true && ( (
true&&!(((getDestroyWeights()!=0)))) ) )
112 graph->
evalOpParm(myBlendFactor, nodeidx,
"blendfactor", time, graph->
isDirect()?
nullptr:depnode);
115 graph->
evalOpParm(myPointColoring, nodeidx,
"color", time, graph->
isDirect()?
nullptr:depnode);
118 graph->
evalOpParm(myZeroWeightColor, nodeidx,
"zeroweightcolor", time, graph->
isDirect()?
nullptr:depnode);
119 myOutputCaptureTets =
false;
121 graph->
evalOpParm(myOutputCaptureTets, nodeidx,
"outputcapturetets", time, graph->
isDirect()?
nullptr:depnode);
124 graph->
evalOpParm(myVerbose, nodeidx,
"verbose", time, graph->
isDirect()?
nullptr:depnode);
140 template <
typename T>
147 if (idx.
size() != instance.
size()+1)
152 coerceValue(value, myGroup);
155 coerceValue(value, myMaxIterations);
158 coerceValue(value, myDiffTol);
161 coerceValue(value, myDestroyWeights);
164 coerceValue(value, myBlendFactor);
167 coerceValue(value, myPointColoring);
170 coerceValue(value, myZeroWeightColor);
173 coerceValue(value, myOutputCaptureTets);
176 coerceValue(value, myVerbose);
192 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 template <
typename T>
221 if (idx.
size() != instance.
size()+1)
226 coerceValue(myGroup, ( ( value ) ));
229 coerceValue(myMaxIterations, clampMinValue(0, ( value ) ));
232 coerceValue(myDiffTol, ( ( value ) ));
235 coerceValue(myDestroyWeights, ( ( value ) ));
238 coerceValue(myBlendFactor, ( ( value ) ));
241 coerceValue(myPointColoring, clampMinValue(0, clampMaxValue(1, value ) ));
244 coerceValue(myZeroWeightColor, ( ( value ) ));
247 coerceValue(myOutputCaptureTets, ( ( value ) ));
250 coerceValue(myVerbose, ( ( value ) ));
257 { doSetParmValue(idx, instance, value); }
259 { doSetParmValue(idx, instance, value); }
261 { doSetParmValue(idx, instance, value); }
263 { doSetParmValue(idx, instance, value); }
265 { doSetParmValue(idx, instance, value); }
267 { doSetParmValue(idx, instance, value); }
269 { doSetParmValue(idx, instance, value); }
271 { doSetParmValue(idx, instance, value); }
273 { doSetParmValue(idx, instance, value); }
275 { doSetParmValue(idx, instance, value); }
277 { doSetParmValue(idx, instance, value); }
293 if (fieldnum.
size() < 1)
304 return "destroyweights";
306 return "blendfactor";
310 return "zeroweightcolor";
312 return "outputcapturetets";
322 if (fieldnum.
size() < 1)
323 return PARM_UNSUPPORTED;
346 return PARM_UNSUPPORTED;
382 loadData(is, rampdata);
400 int typelen = colon - data.
buffer();
414 {
int64 iv =
v; UTwrite(os, &iv); }
416 { UTwrite<fpreal64>(os, &
v); }
418 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
420 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
421 UTwrite<fpreal64>(os, &v.
z()); }
423 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
424 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
436 if (s) s->save(ostr);
438 saveData(os, result);
445 ostr << s->getDataTypeToken();
450 saveData(os, result);
454 void save(std::ostream &os)
const
458 saveData(os, myGroup);
459 saveData(os, myMaxIterations);
460 saveData(os, myDiffTol);
461 saveData(os, myDestroyWeights);
462 saveData(os, myBlendFactor);
463 saveData(os, myPointColoring);
464 saveData(os, myZeroWeightColor);
465 saveData(os, myOutputCaptureTets);
466 saveData(os, myVerbose);
479 loadData(is, myGroup);
480 loadData(is, myMaxIterations);
481 loadData(is, myDiffTol);
482 loadData(is, myDestroyWeights);
483 loadData(is, myBlendFactor);
484 loadData(is, myPointColoring);
485 loadData(is, myZeroWeightColor);
486 loadData(is, myOutputCaptureTets);
487 loadData(is, myVerbose);
497 if (!thissop)
return getGroup();
499 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
507 if (!thissop)
return getMaxIterations();
509 OP_Utils::evalOpParm(result, thissop,
"maxiter", cookparms.
getCookTime(), 0);
517 if (!thissop)
return getDiffTol();
519 OP_Utils::evalOpParm(result, thissop,
"difftol", cookparms.
getCookTime(), 0);
527 if (!thissop)
return getDestroyWeights();
529 OP_Utils::evalOpParm(result, thissop,
"destroyweights", cookparms.
getCookTime(), 0);
537 if (!thissop)
return getBlendFactor();
539 OP_Utils::evalOpParm(result, thissop,
"blendfactor", cookparms.
getCookTime(), 0);
547 if (!thissop)
return getPointColoring();
549 OP_Utils::evalOpParm(result, thissop,
"color", cookparms.
getCookTime(), 0);
557 if (!thissop)
return getZeroWeightColor();
559 OP_Utils::evalOpParm(result, thissop,
"zeroweightcolor", cookparms.
getCookTime(), 0);
567 if (!thissop)
return getOutputCaptureTets();
569 OP_Utils::evalOpParm(result, thissop,
"outputcapturetets", cookparms.
getCookTime(), 0);
577 if (!thissop)
return getVerbose();
579 OP_Utils::evalOpParm(result, thissop,
"verbose", cookparms.
getCookTime(), 0);
585 int64 myMaxIterations;
587 bool myDestroyWeights;
589 int64 myPointColoring;
591 bool myOutputCaptureTets;
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setDestroyWeights(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setBlendFactor(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, bool v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
GLsizei const GLfloat * value
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector2I &v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
**But if you need a result
int64 opMaxIterations(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void copyFrom(const OP_NodeParms *src) override
void setMaxIterations(int64 val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
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 PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
fpreal64 opDiffTol(const SOP_NodeVerb::CookParms &cookparms) const
bool opVerbose(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 getDiffTol() const
void setVerbose(bool val)
PointColoring opPointColoring(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool operator!=(const SOP_BoneCaptureBiharmonicParms &src) const
void setPointColoring(PointColoring val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 opBlendFactor(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SYS_FORCE_INLINE UT_StringHolder getToken(PointColoring enum_value)
bool getOutputCaptureTets() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_Vector3T< fpreal64 > UT_Vector3D
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, int64 v)
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
bool opOutputCaptureTets(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector4I &v)
int64 getMaxIterations() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setOutputCaptureTets(bool val)
static void loadData(UT_IStream &is, int64 &v)
PointColoring getPointColoring() const
void loadFromOpSubclass(const LoadParms &loadparms) override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setZeroWeightColor(UT_Vector3D val)
UT_Vector3D getZeroWeightColor() const
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool getDestroyWeights() const
static void saveData(std::ostream &os, fpreal64 v)
LeafData & operator=(const LeafData &)=delete
void save(std::ostream &os) const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
void setGroup(const UT_StringHolder &val)
UT_Vector3D opZeroWeightColor(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
bool opDestroyWeights(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
bool isParmColorRamp(exint idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SOP_BoneCaptureBiharmonicParms()
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
bool operator==(const SOP_BoneCaptureBiharmonicParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_StringHolder s)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setDiffTol(fpreal64 val)
fpreal64 getBlendFactor() const
constexpr SYS_FORCE_INLINE T & x() noexcept