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;
99 graph->
evalOpParm(myCenterDC, nodeidx,
"centerdc", time, graph->
isDirect()?
nullptr:depnode);
102 graph->
evalOpParm(myInvert, nodeidx,
"invert", time, graph->
isDirect()?
nullptr:depnode);
105 graph->
evalOpParm(myNormalize, nodeidx,
"normalize", time, graph->
isDirect()?
nullptr:depnode);
108 graph->
evalOpParm(mySlices, nodeidx,
"slices", time, graph->
isDirect()?
nullptr:depnode);
110 if (
true && ( (
true&&!(((getSlices()==0)))) ) )
111 graph->
evalOpParm(myVoxelplane, nodeidx,
"voxelplane", time, graph->
isDirect()?
nullptr:depnode);
127 template <
typename T>
134 if (idx.
size() != instance.
size()+1)
139 coerceValue(value, myGroup);
142 coerceValue(value, myCenterDC);
145 coerceValue(value, myInvert);
148 coerceValue(value, myNormalize);
151 coerceValue(value, mySlices);
154 coerceValue(value, myVoxelplane);
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 { doGetParmValue(idx, instance, value); }
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 template <
typename T>
199 if (idx.
size() != instance.
size()+1)
204 coerceValue(myGroup, ( ( value ) ));
207 coerceValue(myCenterDC, ( ( value ) ));
210 coerceValue(myInvert, ( ( value ) ));
213 coerceValue(myNormalize, ( ( value ) ));
216 coerceValue(mySlices, ( ( value ) ));
219 coerceValue(myVoxelplane, clampMinValue(0, clampMaxValue(2, value ) ));
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
262 if (fieldnum.
size() < 1)
285 if (fieldnum.
size() < 1)
286 return PARM_UNSUPPORTED;
303 return PARM_UNSUPPORTED;
339 loadData(is, rampdata);
357 int typelen = colon - data.
buffer();
371 {
int64 iv =
v; UTwrite(os, &iv); }
373 { UTwrite<fpreal64>(os, &
v); }
375 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
377 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
378 UTwrite<fpreal64>(os, &v.
z()); }
380 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
381 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
393 if (s) s->save(ostr);
395 saveData(os, result);
402 ostr << s->getDataTypeToken();
407 saveData(os, result);
411 void save(std::ostream &os)
const
415 saveData(os, myGroup);
416 saveData(os, myCenterDC);
417 saveData(os, myInvert);
418 saveData(os, myNormalize);
419 saveData(os, mySlices);
420 saveData(os, myVoxelplane);
433 loadData(is, myGroup);
434 loadData(is, myCenterDC);
435 loadData(is, myInvert);
436 loadData(is, myNormalize);
437 loadData(is, mySlices);
438 loadData(is, myVoxelplane);
448 if (!thissop)
return getGroup();
450 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
458 if (!thissop)
return getCenterDC();
460 OP_Utils::evalOpParm(result, thissop,
"centerdc", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getInvert();
470 OP_Utils::evalOpParm(result, thissop,
"invert", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getNormalize();
480 OP_Utils::evalOpParm(result, thissop,
"normalize", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getSlices();
490 OP_Utils::evalOpParm(result, thissop,
"slices", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getVoxelplane();
500 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
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, bool &v)
void setNormalize(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
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