20 using namespace UT::Literal;
23 namespace SOP_VolumeFFTEnums
56 if (myGroup != src.myGroup)
return false;
57 if (myCenterDC != src.myCenterDC)
return false;
58 if (myInvert != src.myInvert)
return false;
59 if (myNormalize != src.myNormalize)
return false;
60 if (mySlices != src.mySlices)
return false;
61 if (myVoxelplane != src.myVoxelplane)
return false;
77 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
80 graph->
evalOpParm(myCenterDC, nodeidx,
"centerdc", time, 0);
83 graph->
evalOpParm(myInvert, nodeidx,
"invert", time, 0);
86 graph->
evalOpParm(myNormalize, nodeidx,
"normalize", time, 0);
89 graph->
evalOpParm(mySlices, nodeidx,
"slices", time, 0);
91 if (
true && ( (!(((getSlices()==0)))) ) )
92 graph->
evalOpParm(myVoxelplane, nodeidx,
"voxelplane", time, 0);
108 template <
typename T>
115 if (idx.
size() != instance.
size()+1)
120 coerceValue(value, myGroup);
123 coerceValue(value, myCenterDC);
126 coerceValue(value, myInvert);
129 coerceValue(value, myNormalize);
132 coerceValue(value, mySlices);
135 coerceValue(value, myVoxelplane);
142 { doGetParmValue(idx, instance, value); }
144 { doGetParmValue(idx, instance, value); }
146 { doGetParmValue(idx, instance, value); }
148 { doGetParmValue(idx, instance, value); }
150 { doGetParmValue(idx, instance, value); }
152 { doGetParmValue(idx, instance, value); }
154 { doGetParmValue(idx, instance, value); }
156 { doGetParmValue(idx, instance, value); }
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
162 { doGetParmValue(idx, instance, value); }
164 template <
typename T>
171 if (idx.
size() != instance.
size()+1)
176 coerceValue(myGroup, value);
179 coerceValue(myCenterDC, value);
182 coerceValue(myInvert, value);
185 coerceValue(myNormalize, value);
188 coerceValue(mySlices, value);
191 coerceValue(myVoxelplane, value);
198 { doSetParmValue(idx, instance, value); }
200 { doSetParmValue(idx, instance, value); }
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, 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); }
234 if (fieldnum.
size() < 1)
257 if (fieldnum.
size() < 1)
258 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, myCenterDC);
389 saveData(os, myInvert);
390 saveData(os, myNormalize);
391 saveData(os, mySlices);
392 saveData(os, myVoxelplane);
405 loadData(is, myGroup);
406 loadData(is, myCenterDC);
407 loadData(is, myInvert);
408 loadData(is, myNormalize);
409 loadData(is, mySlices);
410 loadData(is, myVoxelplane);
420 if (!thissop)
return getGroup();
422 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
430 if (!thissop)
return getCenterDC();
432 OP_Utils::evalOpParm(result, thissop,
"centerdc", cookparms.
getCookTime(), 0);
440 if (!thissop)
return getInvert();
442 OP_Utils::evalOpParm(result, thissop,
"invert", cookparms.
getCookTime(), 0);
450 if (!thissop)
return getNormalize();
452 OP_Utils::evalOpParm(result, thissop,
"normalize", cookparms.
getCookTime(), 0);
460 if (!thissop)
return getSlices();
462 OP_Utils::evalOpParm(result, thissop,
"slices", cookparms.
getCookTime(), 0);
470 if (!thissop)
return getVoxelplane();
472 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)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GLuint const GLfloat * val
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)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector3D v)
const SOP_GraphProxy * graph() const
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)
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
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)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLint GLenum GLsizei GLint GLsizei const void * data
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)
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)
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
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
DEP_MicroNode * depnode() const
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)
static void loadData(UT_IStream &is, UT_Vector4D &v)
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
GLdouble GLdouble GLdouble r
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
bool opCenterDC(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const SOP_NodeParms *src) override
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)
GLsizei const GLfloat * value
void setNormalize(bool val)
const OP_Context & context() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
~SOP_VolumeFFTParms() override
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
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override