23 namespace SOP_VolumeBinEnums
40 myVolume =
"density"_UTsh;
41 myStencil =
"active"_UTsh;
61 if (myVolume != src.myVolume)
return false;
62 if (myStencil != src.myStencil)
return false;
63 if (myDoignore != src.myDoignore)
return false;
64 if (myIgnore != src.myIgnore)
return false;
65 if (myBins != src.myBins)
return false;
66 if (myRangemode != src.myRangemode)
return false;
67 if (myMinmax != src.myMinmax)
return false;
68 if (myKeepall != src.myKeepall)
return false;
69 if (myKeeprange != src.myKeeprange)
return false;
83 myVolume =
"density"_UTsh;
85 graph->
evalOpParm(myVolume, nodeidx,
"volume", time, 0);
86 myStencil =
"active"_UTsh;
88 graph->
evalOpParm(myStencil, nodeidx,
"stencil", time, 0);
91 graph->
evalOpParm(myDoignore, nodeidx,
"doignore", time, 0);
93 if (
true && ( (
true&&!(((getDoignore()==0)))) ) )
94 graph->
evalOpParm(myIgnore, nodeidx,
"ignore", time, 0);
97 graph->
evalOpParm(myBins, nodeidx,
"bins", time, 0);
100 graph->
evalOpParm(myRangemode, nodeidx,
"rangemode", time, 0);
102 if (
true && ( (
true&&!(((
int64(getRangemode())==0)))) ) )
103 graph->
evalOpParm(myMinmax, nodeidx,
"minmax", time, 0);
106 graph->
evalOpParm(myKeepall, nodeidx,
"keepall", time, 0);
108 if (
true && ( (
true&&!(((getKeepall()==1)))) ) )
109 graph->
evalOpParm(myKeeprange, nodeidx,
"keeprange", time, 0);
125 template <
typename T>
132 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 template <
typename T>
206 if (idx.
size() != instance.
size()+1)
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); }
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
258 { doSetParmValue(idx, instance, value); }
260 { doSetParmValue(idx, instance, value); }
262 { doSetParmValue(idx, instance, value); }
278 if (fieldnum.
size() < 1)
307 if (fieldnum.
size() < 1)
308 return PARM_UNSUPPORTED;
350 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
352 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
354 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
367 loadData(is, rampdata);
385 int typelen = colon - data.
buffer();
399 {
int64 iv =
v; UTwrite(os, &iv); }
401 { UTwrite<fpreal64>(os, &
v); }
403 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
405 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
406 UTwrite<fpreal64>(os, &v.
z()); }
408 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
409 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
421 if (s) s->save(ostr);
423 saveData(os, result);
430 ostr << s->getDataTypeToken();
435 saveData(os, result);
439 void save(std::ostream &os)
const
443 saveData(os, myVolume);
444 saveData(os, myStencil);
445 saveData(os, myDoignore);
446 saveData(os, myIgnore);
447 saveData(os, myBins);
448 saveData(os, myRangemode);
449 saveData(os, myMinmax);
450 saveData(os, myKeepall);
451 saveData(os, myKeeprange);
464 loadData(is, myVolume);
465 loadData(is, myStencil);
466 loadData(is, myDoignore);
467 loadData(is, myIgnore);
468 loadData(is, myBins);
469 loadData(is, myRangemode);
470 loadData(is, myMinmax);
471 loadData(is, myKeepall);
472 loadData(is, myKeeprange);
484 OP_Utils::evalOpParm(result, thissop,
"volume", cookparms.
getCookTime(), 0);
492 if (!thissop)
return getStencil();
494 OP_Utils::evalOpParm(result, thissop,
"stencil", cookparms.
getCookTime(), 0);
502 if (!thissop)
return getDoignore();
504 OP_Utils::evalOpParm(result, thissop,
"doignore", cookparms.
getCookTime(), 0);
512 if (!thissop)
return getIgnore();
514 OP_Utils::evalOpParm(result, thissop,
"ignore", cookparms.
getCookTime(), 0);
522 if (!thissop)
return getBins();
524 OP_Utils::evalOpParm(result, thissop,
"bins", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getRangemode();
534 OP_Utils::evalOpParm(result, thissop,
"rangemode", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getMinmax();
544 OP_Utils::evalOpParm(result, thissop,
"minmax", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getKeepall();
554 OP_Utils::evalOpParm(result, thissop,
"keepall", cookparms.
getCookTime(), 0);
562 if (!thissop)
return getKeeprange();
564 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
T clampMaxValue(fpreal maxvalue, const T &src) const
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
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)
T clampMinValue(fpreal minvalue, const T &src) const
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
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 coerceValue(T &result, const S &src) const
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
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)
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
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