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;
112 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
113 mySmoothingMethod = 0;
115 graph->
evalOpParm(mySmoothingMethod, nodeidx,
"smoothingmethod", time, graph->
isDirect()?
nullptr:depnode);
116 mySmoothingLevel = 1;
118 graph->
evalOpParm(mySmoothingLevel, nodeidx,
"smoothinglevel", time, graph->
isDirect()?
nullptr:depnode);
119 myTetMeshTreatment = 0;
121 graph->
evalOpParm(myTetMeshTreatment, nodeidx,
"tetmeshtreatment", time, graph->
isDirect()?
nullptr:depnode);
137 template <
typename T>
144 if (idx.
size() != instance.
size()+1)
149 coerceValue(value, myGroup);
152 coerceValue(value, mySmoothingMethod);
155 coerceValue(value, mySmoothingLevel);
158 coerceValue(value, myTetMeshTreatment);
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 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 template <
typename T>
203 if (idx.
size() != instance.
size()+1)
208 coerceValue(myGroup, ( ( value ) ));
211 coerceValue(mySmoothingMethod, clampMinValue(0, clampMaxValue(2, value ) ));
214 coerceValue(mySmoothingLevel, clampMinValue(0, ( value ) ));
217 coerceValue(myTetMeshTreatment, clampMinValue(0, clampMaxValue(2, value ) ));
224 { doSetParmValue(idx, instance, 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); }
260 if (fieldnum.
size() < 1)
267 return "smoothingmethod";
269 return "smoothinglevel";
271 return "tetmeshtreatment";
279 if (fieldnum.
size() < 1)
280 return PARM_UNSUPPORTED;
293 return PARM_UNSUPPORTED;
329 loadData(is, rampdata);
347 int typelen = colon - data.
buffer();
361 {
int64 iv =
v; UTwrite(os, &iv); }
363 { UTwrite<fpreal64>(os, &
v); }
365 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
367 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
368 UTwrite<fpreal64>(os, &v.
z()); }
370 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
371 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
383 if (s) s->save(ostr);
385 saveData(os, result);
392 ostr << s->getDataTypeToken();
397 saveData(os, result);
401 void save(std::ostream &os)
const
405 saveData(os, myGroup);
406 saveData(os, mySmoothingMethod);
407 saveData(os, mySmoothingLevel);
408 saveData(os, myTetMeshTreatment);
421 loadData(is, myGroup);
422 loadData(is, mySmoothingMethod);
423 loadData(is, mySmoothingLevel);
424 loadData(is, myTetMeshTreatment);
434 if (!thissop)
return getGroup();
436 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
444 if (!thissop)
return getSmoothingMethod();
446 OP_Utils::evalOpParm(result, thissop,
"smoothingmethod", cookparms.
getCookTime(), 0);
454 if (!thissop)
return getSmoothingLevel();
456 OP_Utils::evalOpParm(result, thissop,
"smoothinglevel", cookparms.
getCookTime(), 0);
464 if (!thissop)
return getTetMeshTreatment();
466 OP_Utils::evalOpParm(result, thissop,
"tetmeshtreatment", cookparms.
getCookTime(), 0);
472 int64 mySmoothingMethod;
473 int64 mySmoothingLevel;
474 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)
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
const UT_StringHolder & getGroup() const
void setTetMeshTreatment(TetMeshTreatment val)
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