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;
97 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
100 graph->
evalOpParm(myMaxIterations, nodeidx,
"maxiter", time, 0);
103 graph->
evalOpParm(myDiffTol, nodeidx,
"difftol", time, 0);
104 myDestroyWeights =
true;
106 graph->
evalOpParm(myDestroyWeights, nodeidx,
"destroyweights", time, 0);
108 if (
true && ( (
true&&!(((getDestroyWeights()!=0)))) ) )
109 graph->
evalOpParm(myBlendFactor, nodeidx,
"blendfactor", time, 0);
112 graph->
evalOpParm(myPointColoring, nodeidx,
"color", time, 0);
115 graph->
evalOpParm(myZeroWeightColor, nodeidx,
"zeroweightcolor", time, 0);
116 myOutputCaptureTets =
false;
118 graph->
evalOpParm(myOutputCaptureTets, nodeidx,
"outputcapturetets", time, 0);
121 graph->
evalOpParm(myVerbose, nodeidx,
"verbose", time, 0);
137 template <
typename T>
144 if (idx.
size() != instance.
size()+1)
149 coerceValue(value, myGroup);
152 coerceValue(value, myMaxIterations);
155 coerceValue(value, myDiffTol);
158 coerceValue(value, myDestroyWeights);
161 coerceValue(value, myBlendFactor);
164 coerceValue(value, myPointColoring);
167 coerceValue(value, myZeroWeightColor);
170 coerceValue(value, myOutputCaptureTets);
173 coerceValue(value, myVerbose);
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 template <
typename T>
218 if (idx.
size() != instance.
size()+1)
223 coerceValue(myGroup, ( ( value ) ));
226 coerceValue(myMaxIterations, clampMinValue(0, ( value ) ));
229 coerceValue(myDiffTol, ( ( value ) ));
232 coerceValue(myDestroyWeights, ( ( value ) ));
235 coerceValue(myBlendFactor, ( ( value ) ));
238 coerceValue(myPointColoring, clampMinValue(0, clampMaxValue(1, value ) ));
241 coerceValue(myZeroWeightColor, ( ( value ) ));
244 coerceValue(myOutputCaptureTets, ( ( value ) ));
247 coerceValue(myVerbose, ( ( value ) ));
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
258 { doSetParmValue(idx, instance, value); }
260 { doSetParmValue(idx, instance, value); }
262 { doSetParmValue(idx, instance, value); }
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
290 if (fieldnum.
size() < 1)
301 return "destroyweights";
303 return "blendfactor";
307 return "zeroweightcolor";
309 return "outputcapturetets";
319 if (fieldnum.
size() < 1)
320 return PARM_UNSUPPORTED;
343 return PARM_UNSUPPORTED;
379 loadData(is, rampdata);
397 int typelen = colon - data.
buffer();
411 {
int64 iv =
v; UTwrite(os, &iv); }
413 { UTwrite<fpreal64>(os, &
v); }
415 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
417 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
418 UTwrite<fpreal64>(os, &v.
z()); }
420 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
421 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
433 if (s) s->save(ostr);
435 saveData(os, result);
442 ostr << s->getDataTypeToken();
447 saveData(os, result);
451 void save(std::ostream &os)
const
455 saveData(os, myGroup);
456 saveData(os, myMaxIterations);
457 saveData(os, myDiffTol);
458 saveData(os, myDestroyWeights);
459 saveData(os, myBlendFactor);
460 saveData(os, myPointColoring);
461 saveData(os, myZeroWeightColor);
462 saveData(os, myOutputCaptureTets);
463 saveData(os, myVerbose);
476 loadData(is, myGroup);
477 loadData(is, myMaxIterations);
478 loadData(is, myDiffTol);
479 loadData(is, myDestroyWeights);
480 loadData(is, myBlendFactor);
481 loadData(is, myPointColoring);
482 loadData(is, myZeroWeightColor);
483 loadData(is, myOutputCaptureTets);
484 loadData(is, myVerbose);
494 if (!thissop)
return getGroup();
496 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
504 if (!thissop)
return getMaxIterations();
506 OP_Utils::evalOpParm(result, thissop,
"maxiter", cookparms.
getCookTime(), 0);
514 if (!thissop)
return getDiffTol();
516 OP_Utils::evalOpParm(result, thissop,
"difftol", cookparms.
getCookTime(), 0);
524 if (!thissop)
return getDestroyWeights();
526 OP_Utils::evalOpParm(result, thissop,
"destroyweights", cookparms.
getCookTime(), 0);
534 if (!thissop)
return getBlendFactor();
536 OP_Utils::evalOpParm(result, thissop,
"blendfactor", cookparms.
getCookTime(), 0);
544 if (!thissop)
return getPointColoring();
546 OP_Utils::evalOpParm(result, thissop,
"color", cookparms.
getCookTime(), 0);
554 if (!thissop)
return getZeroWeightColor();
556 OP_Utils::evalOpParm(result, thissop,
"zeroweightcolor", cookparms.
getCookTime(), 0);
564 if (!thissop)
return getOutputCaptureTets();
566 OP_Utils::evalOpParm(result, thissop,
"outputcapturetets", cookparms.
getCookTime(), 0);
574 if (!thissop)
return getVerbose();
576 OP_Utils::evalOpParm(result, thissop,
"verbose", cookparms.
getCookTime(), 0);
582 int64 myMaxIterations;
584 bool myDestroyWeights;
586 int64 myPointColoring;
588 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
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
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
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
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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