23 namespace SOP_WeightArrayBiharmonicEnums
34 using namespace UT::Literal;
55 myIndexattrib =
"guides"_UTsh;
56 myWeightattrib =
"weights"_UTsh;
71 if (myGroup != src.myGroup)
return false;
72 if (myPrimType != src.myPrimType)
return false;
73 if (myMaxIterations != src.myMaxIterations)
return false;
74 if (myIndexattrib != src.myIndexattrib)
return false;
75 if (myWeightattrib != src.myWeightattrib)
return false;
76 if (myDiffTol != src.myDiffTol)
return false;
77 if (myVerbose != src.myVerbose)
return false;
99 graph->
evalOpParm(myPrimType, nodeidx,
"primtype", time, graph->
isDirect()?
nullptr:depnode);
102 graph->
evalOpParm(myMaxIterations, nodeidx,
"maxiter", time, graph->
isDirect()?
nullptr:depnode);
103 myIndexattrib =
"guides"_UTsh;
105 graph->
evalOpParm(myIndexattrib, nodeidx,
"indexattrib", time, graph->
isDirect()?
nullptr:depnode);
106 myWeightattrib =
"weights"_UTsh;
108 graph->
evalOpParm(myWeightattrib, nodeidx,
"weightattrib", time, graph->
isDirect()?
nullptr:depnode);
111 graph->
evalOpParm(myDiffTol, nodeidx,
"difftol", time, graph->
isDirect()?
nullptr:depnode);
114 graph->
evalOpParm(myVerbose, nodeidx,
"verbose", time, graph->
isDirect()?
nullptr:depnode);
130 template <
typename T>
137 if (idx.
size() != instance.
size()+1)
142 coerceValue(value, myGroup);
145 coerceValue(value, myPrimType);
148 coerceValue(value, myMaxIterations);
151 coerceValue(value, myIndexattrib);
154 coerceValue(value, myWeightattrib);
157 coerceValue(value, myDiffTol);
160 coerceValue(value, myVerbose);
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 { doGetParmValue(idx, instance, value); }
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 template <
typename T>
205 if (idx.
size() != instance.
size()+1)
210 coerceValue(myGroup, ( ( value ) ));
213 coerceValue(myPrimType, clampMinValue(0, clampMaxValue(1, value ) ));
216 coerceValue(myMaxIterations, clampMinValue(0, ( value ) ));
219 coerceValue(myIndexattrib, ( ( value ) ));
222 coerceValue(myWeightattrib, ( ( value ) ));
225 coerceValue(myDiffTol, ( ( value ) ));
228 coerceValue(myVerbose, ( ( value ) ));
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
245 { doSetParmValue(idx, instance, value); }
247 { doSetParmValue(idx, instance, value); }
249 { doSetParmValue(idx, instance, value); }
251 { doSetParmValue(idx, instance, value); }
253 { doSetParmValue(idx, instance, value); }
255 { doSetParmValue(idx, instance, value); }
271 if (fieldnum.
size() < 1)
282 return "indexattrib";
284 return "weightattrib";
296 if (fieldnum.
size() < 1)
297 return PARM_UNSUPPORTED;
316 return PARM_UNSUPPORTED;
352 loadData(is, rampdata);
370 int typelen = colon - data.
buffer();
384 {
int64 iv =
v; UTwrite(os, &iv); }
386 { UTwrite<fpreal64>(os, &
v); }
388 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
390 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
391 UTwrite<fpreal64>(os, &v.
z()); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
394 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
406 if (s) s->save(ostr);
408 saveData(os, result);
415 ostr << s->getDataTypeToken();
420 saveData(os, result);
424 void save(std::ostream &os)
const
428 saveData(os, myGroup);
429 saveData(os, myPrimType);
430 saveData(os, myMaxIterations);
431 saveData(os, myIndexattrib);
432 saveData(os, myWeightattrib);
433 saveData(os, myDiffTol);
434 saveData(os, myVerbose);
447 loadData(is, myGroup);
448 loadData(is, myPrimType);
449 loadData(is, myMaxIterations);
450 loadData(is, myIndexattrib);
451 loadData(is, myWeightattrib);
452 loadData(is, myDiffTol);
453 loadData(is, myVerbose);
463 if (!thissop)
return getGroup();
465 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
475 OP_Utils::evalOpParm(result, thissop,
"primtype", cookparms.
getCookTime(), 0);
483 if (!thissop)
return getMaxIterations();
485 OP_Utils::evalOpParm(result, thissop,
"maxiter", cookparms.
getCookTime(), 0);
493 if (!thissop)
return getIndexattrib();
495 OP_Utils::evalOpParm(result, thissop,
"indexattrib", cookparms.
getCookTime(), 0);
503 if (!thissop)
return getWeightattrib();
505 OP_Utils::evalOpParm(result, thissop,
"weightattrib", cookparms.
getCookTime(), 0);
513 if (!thissop)
return getDiffTol();
515 OP_Utils::evalOpParm(result, thissop,
"difftol", cookparms.
getCookTime(), 0);
523 if (!thissop)
return getVerbose();
525 OP_Utils::evalOpParm(result, thissop,
"verbose", cookparms.
getCookTime(), 0);
532 int64 myMaxIterations;
PrimType opPrimType(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(PrimType enum_value)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
const char * getNestParmName(TempIndex fieldnum) const override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, int64 v)
SOP_WeightArrayBiharmonicParms()
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector3I &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_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
GLsizei const GLfloat * value
bool operator!=(const SOP_WeightArrayBiharmonicParms &src) const
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
fpreal64 opDiffTol(const SOP_NodeVerb::CookParms &cookparms) const
void setPrimType(PrimType val)
PrimType getPrimType() const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix4D v)
int64 opMaxIterations(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void setMaxIterations(int64 val)
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool operator==(const SOP_WeightArrayBiharmonicParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_StringHolder opIndexattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setDiffTol(fpreal64 val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setIndexattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const OP_GraphProxy * graph() const
bool opVerbose(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opWeightattrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
int64 getMaxIterations() const
void save(std::ostream &os) const
void setVerbose(bool val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, fpreal64 v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, int64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GT_API const UT_StringHolder version
void setGroup(const UT_StringHolder &val)
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setWeightattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
void copyFrom(const OP_NodeParms *src) override
fpreal getCookTime() const
const UT_StringHolder & getIndexattrib() const
const char * findChar(int c) const
const UT_StringHolder & getWeightattrib() const
fpreal64 getDiffTol() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const UT_StringHolder & getGroup() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
GEO_API int getPrimType(const TypeMask &mask)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & x() noexcept