23 namespace SOP_VolumeFFTEnums
35 using namespace UT::Literal;
72 if (myGroup != src.myGroup)
return false;
73 if (myCenterDC != src.myCenterDC)
return false;
74 if (myInvert != src.myInvert)
return false;
75 if (myNormalize != src.myNormalize)
return false;
76 if (mySlices != src.mySlices)
return false;
77 if (myVoxelplane != src.myVoxelplane)
return false;
93 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
96 graph->
evalOpParm(myCenterDC, nodeidx,
"centerdc", time, 0);
99 graph->
evalOpParm(myInvert, nodeidx,
"invert", time, 0);
102 graph->
evalOpParm(myNormalize, nodeidx,
"normalize", time, 0);
105 graph->
evalOpParm(mySlices, nodeidx,
"slices", time, 0);
107 if (
true && ( (
true&&!(((getSlices()==0)))) ) )
108 graph->
evalOpParm(myVoxelplane, nodeidx,
"voxelplane", time, 0);
124 template <
typename T>
131 if (idx.
size() != instance.
size()+1)
136 coerceValue(value, myGroup);
139 coerceValue(value, myCenterDC);
142 coerceValue(value, myInvert);
145 coerceValue(value, myNormalize);
148 coerceValue(value, mySlices);
151 coerceValue(value, myVoxelplane);
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
196 if (idx.
size() != instance.
size()+1)
201 coerceValue(myGroup, ( ( value ) ));
204 coerceValue(myCenterDC, ( ( value ) ));
207 coerceValue(myInvert, ( ( value ) ));
210 coerceValue(myNormalize, ( ( value ) ));
213 coerceValue(mySlices, ( ( value ) ));
216 coerceValue(myVoxelplane, clampMinValue(0, clampMaxValue(2, value ) ));
223 { doSetParmValue(idx, instance, value); }
225 { doSetParmValue(idx, instance, value); }
227 { doSetParmValue(idx, instance, value); }
229 { doSetParmValue(idx, instance, value); }
231 { doSetParmValue(idx, instance, value); }
233 { doSetParmValue(idx, instance, value); }
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
259 if (fieldnum.
size() < 1)
282 if (fieldnum.
size() < 1)
283 return PARM_UNSUPPORTED;
300 return PARM_UNSUPPORTED;
336 loadData(is, rampdata);
354 int typelen = colon - data.
buffer();
368 {
int64 iv =
v; UTwrite(os, &iv); }
370 { UTwrite<fpreal64>(os, &
v); }
372 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
374 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
375 UTwrite<fpreal64>(os, &v.
z()); }
377 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
378 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
390 if (s) s->save(ostr);
392 saveData(os, result);
399 ostr << s->getDataTypeToken();
404 saveData(os, result);
408 void save(std::ostream &os)
const
412 saveData(os, myGroup);
413 saveData(os, myCenterDC);
414 saveData(os, myInvert);
415 saveData(os, myNormalize);
416 saveData(os, mySlices);
417 saveData(os, myVoxelplane);
430 loadData(is, myGroup);
431 loadData(is, myCenterDC);
432 loadData(is, myInvert);
433 loadData(is, myNormalize);
434 loadData(is, mySlices);
435 loadData(is, myVoxelplane);
445 if (!thissop)
return getGroup();
447 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
455 if (!thissop)
return getCenterDC();
457 OP_Utils::evalOpParm(result, thissop,
"centerdc", cookparms.
getCookTime(), 0);
465 if (!thissop)
return getInvert();
467 OP_Utils::evalOpParm(result, thissop,
"invert", cookparms.
getCookTime(), 0);
475 if (!thissop)
return getNormalize();
477 OP_Utils::evalOpParm(result, thissop,
"normalize", cookparms.
getCookTime(), 0);
485 if (!thissop)
return getSlices();
487 OP_Utils::evalOpParm(result, thissop,
"slices", cookparms.
getCookTime(), 0);
495 if (!thissop)
return getVoxelplane();
497 OP_Utils::evalOpParm(result, thissop,
"voxelplane", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setCenterDC(bool val)
static void saveData(std::ostream &os, bool v)
bool isParmColorRamp(exint idx) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool opInvert(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, fpreal64 v)
**But if you need a result
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
Voxelplane getVoxelplane() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
exint getNestNumParms(TempIndex idx) const override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
constexpr SYS_FORCE_INLINE T & x() noexcept
void save(std::ostream &os) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool getNormalize() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
Voxelplane opVoxelplane(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator==(const SOP_VolumeFFTParms &src) const
bool load(UT_IStream &is)
SYS_FORCE_INLINE UT_StringHolder getToken(Voxelplane enum_value)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setVoxelplane(Voxelplane val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setGroup(const UT_StringHolder &val)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
fpreal getCookTime() const
static void loadData(UT_IStream &is, int64 &v)
const char * findChar(int c) const
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool opSlices(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opCenterDC(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const char * getNestParmName(TempIndex fieldnum) const override
bool operator!=(const SOP_VolumeFFTParms &src) const
static void loadData(UT_IStream &is, bool &v)
void setNormalize(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override