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;
82 graph->
evalOpParm(myInvert, nodeidx,
"invert", time, graph->
isDirect()?
nullptr:depnode);
85 graph->
evalOpParm(myUsemaxdist, nodeidx,
"usemaxdist", time, graph->
isDirect()?
nullptr:depnode);
87 if (
true && ( (
true&&!(((getUsemaxdist()==0)))) ) )
88 graph->
evalOpParm(myMaxdist, nodeidx,
"maxdist", time, graph->
isDirect()?
nullptr:depnode);
89 myRebuildwithfim =
false;
91 graph->
evalOpParm(myRebuildwithfim, nodeidx,
"rebuildwithfim", time, graph->
isDirect()?
nullptr:depnode);
93 if (
true && ( (
true&&!(((getRebuildwithfim()==0)))) ) )
94 graph->
evalOpParm(myFimtolerance, nodeidx,
"fimtolerance", time, graph->
isDirect()?
nullptr:depnode);
95 myFimiterations = 100;
96 if (
true && ( (
true&&!(((getRebuildwithfim()==0)))) ) )
97 graph->
evalOpParm(myFimiterations, nodeidx,
"fimiterations", time, graph->
isDirect()?
nullptr:depnode);
113 template <
typename T>
120 if (idx.
size() != instance.
size()+1)
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
191 if (idx.
size() != instance.
size()+1)
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
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); }
260 if (fieldnum.
size() < 1)
275 return "rebuildwithfim";
277 return "fimtolerance";
279 return "fimiterations";
287 if (fieldnum.
size() < 1)
288 return PARM_UNSUPPORTED;
345 loadData(is, rampdata);
363 int typelen = colon - data.
buffer();
377 {
int64 iv =
v; UTwrite(os, &iv); }
379 { UTwrite<fpreal64>(os, &
v); }
381 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
383 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
384 UTwrite<fpreal64>(os, &v.
z()); }
386 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
387 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
399 if (s) s->save(ostr);
401 saveData(os, result);
408 ostr << s->getDataTypeToken();
413 saveData(os, result);
417 void save(std::ostream &os)
const
421 saveData(os, myGroup);
423 saveData(os, myInvert);
424 saveData(os, myUsemaxdist);
425 saveData(os, myMaxdist);
426 saveData(os, myRebuildwithfim);
427 saveData(os, myFimtolerance);
428 saveData(os, myFimiterations);
441 loadData(is, myGroup);
443 loadData(is, myInvert);
444 loadData(is, myUsemaxdist);
445 loadData(is, myMaxdist);
446 loadData(is, myRebuildwithfim);
447 loadData(is, myFimtolerance);
448 loadData(is, myFimiterations);
458 if (!thissop)
return getGroup();
460 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getIso();
470 OP_Utils::evalOpParm(result, thissop,
"iso", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getInvert();
480 OP_Utils::evalOpParm(result, thissop,
"invert", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getUsemaxdist();
490 OP_Utils::evalOpParm(result, thissop,
"usemaxdist", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getMaxdist();
500 OP_Utils::evalOpParm(result, thissop,
"maxdist", cookparms.
getCookTime(), 0);
508 if (!thissop)
return getRebuildwithfim();
510 OP_Utils::evalOpParm(result, thissop,
"rebuildwithfim", cookparms.
getCookTime(), 0);
518 if (!thissop)
return getFimtolerance();
520 OP_Utils::evalOpParm(result, thissop,
"fimtolerance", cookparms.
getCookTime(), 0);
528 if (!thissop)
return getFimiterations();
530 OP_Utils::evalOpParm(result, thissop,
"fimiterations", cookparms.
getCookTime(), 0);
540 bool myRebuildwithfim;
542 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
GLsizei const GLfloat * value
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
bool isParmColorRamp(exint idx) const override
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