32 mySrcPoints =
""_UTsh;
33 myDistAttrib =
"dist"_UTsh;
35 myBoundaryBalance = 0.5;
48 if (myGroup != src.myGroup)
return false;
49 if (mySrcPoints != src.mySrcPoints)
return false;
50 if (myDistAttrib != src.myDistAttrib)
return false;
51 if (mySmoothing != src.mySmoothing)
return false;
52 if (myBoundaryBalance != src.myBoundaryBalance)
return false;
67 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
68 mySrcPoints =
""_UTsh;
70 graph->
evalOpParm(mySrcPoints, nodeidx,
"srcpoints", time, 0);
71 myDistAttrib =
"dist"_UTsh;
73 graph->
evalOpParm(myDistAttrib, nodeidx,
"attrib", time, 0);
76 graph->
evalOpParm(mySmoothing, nodeidx,
"smoothing", time, 0);
77 myBoundaryBalance = 0.5;
79 graph->
evalOpParm(myBoundaryBalance, nodeidx,
"boundarybalance", time, 0);
102 if (idx.
size() != instance.
size()+1)
135 { doGetParmValue(idx, instance, value); }
137 { doGetParmValue(idx, instance, value); }
139 { doGetParmValue(idx, instance, value); }
141 { doGetParmValue(idx, instance, value); }
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 { doGetParmValue(idx, instance, value); }
149 { doGetParmValue(idx, instance, value); }
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 template <
typename T>
164 if (idx.
size() != instance.
size()+1)
188 { doSetParmValue(idx, instance, value); }
190 { doSetParmValue(idx, instance, value); }
192 { doSetParmValue(idx, instance, value); }
194 { doSetParmValue(idx, instance, value); }
196 { doSetParmValue(idx, instance, value); }
198 { doSetParmValue(idx, instance, value); }
200 { doSetParmValue(idx, instance, value); }
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, value); }
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, value); }
224 if (fieldnum.
size() < 1)
237 return "boundarybalance";
245 if (fieldnum.
size() < 1)
246 return PARM_UNSUPPORTED;
297 loadData(is, rampdata);
315 int typelen = colon - data.
buffer();
329 {
int64 iv =
v; UTwrite(os, &iv); }
331 { UTwrite<fpreal64>(os, &
v); }
333 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
335 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
336 UTwrite<fpreal64>(os, &v.
z()); }
338 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
339 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
351 if (s) s->save(ostr);
353 saveData(os, result);
360 ostr << s->getDataTypeToken();
365 saveData(os, result);
369 void save(std::ostream &os)
const
373 saveData(os, myGroup);
374 saveData(os, mySrcPoints);
375 saveData(os, myDistAttrib);
376 saveData(os, mySmoothing);
377 saveData(os, myBoundaryBalance);
390 loadData(is, myGroup);
391 loadData(is, mySrcPoints);
392 loadData(is, myDistAttrib);
393 loadData(is, mySmoothing);
394 loadData(is, myBoundaryBalance);
404 if (!thissop)
return getGroup();
406 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
414 if (!thissop)
return getSrcPoints();
416 OP_Utils::evalOpParm(result, thissop,
"srcpoints", cookparms.
getCookTime(), 0);
424 if (!thissop)
return getDistAttrib();
426 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
434 if (!thissop)
return getSmoothing();
436 OP_Utils::evalOpParm(result, thissop,
"smoothing", cookparms.
getCookTime(), 0);
444 if (!thissop)
return getBoundaryBalance();
446 OP_Utils::evalOpParm(result, thissop,
"boundarybalance", cookparms.
getCookTime(), 0);
exint getNestNumParms(TempIndex idx) const override
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void copyFrom(const OP_NodeParms *src) override
void setBoundaryBalance(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, bool v)
T clampMaxValue(fpreal maxvalue, const T &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, int64 v)
void setSrcPoints(const UT_StringHolder &val)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
fpreal64 getBoundaryBalance() const
An output stream object that owns its own string buffer storage.
UT_StringHolder opDistAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 opBoundaryBalance(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setSmoothing(fpreal64 val)
const UT_StringHolder & getDistAttrib() const
const OP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getGroup() const
fpreal64 opSmoothing(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSmoothing() const
void setDistAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
const UT_StringHolder & getSrcPoints() const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void save(std::ostream &os) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void coerceValue(T &result, const S &src) const
UT_StringHolder opSrcPoints(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_HeatGeodesicParms &src) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, int64 &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal getCookTime() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_HeatGeodesicParms &src) const
const char * findChar(int c) const
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, fpreal64 v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void saveData(std::ostream &os, UT_Matrix4D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept