32 myGoalgroup =
""_UTsh;
52 if (myGroup != src.myGroup)
return false;
53 if (myGoalgroup != src.myGoalgroup)
return false;
54 if (myTolerance != src.myTolerance)
return false;
55 if (myWinradius != src.myWinradius)
return false;
56 if (myGaussian != src.myGaussian)
return false;
57 if (myLevels != src.myLevels)
return false;
58 if (myPyramidscale != src.myPyramidscale)
return false;
59 if (myIterations != src.myIterations)
return false;
60 if (myApproxradius != src.myApproxradius)
return false;
79 myGoalgroup =
""_UTsh;
81 graph->
evalOpParm(myGoalgroup, nodeidx,
"goalgroup", time, graph->
isDirect()?
nullptr:depnode);
84 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, graph->
isDirect()?
nullptr:depnode);
87 graph->
evalOpParm(myWinradius, nodeidx,
"winradius", time, graph->
isDirect()?
nullptr:depnode);
90 graph->
evalOpParm(myGaussian, nodeidx,
"gaussian", time, graph->
isDirect()?
nullptr:depnode);
93 graph->
evalOpParm(myLevels, nodeidx,
"levels", time, graph->
isDirect()?
nullptr:depnode);
96 graph->
evalOpParm(myPyramidscale, nodeidx,
"pyramidscale", time, graph->
isDirect()?
nullptr:depnode);
99 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, graph->
isDirect()?
nullptr:depnode);
102 graph->
evalOpParm(myApproxradius, nodeidx,
"approxradius", time, graph->
isDirect()?
nullptr:depnode);
118 template <
typename T>
125 if (idx.
size() != instance.
size()+1)
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
199 if (idx.
size() != instance.
size()+1)
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)
288 return "pyramidscale";
292 return "approxradius";
300 if (fieldnum.
size() < 1)
301 return PARM_UNSUPPORTED;
360 loadData(is, rampdata);
378 int typelen = colon - data.
buffer();
392 {
int64 iv =
v; UTwrite(os, &iv); }
394 { UTwrite<fpreal64>(os, &
v); }
396 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
398 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
399 UTwrite<fpreal64>(os, &v.
z()); }
401 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
402 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
414 if (s) s->save(ostr);
416 saveData(os, result);
423 ostr << s->getDataTypeToken();
428 saveData(os, result);
432 void save(std::ostream &os)
const
436 saveData(os, myGroup);
437 saveData(os, myGoalgroup);
438 saveData(os, myTolerance);
439 saveData(os, myWinradius);
440 saveData(os, myGaussian);
441 saveData(os, myLevels);
442 saveData(os, myPyramidscale);
443 saveData(os, myIterations);
444 saveData(os, myApproxradius);
457 loadData(is, myGroup);
458 loadData(is, myGoalgroup);
459 loadData(is, myTolerance);
460 loadData(is, myWinradius);
461 loadData(is, myGaussian);
462 loadData(is, myLevels);
463 loadData(is, myPyramidscale);
464 loadData(is, myIterations);
465 loadData(is, myApproxradius);
475 if (!thissop)
return getGroup();
477 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
485 if (!thissop)
return getGoalgroup();
487 OP_Utils::evalOpParm(result, thissop,
"goalgroup", cookparms.
getCookTime(), 0);
495 if (!thissop)
return getTolerance();
497 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
505 if (!thissop)
return getWinradius();
507 OP_Utils::evalOpParm(result, thissop,
"winradius", cookparms.
getCookTime(), 0);
515 if (!thissop)
return getGaussian();
517 OP_Utils::evalOpParm(result, thissop,
"gaussian", cookparms.
getCookTime(), 0);
525 if (!thissop)
return getLevels();
527 OP_Utils::evalOpParm(result, thissop,
"levels", cookparms.
getCookTime(), 0);
535 if (!thissop)
return getPyramidscale();
537 OP_Utils::evalOpParm(result, thissop,
"pyramidscale", cookparms.
getCookTime(), 0);
545 if (!thissop)
return getIterations();
547 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
555 if (!thissop)
return getApproxradius();
557 OP_Utils::evalOpParm(result, thissop,
"approxradius", cookparms.
getCookTime(), 0);
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setWinradius(int64 val)
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_Matrix4D v)
int64 getIterations() const
const UT_StringHolder & getGoalgroup() const
UT_StringHolder opGoalgroup(const SOP_NodeVerb::CookParms &cookparms) const
T clampMaxValue(fpreal maxvalue, const T &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, UT_StringHolder s)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_Vector4D v)
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, int64 v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &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 loadData(UT_IStream &is, UT_StringHolder &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool isParmColorRamp(exint idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
int64 opLevels(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 getPyramidscale() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Vector2D 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 setTolerance(fpreal64 val)
void setGoalgroup(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setIterations(int64 val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
fpreal64 opPyramidscale(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setLevels(int64 val)
void setPyramidscale(fpreal64 val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator!=(const SOP_VolumeOpticalFlowParms &src) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 getApproxradius() const
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, bool v)
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, bool &v)
fpreal64 opApproxradius(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
DEP_MicroNode * depnode() const
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
bool load(UT_IStream &is)
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal64 getTolerance() const
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setGroup(const UT_StringHolder &val)
ParmType getNestParmType(TempIndex fieldnum) const override
const char * findChar(int c) const
bool opGaussian(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setGaussian(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator==(const SOP_VolumeOpticalFlowParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setApproxradius(fpreal64 val)
void copyFrom(const OP_NodeParms *src) override
SOP_VolumeOpticalFlowParms()
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
int64 getWinradius() const
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
int64 opWinradius(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & x() noexcept