23 namespace SOP_SimplexRefineEnums
35 using namespace UT::Literal;
54 using namespace UT::Literal;
74 mySmoothingMethod = 0;
76 myTetMeshTreatment = 0;
89 if (myGroup != src.myGroup)
return false;
90 if (mySmoothingMethod != src.mySmoothingMethod)
return false;
91 if (mySmoothingLevel != src.mySmoothingLevel)
return false;
92 if (myTetMeshTreatment != src.myTetMeshTreatment)
return false;
109 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
110 mySmoothingMethod = 0;
112 graph->
evalOpParm(mySmoothingMethod, nodeidx,
"smoothingmethod", time, 0);
113 mySmoothingLevel = 1;
115 graph->
evalOpParm(mySmoothingLevel, nodeidx,
"smoothinglevel", time, 0);
116 myTetMeshTreatment = 0;
118 graph->
evalOpParm(myTetMeshTreatment, nodeidx,
"tetmeshtreatment", time, 0);
134 template <
typename T>
141 if (idx.
size() != instance.
size()+1)
146 coerceValue(value, myGroup);
149 coerceValue(value, mySmoothingMethod);
152 coerceValue(value, mySmoothingLevel);
155 coerceValue(value, myTetMeshTreatment);
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 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 template <
typename T>
200 if (idx.
size() != instance.
size()+1)
205 coerceValue(myGroup, ( ( value ) ));
208 coerceValue(mySmoothingMethod, clampMinValue(0, clampMaxValue(2, value ) ));
211 coerceValue(mySmoothingLevel, clampMinValue(0, ( value ) ));
214 coerceValue(myTetMeshTreatment, clampMinValue(0, clampMaxValue(2, value ) ));
221 { doSetParmValue(idx, instance, 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); }
257 if (fieldnum.
size() < 1)
264 return "smoothingmethod";
266 return "smoothinglevel";
268 return "tetmeshtreatment";
276 if (fieldnum.
size() < 1)
277 return PARM_UNSUPPORTED;
290 return PARM_UNSUPPORTED;
326 loadData(is, rampdata);
344 int typelen = colon - data.
buffer();
358 {
int64 iv =
v; UTwrite(os, &iv); }
360 { UTwrite<fpreal64>(os, &
v); }
362 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
364 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
365 UTwrite<fpreal64>(os, &v.
z()); }
367 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
368 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
380 if (s) s->save(ostr);
382 saveData(os, result);
389 ostr << s->getDataTypeToken();
394 saveData(os, result);
398 void save(std::ostream &os)
const
402 saveData(os, myGroup);
403 saveData(os, mySmoothingMethod);
404 saveData(os, mySmoothingLevel);
405 saveData(os, myTetMeshTreatment);
418 loadData(is, myGroup);
419 loadData(is, mySmoothingMethod);
420 loadData(is, mySmoothingLevel);
421 loadData(is, myTetMeshTreatment);
431 if (!thissop)
return getGroup();
433 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
441 if (!thissop)
return getSmoothingMethod();
443 OP_Utils::evalOpParm(result, thissop,
"smoothingmethod", cookparms.
getCookTime(), 0);
451 if (!thissop)
return getSmoothingLevel();
453 OP_Utils::evalOpParm(result, thissop,
"smoothinglevel", cookparms.
getCookTime(), 0);
461 if (!thissop)
return getTetMeshTreatment();
463 OP_Utils::evalOpParm(result, thissop,
"tetmeshtreatment", cookparms.
getCookTime(), 0);
469 int64 mySmoothingMethod;
470 int64 mySmoothingLevel;
471 int64 myTetMeshTreatment;
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE UT_StringHolder getToken(SmoothingMethod enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
SOP_Node * getNode() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
int64 getSmoothingLevel() const
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, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector3I &v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SmoothingMethod opSmoothingMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
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
bool isParmColorRamp(exint idx) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setSmoothingLevel(int64 val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
TetMeshTreatment opTetMeshTreatment(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & z() noexcept
SmoothingMethod getSmoothingMethod() const
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector3D v)
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, bool v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator==(const SOP_SimplexRefineParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator!=(const SOP_SimplexRefineParms &src) const
int64 opSmoothingLevel(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setSmoothingMethod(SmoothingMethod val)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
TetMeshTreatment getTetMeshTreatment() const
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal getCookTime() const
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const char * findChar(int c) const
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getGroup() const
void setTetMeshTreatment(TetMeshTreatment val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, bool &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept