23 namespace SOP_VolumeBoundEnums
36 using namespace UT::Literal;
72 if (myGroup != src.myGroup)
return false;
73 if (myComp != src.myComp)
return false;
74 if (myValue != src.myValue)
return false;
75 if (myVoxelpad != src.myVoxelpad)
return false;
91 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
94 graph->
evalOpParm(myComp, nodeidx,
"comp", time, 0);
97 graph->
evalOpParm(myValue, nodeidx,
"value", time, 0);
100 graph->
evalOpParm(myVoxelpad, nodeidx,
"voxelpad", time, 0);
116 template <
typename T>
123 if (idx.
size() != instance.
size()+1)
128 coerceValue(value, myGroup);
131 coerceValue(value, myComp);
134 coerceValue(value, myValue);
137 coerceValue(value, myVoxelpad);
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
182 if (idx.
size() != instance.
size()+1)
187 coerceValue(myGroup, ( ( value ) ));
190 coerceValue(myComp, clampMinValue(0, clampMaxValue(3, value ) ));
193 coerceValue(myValue, ( ( value ) ));
196 coerceValue(myVoxelpad, ( ( value ) ));
203 { doSetParmValue(idx, instance, value); }
205 { doSetParmValue(idx, instance, value); }
207 { doSetParmValue(idx, instance, value); }
209 { doSetParmValue(idx, instance, value); }
211 { doSetParmValue(idx, instance, value); }
213 { doSetParmValue(idx, instance, value); }
215 { doSetParmValue(idx, instance, value); }
217 { doSetParmValue(idx, instance, value); }
219 { doSetParmValue(idx, instance, value); }
221 { doSetParmValue(idx, instance, value); }
223 { doSetParmValue(idx, instance, value); }
239 if (fieldnum.
size() < 1)
258 if (fieldnum.
size() < 1)
259 return PARM_UNSUPPORTED;
272 return PARM_UNSUPPORTED;
308 loadData(is, rampdata);
326 int typelen = colon - data.
buffer();
340 {
int64 iv =
v; UTwrite(os, &iv); }
342 { UTwrite<fpreal64>(os, &
v); }
344 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
346 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
347 UTwrite<fpreal64>(os, &v.
z()); }
349 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
350 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
362 if (s) s->save(ostr);
364 saveData(os, result);
371 ostr << s->getDataTypeToken();
376 saveData(os, result);
380 void save(std::ostream &os)
const
384 saveData(os, myGroup);
385 saveData(os, myComp);
386 saveData(os, myValue);
387 saveData(os, myVoxelpad);
400 loadData(is, myGroup);
401 loadData(is, myComp);
402 loadData(is, myValue);
403 loadData(is, myVoxelpad);
413 if (!thissop)
return getGroup();
415 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
423 if (!thissop)
return getComp();
425 OP_Utils::evalOpParm(result, thissop,
"comp", cookparms.
getCookTime(), 0);
435 OP_Utils::evalOpParm(result, thissop,
"value", cookparms.
getCookTime(), 0);
443 if (!thissop)
return getVoxelpad();
445 OP_Utils::evalOpParm(result, thissop,
"voxelpad", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
Comp opComp(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
bool isParmColorRamp(exint idx) const override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool operator!=(const SOP_VolumeBoundParms &src) const
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
void setValue(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
fpreal64 getValue() const
An output stream object that owns its own string buffer storage.
**But if you need a result
void copyFrom(const OP_NodeParms *src) override
bool operator==(const SOP_VolumeBoundParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
__hostdev__ float getValue(uint32_t i) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
UT_Vector3D opVoxelpad(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void loadFromOpSubclass(const LoadParms &loadparms) override
SYS_FORCE_INLINE UT_StringHolder getToken(Comp enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Vector3D &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
static void saveData(std::ostream &os, UT_Vector4D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, bool v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
fpreal64 opValue(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setVoxelpad(UT_Vector3D val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, fpreal64 v)
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_StringHolder s)
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, int64 v)
fpreal getCookTime() const
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector3D getVoxelpad() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override