23 namespace SOP_VolumeBinEnums
34 using namespace UT::Literal;
52 myVolume =
"density"_UTsh;
53 myStencil =
"active"_UTsh;
73 if (myVolume != src.myVolume)
return false;
74 if (myStencil != src.myStencil)
return false;
75 if (myDoignore != src.myDoignore)
return false;
76 if (myIgnore != src.myIgnore)
return false;
77 if (myBins != src.myBins)
return false;
78 if (myRangemode != src.myRangemode)
return false;
79 if (myMinmax != src.myMinmax)
return false;
80 if (myKeepall != src.myKeepall)
return false;
81 if (myKeeprange != src.myKeeprange)
return false;
98 myVolume =
"density"_UTsh;
100 graph->
evalOpParm(myVolume, nodeidx,
"volume", time, graph->
isDirect()?
nullptr:depnode);
101 myStencil =
"active"_UTsh;
103 graph->
evalOpParm(myStencil, nodeidx,
"stencil", time, graph->
isDirect()?
nullptr:depnode);
106 graph->
evalOpParm(myDoignore, nodeidx,
"doignore", time, graph->
isDirect()?
nullptr:depnode);
108 if (
true && ( (
true&&!(((getDoignore()==0)))) ) )
109 graph->
evalOpParm(myIgnore, nodeidx,
"ignore", time, graph->
isDirect()?
nullptr:depnode);
115 graph->
evalOpParm(myRangemode, nodeidx,
"rangemode", time, graph->
isDirect()?
nullptr:depnode);
117 if (
true && ( (
true&&!(((
int64(getRangemode())==0)))) ) )
118 graph->
evalOpParm(myMinmax, nodeidx,
"minmax", time, graph->
isDirect()?
nullptr:depnode);
121 graph->
evalOpParm(myKeepall, nodeidx,
"keepall", time, graph->
isDirect()?
nullptr:depnode);
123 if (
true && ( (
true&&!(((getKeepall()==1)))) ) )
124 graph->
evalOpParm(myKeeprange, nodeidx,
"keeprange", time, graph->
isDirect()?
nullptr:depnode);
140 template <
typename T>
147 if (idx.
size() != instance.
size()+1)
152 coerceValue(value, myVolume);
155 coerceValue(value, myStencil);
158 coerceValue(value, myDoignore);
161 coerceValue(value, myIgnore);
164 coerceValue(value, myBins);
167 coerceValue(value, myRangemode);
170 coerceValue(value, myMinmax);
173 coerceValue(value, myKeepall);
176 coerceValue(value, myKeeprange);
192 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 template <
typename T>
221 if (idx.
size() != instance.
size()+1)
226 coerceValue(myVolume, ( ( value ) ));
229 coerceValue(myStencil, ( ( value ) ));
232 coerceValue(myDoignore, ( ( value ) ));
235 coerceValue(myIgnore, ( ( value ) ));
238 coerceValue(myBins, clampMinValue(1, ( value ) ));
241 coerceValue(myRangemode, clampMinValue(0, clampMaxValue(1, value ) ));
244 coerceValue(myMinmax, ( ( value ) ));
247 coerceValue(myKeepall, ( ( value ) ));
250 coerceValue(myKeeprange, clampMinValue(0, clampMaxValue(1, value ) ));
257 { doSetParmValue(idx, instance, value); }
259 { doSetParmValue(idx, instance, value); }
261 { doSetParmValue(idx, instance, value); }
263 { doSetParmValue(idx, instance, value); }
265 { doSetParmValue(idx, instance, value); }
267 { doSetParmValue(idx, instance, value); }
269 { doSetParmValue(idx, instance, value); }
271 { doSetParmValue(idx, instance, value); }
273 { doSetParmValue(idx, instance, value); }
275 { doSetParmValue(idx, instance, value); }
277 { doSetParmValue(idx, instance, value); }
293 if (fieldnum.
size() < 1)
322 if (fieldnum.
size() < 1)
323 return PARM_UNSUPPORTED;
346 return PARM_UNSUPPORTED;
382 loadData(is, rampdata);
400 int typelen = colon - data.
buffer();
414 {
int64 iv =
v; UTwrite(os, &iv); }
416 { UTwrite<fpreal64>(os, &
v); }
418 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
420 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
421 UTwrite<fpreal64>(os, &v.
z()); }
423 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
424 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
436 if (s) s->save(ostr);
438 saveData(os, result);
445 ostr << s->getDataTypeToken();
450 saveData(os, result);
454 void save(std::ostream &os)
const
458 saveData(os, myVolume);
459 saveData(os, myStencil);
460 saveData(os, myDoignore);
461 saveData(os, myIgnore);
462 saveData(os, myBins);
463 saveData(os, myRangemode);
464 saveData(os, myMinmax);
465 saveData(os, myKeepall);
466 saveData(os, myKeeprange);
479 loadData(is, myVolume);
480 loadData(is, myStencil);
481 loadData(is, myDoignore);
482 loadData(is, myIgnore);
483 loadData(is, myBins);
484 loadData(is, myRangemode);
485 loadData(is, myMinmax);
486 loadData(is, myKeepall);
487 loadData(is, myKeeprange);
499 OP_Utils::evalOpParm(result, thissop,
"volume", cookparms.
getCookTime(), 0);
507 if (!thissop)
return getStencil();
509 OP_Utils::evalOpParm(result, thissop,
"stencil", cookparms.
getCookTime(), 0);
517 if (!thissop)
return getDoignore();
519 OP_Utils::evalOpParm(result, thissop,
"doignore", cookparms.
getCookTime(), 0);
527 if (!thissop)
return getIgnore();
529 OP_Utils::evalOpParm(result, thissop,
"ignore", cookparms.
getCookTime(), 0);
537 if (!thissop)
return getBins();
539 OP_Utils::evalOpParm(result, thissop,
"bins", cookparms.
getCookTime(), 0);
547 if (!thissop)
return getRangemode();
549 OP_Utils::evalOpParm(result, thissop,
"rangemode", cookparms.
getCookTime(), 0);
557 if (!thissop)
return getMinmax();
559 OP_Utils::evalOpParm(result, thissop,
"minmax", cookparms.
getCookTime(), 0);
567 if (!thissop)
return getKeepall();
569 OP_Utils::evalOpParm(result, thissop,
"keepall", cookparms.
getCookTime(), 0);
577 if (!thissop)
return getKeeprange();
579 OP_Utils::evalOpParm(result, thissop,
"keeprange", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_Vector2D opKeeprange(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_Vector2T< fpreal64 > UT_Vector2D
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GLsizei const GLfloat * value
Rangemode opRangemode(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const OP_Context & context() const
UT_StringHolder opVolume(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
An output stream object that owns its own string buffer storage.
**But if you need a result
static void saveData(std::ostream &os, fpreal64 v)
const UT_StringHolder & getStencil() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setStencil(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setRangemode(Rangemode val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const 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)
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Rangemode getRangemode() const
static void saveData(std::ostream &os, UT_Vector2D v)
bool opDoignore(const SOP_NodeVerb::CookParms &cookparms) 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
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, bool &v)
bool operator!=(const SOP_VolumeBinParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
UT_Vector2D getKeeprange() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, PRM_DataItemHandle s)
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal64 opIgnore(const SOP_NodeVerb::CookParms &cookparms) const
void setDoignore(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
int64 opBins(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, int64 &v)
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_Vector2D opMinmax(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setMinmax(UT_Vector2D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
SYS_FORCE_INLINE UT_StringHolder getToken(Rangemode enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
Utility class for containing a color ramp.
void setKeepall(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual UT_StringHolder baseGetSignature() const
void setIgnore(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector3D v)
UT_StringHolder opStencil(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
const UT_StringHolder & getVolume() const
const char * findChar(int c) const
void loadFromOpSubclass(const LoadParms &loadparms) override
void setVolume(const UT_StringHolder &val)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
void setKeeprange(UT_Vector2D val)
static void saveData(std::ostream &os, bool v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool operator==(const SOP_VolumeBinParms &src) const
bool load(UT_IStream &is)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool opKeepall(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE bool isstring() const
UT_Vector2D getMinmax() const
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 getIgnore() const
constexpr SYS_FORCE_INLINE T & x() noexcept