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;
100 graph->
evalOpParm(myValue, nodeidx,
"value", time, graph->
isDirect()?
nullptr:depnode);
103 graph->
evalOpParm(myVoxelpad, nodeidx,
"voxelpad", time, graph->
isDirect()?
nullptr:depnode);
119 template <
typename T>
126 if (idx.
size() != instance.
size()+1)
131 coerceValue(value, myGroup);
134 coerceValue(value, myComp);
137 coerceValue(value, myValue);
140 coerceValue(value, myVoxelpad);
156 { doGetParmValue(idx, instance, value); }
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
185 if (idx.
size() != instance.
size()+1)
190 coerceValue(myGroup, ( ( value ) ));
193 coerceValue(myComp, clampMinValue(0, clampMaxValue(3, value ) ));
196 coerceValue(myValue, ( ( value ) ));
199 coerceValue(myVoxelpad, ( ( value ) ));
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, value); }
210 { doSetParmValue(idx, instance, value); }
212 { doSetParmValue(idx, instance, value); }
214 { doSetParmValue(idx, instance, value); }
216 { doSetParmValue(idx, instance, value); }
218 { doSetParmValue(idx, instance, value); }
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
242 if (fieldnum.
size() < 1)
261 if (fieldnum.
size() < 1)
262 return PARM_UNSUPPORTED;
275 return PARM_UNSUPPORTED;
311 loadData(is, rampdata);
329 int typelen = colon - data.
buffer();
343 {
int64 iv =
v; UTwrite(os, &iv); }
345 { UTwrite<fpreal64>(os, &
v); }
347 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
349 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
350 UTwrite<fpreal64>(os, &v.
z()); }
352 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
353 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
365 if (s) s->save(ostr);
367 saveData(os, result);
374 ostr << s->getDataTypeToken();
379 saveData(os, result);
383 void save(std::ostream &os)
const
387 saveData(os, myGroup);
388 saveData(os, myComp);
389 saveData(os, myValue);
390 saveData(os, myVoxelpad);
403 loadData(is, myGroup);
404 loadData(is, myComp);
405 loadData(is, myValue);
406 loadData(is, myVoxelpad);
416 if (!thissop)
return getGroup();
418 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
426 if (!thissop)
return getComp();
428 OP_Utils::evalOpParm(result, thissop,
"comp", cookparms.
getCookTime(), 0);
438 OP_Utils::evalOpParm(result, thissop,
"value", cookparms.
getCookTime(), 0);
446 if (!thissop)
return getVoxelpad();
448 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
GLsizei const GLfloat * value
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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