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;
75 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
76 myGoalgroup =
""_UTsh;
78 graph->
evalOpParm(myGoalgroup, nodeidx,
"goalgroup", time, 0);
81 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, 0);
84 graph->
evalOpParm(myWinradius, nodeidx,
"winradius", time, 0);
87 graph->
evalOpParm(myGaussian, nodeidx,
"gaussian", time, 0);
90 graph->
evalOpParm(myLevels, nodeidx,
"levels", time, 0);
93 graph->
evalOpParm(myPyramidscale, nodeidx,
"pyramidscale", time, 0);
96 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, 0);
99 graph->
evalOpParm(myApproxradius, nodeidx,
"approxradius", time, 0);
115 template <
typename T>
122 if (idx.
size() != instance.
size()+1)
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 template <
typename T>
196 if (idx.
size() != instance.
size()+1)
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
268 if (fieldnum.
size() < 1)
285 return "pyramidscale";
289 return "approxradius";
297 if (fieldnum.
size() < 1)
298 return PARM_UNSUPPORTED;
357 loadData(is, rampdata);
375 int typelen = colon - data.
buffer();
389 {
int64 iv =
v; UTwrite(os, &iv); }
391 { UTwrite<fpreal64>(os, &
v); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
395 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
396 UTwrite<fpreal64>(os, &v.
z()); }
398 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
399 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
411 if (s) s->save(ostr);
413 saveData(os, result);
420 ostr << s->getDataTypeToken();
425 saveData(os, result);
429 void save(std::ostream &os)
const
433 saveData(os, myGroup);
434 saveData(os, myGoalgroup);
435 saveData(os, myTolerance);
436 saveData(os, myWinradius);
437 saveData(os, myGaussian);
438 saveData(os, myLevels);
439 saveData(os, myPyramidscale);
440 saveData(os, myIterations);
441 saveData(os, myApproxradius);
454 loadData(is, myGroup);
455 loadData(is, myGoalgroup);
456 loadData(is, myTolerance);
457 loadData(is, myWinradius);
458 loadData(is, myGaussian);
459 loadData(is, myLevels);
460 loadData(is, myPyramidscale);
461 loadData(is, myIterations);
462 loadData(is, myApproxradius);
472 if (!thissop)
return getGroup();
474 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
482 if (!thissop)
return getGoalgroup();
484 OP_Utils::evalOpParm(result, thissop,
"goalgroup", cookparms.
getCookTime(), 0);
492 if (!thissop)
return getTolerance();
494 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
502 if (!thissop)
return getWinradius();
504 OP_Utils::evalOpParm(result, thissop,
"winradius", cookparms.
getCookTime(), 0);
512 if (!thissop)
return getGaussian();
514 OP_Utils::evalOpParm(result, thissop,
"gaussian", cookparms.
getCookTime(), 0);
522 if (!thissop)
return getLevels();
524 OP_Utils::evalOpParm(result, thissop,
"levels", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getPyramidscale();
534 OP_Utils::evalOpParm(result, thissop,
"pyramidscale", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getIterations();
544 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getApproxradius();
554 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
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
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
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
void setApproxradius(fpreal64 val)
void copyFrom(const OP_NodeParms *src) override
SOP_VolumeOpticalFlowParms()
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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