32 myIgnoreattribs =
false;
33 myIgnoregroups =
false;
51 if (myGroup != src.myGroup)
return false;
52 if (myIgnoreattribs != src.myIgnoreattribs)
return false;
53 if (myIgnoregroups != src.myIgnoregroups)
return false;
54 if (myMinpolys != src.myMinpolys)
return false;
55 if (myConvex != src.myConvex)
return false;
56 if (myUsemaxsides != src.myUsemaxsides)
return false;
57 if (myMaxsides != src.myMaxsides)
return false;
58 if (myMergeverts != src.myMergeverts)
return false;
73 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
74 myIgnoreattribs =
false;
76 graph->
evalOpParm(myIgnoreattribs, nodeidx,
"ignoreattribs", time, 0);
77 myIgnoregroups =
false;
79 graph->
evalOpParm(myIgnoregroups, nodeidx,
"ignoregroups", time, 0);
82 graph->
evalOpParm(myMinpolys, nodeidx,
"minpolys", time, 0);
85 graph->
evalOpParm(myConvex, nodeidx,
"convex", time, 0);
87 if (
true && ( (
true&&!(((getConvex()==0)))) ) )
88 graph->
evalOpParm(myUsemaxsides, nodeidx,
"usemaxsides", time, 0);
90 if (
true && ( (
true&&!(((getConvex()==0))||((getUsemaxsides()==0)))) ) )
91 graph->
evalOpParm(myMaxsides, nodeidx,
"maxsides", time, 0);
94 graph->
evalOpParm(myMergeverts, nodeidx,
"mergeverts", time, 0);
110 template <
typename T>
117 if (idx.
size() != instance.
size()+1)
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
188 if (idx.
size() != instance.
size()+1)
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 "ignoreattribs";
266 return "ignoregroups";
272 return "usemaxsides";
284 if (fieldnum.
size() < 1)
285 return PARM_UNSUPPORTED;
342 loadData(is, rampdata);
360 int typelen = colon - data.
buffer();
374 {
int64 iv =
v; UTwrite(os, &iv); }
376 { UTwrite<fpreal64>(os, &
v); }
378 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
380 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
381 UTwrite<fpreal64>(os, &v.
z()); }
383 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
384 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
396 if (s) s->save(ostr);
398 saveData(os, result);
405 ostr << s->getDataTypeToken();
410 saveData(os, result);
414 void save(std::ostream &os)
const
418 saveData(os, myGroup);
419 saveData(os, myIgnoreattribs);
420 saveData(os, myIgnoregroups);
421 saveData(os, myMinpolys);
422 saveData(os, myConvex);
423 saveData(os, myUsemaxsides);
424 saveData(os, myMaxsides);
425 saveData(os, myMergeverts);
438 loadData(is, myGroup);
439 loadData(is, myIgnoreattribs);
440 loadData(is, myIgnoregroups);
441 loadData(is, myMinpolys);
442 loadData(is, myConvex);
443 loadData(is, myUsemaxsides);
444 loadData(is, myMaxsides);
445 loadData(is, myMergeverts);
455 if (!thissop)
return getGroup();
457 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
465 if (!thissop)
return getIgnoreattribs();
467 OP_Utils::evalOpParm(result, thissop,
"ignoreattribs", cookparms.
getCookTime(), 0);
475 if (!thissop)
return getIgnoregroups();
477 OP_Utils::evalOpParm(result, thissop,
"ignoregroups", cookparms.
getCookTime(), 0);
485 if (!thissop)
return getMinpolys();
487 OP_Utils::evalOpParm(result, thissop,
"minpolys", cookparms.
getCookTime(), 0);
495 if (!thissop)
return getConvex();
497 OP_Utils::evalOpParm(result, thissop,
"convex", cookparms.
getCookTime(), 0);
505 if (!thissop)
return getUsemaxsides();
507 OP_Utils::evalOpParm(result, thissop,
"usemaxsides", cookparms.
getCookTime(), 0);
515 if (!thissop)
return getMaxsides();
517 OP_Utils::evalOpParm(result, thissop,
"maxsides", cookparms.
getCookTime(), 0);
525 if (!thissop)
return getMergeverts();
527 OP_Utils::evalOpParm(result, thissop,
"mergeverts", cookparms.
getCookTime(), 0);
533 bool myIgnoreattribs;
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SOP_Node * getNode() const
bool operator==(const SOP_PolySoupParms &src) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
int64 getMaxsides() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector2I &v)
int64 opMinpolys(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
int64 getMinpolys() const
int64 opMaxsides(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static void saveData(std::ostream &os, UT_Matrix2D v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool operator!=(const SOP_PolySoupParms &src) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opIgnoreattribs(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & x() noexcept
exint getNestNumParms(TempIndex idx) const override
void setIgnoregroups(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, int64 v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool getMergeverts() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool getIgnoregroups() const
void setMinpolys(int64 val)
bool opUsemaxsides(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool getIgnoreattribs() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
bool opIgnoregroups(const SOP_NodeVerb::CookParms &cookparms) const
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setMergeverts(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool opMergeverts(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
void setIgnoreattribs(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setUsemaxsides(bool val)
fpreal getCookTime() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const char * findChar(int c) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const char * getNestParmName(TempIndex fieldnum) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool getUsemaxsides() const
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setMaxsides(int64 val)
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
const UT_StringHolder & getGroup() const