36 myRebuildwithfim =
false;
38 myFimiterations = 100;
51 if (myGroup != src.myGroup)
return false;
52 if (myIso != src.myIso)
return false;
53 if (myInvert != src.myInvert)
return false;
54 if (myUsemaxdist != src.myUsemaxdist)
return false;
55 if (myMaxdist != src.myMaxdist)
return false;
56 if (myRebuildwithfim != src.myRebuildwithfim)
return false;
57 if (myFimtolerance != src.myFimtolerance)
return false;
58 if (myFimiterations != src.myFimiterations)
return false;
73 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
76 graph->
evalOpParm(myIso, nodeidx,
"iso", time, 0);
79 graph->
evalOpParm(myInvert, nodeidx,
"invert", time, 0);
82 graph->
evalOpParm(myUsemaxdist, nodeidx,
"usemaxdist", time, 0);
84 if (
true && ( (
true&&!(((getUsemaxdist()==0)))) ) )
85 graph->
evalOpParm(myMaxdist, nodeidx,
"maxdist", time, 0);
86 myRebuildwithfim =
false;
88 graph->
evalOpParm(myRebuildwithfim, nodeidx,
"rebuildwithfim", time, 0);
90 if (
true && ( (
true&&!(((getRebuildwithfim()==0)))) ) )
91 graph->
evalOpParm(myFimtolerance, nodeidx,
"fimtolerance", time, 0);
92 myFimiterations = 100;
93 if (
true && ( (
true&&!(((getRebuildwithfim()==0)))) ) )
94 graph->
evalOpParm(myFimiterations, nodeidx,
"fimiterations", time, 0);
110 template <
typename T>
117 if (idx.
size() != instance.
size()+1)
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
188 if (idx.
size() != instance.
size()+1)
221 { doSetParmValue(idx, instance, value); }
223 { doSetParmValue(idx, instance, value); }
225 { doSetParmValue(idx, instance, value); }
227 { doSetParmValue(idx, instance, value); }
229 { doSetParmValue(idx, instance, value); }
231 { doSetParmValue(idx, instance, value); }
233 { doSetParmValue(idx, instance, value); }
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
257 if (fieldnum.
size() < 1)
272 return "rebuildwithfim";
274 return "fimtolerance";
276 return "fimiterations";
284 if (fieldnum.
size() < 1)
285 return PARM_UNSUPPORTED;
342 loadData(is, rampdata);
360 int typelen = colon - data.
buffer();
374 {
int64 iv =
v; UTwrite(os, &iv); }
376 { UTwrite<fpreal64>(os, &
v); }
378 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
380 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
381 UTwrite<fpreal64>(os, &v.
z()); }
383 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
384 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
396 if (s) s->save(ostr);
398 saveData(os, result);
405 ostr << s->getDataTypeToken();
410 saveData(os, result);
414 void save(std::ostream &os)
const
418 saveData(os, myGroup);
420 saveData(os, myInvert);
421 saveData(os, myUsemaxdist);
422 saveData(os, myMaxdist);
423 saveData(os, myRebuildwithfim);
424 saveData(os, myFimtolerance);
425 saveData(os, myFimiterations);
438 loadData(is, myGroup);
440 loadData(is, myInvert);
441 loadData(is, myUsemaxdist);
442 loadData(is, myMaxdist);
443 loadData(is, myRebuildwithfim);
444 loadData(is, myFimtolerance);
445 loadData(is, myFimiterations);
455 if (!thissop)
return getGroup();
457 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
465 if (!thissop)
return getIso();
467 OP_Utils::evalOpParm(result, thissop,
"iso", cookparms.
getCookTime(), 0);
475 if (!thissop)
return getInvert();
477 OP_Utils::evalOpParm(result, thissop,
"invert", cookparms.
getCookTime(), 0);
485 if (!thissop)
return getUsemaxdist();
487 OP_Utils::evalOpParm(result, thissop,
"usemaxdist", cookparms.
getCookTime(), 0);
495 if (!thissop)
return getMaxdist();
497 OP_Utils::evalOpParm(result, thissop,
"maxdist", cookparms.
getCookTime(), 0);
505 if (!thissop)
return getRebuildwithfim();
507 OP_Utils::evalOpParm(result, thissop,
"rebuildwithfim", cookparms.
getCookTime(), 0);
515 if (!thissop)
return getFimtolerance();
517 OP_Utils::evalOpParm(result, thissop,
"fimtolerance", cookparms.
getCookTime(), 0);
525 if (!thissop)
return getFimiterations();
527 OP_Utils::evalOpParm(result, thissop,
"fimiterations", cookparms.
getCookTime(), 0);
537 bool myRebuildwithfim;
539 int64 myFimiterations;
bool load(UT_IStream &is)
void setFimtolerance(fpreal64 val)
fpreal64 opFimtolerance(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setMaxdist(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
exint bread(int32 *buffer, exint asize=1)
void save(std::ostream &os) const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator==(const SOP_VolumeSDFParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_Context & context() const
bool operator!=(const SOP_VolumeSDFParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE const char * buffer() const
fpreal64 getMaxdist() const
static void saveData(std::ostream &os, UT_Vector3D v)
An output stream object that owns its own string buffer storage.
int64 opFimiterations(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
**But if you need a result
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal64 opMaxdist(const SOP_NodeVerb::CookParms &cookparms) const
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_Vector2I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setIso(fpreal64 val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void copyFrom(const OP_NodeParms *src) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const char * getNestParmName(TempIndex fieldnum) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getGroup() const
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
const OP_GraphProxy * graph() const
void setUsemaxdist(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, int64 &v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
bool opRebuildwithfim(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 opIso(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setRebuildwithfim(bool val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, bool v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
void setGroup(const UT_StringHolder &val)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setFimiterations(int64 val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, int64 v)
DEP_MicroNode * depnode() const
bool opInvert(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
bool getRebuildwithfim() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal getCookTime() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const char * findChar(int c) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opUsemaxdist(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
fpreal64 getFimtolerance() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool isParmColorRamp(exint idx) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
bool getUsemaxdist() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
int64 getFimiterations() const