38 myAvoidsmallangles =
false;
46 myFixsharededges =
true;
49 myDualattribstoswap =
"* ^P"_UTsh;
62 if (myGroup != src.myGroup)
return false;
63 if (myConvex != src.myConvex)
return false;
64 if (myUsemaxsides != src.myUsemaxsides)
return false;
65 if (myNumsides != src.myNumsides)
return false;
66 if (myPlanar != src.myPlanar)
return false;
67 if (myPlantol != src.myPlantol)
return false;
68 if (myNoslivers != src.myNoslivers)
return false;
69 if (myAvoidsmallangles != src.myAvoidsmallangles)
return false;
70 if (mySmooth != src.mySmooth)
return false;
71 if (myWeight != src.myWeight)
return false;
72 if (myDivs != src.myDivs)
return false;
73 if (myBrick != src.myBrick)
return false;
74 if (mySize != src.mySize)
return false;
75 if (myOffset != src.myOffset)
return false;
76 if (myAngle != src.myAngle)
return false;
77 if (myFixsharededges != src.myFixsharededges)
return false;
78 if (myRemovesh != src.myRemovesh)
return false;
79 if (myDual != src.myDual)
return false;
80 if (myDualattribstoswap != src.myDualattribstoswap)
return false;
95 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
98 graph->
evalOpParm(myConvex, nodeidx,
"convex", time, 0);
100 if (
true && ( (
true&&!(((getConvex()==0)))) ) )
101 graph->
evalOpParm(myUsemaxsides, nodeidx,
"usemaxsides", time, 0);
103 if (
true && ( (
true&&!(((getConvex()==0))||((getUsemaxsides()==0)))) ) )
104 graph->
evalOpParm(myNumsides, nodeidx,
"numsides", time, 0);
106 if (
true && ( (
true&&!(((getConvex()==0)))) ) )
107 graph->
evalOpParm(myPlanar, nodeidx,
"planar", time, 0);
109 if (
true && ( (
true&&!(((getConvex()==0))||((getPlanar()==0)))) ) )
110 graph->
evalOpParm(myPlantol, nodeidx,
"plantol", time, 0);
113 graph->
evalOpParm(myNoslivers, nodeidx,
"noslivers", time, 0);
114 myAvoidsmallangles =
false;
116 graph->
evalOpParm(myAvoidsmallangles, nodeidx,
"avoidsmallangles", time, 0);
119 graph->
evalOpParm(mySmooth, nodeidx,
"smooth", time, 0);
121 if (
true && ( (
true&&!(((getSmooth()==0)))) ) )
122 graph->
evalOpParm(myWeight, nodeidx,
"weight", time, 0);
124 if (
true && ( (
true&&!(((getSmooth()==0)))) ) )
125 graph->
evalOpParm(myDivs, nodeidx,
"divs", time, 0);
128 graph->
evalOpParm(myBrick, nodeidx,
"brick", time, 0);
130 if (
true && ( (
true&&!(((getBrick()==0)))) ) )
131 graph->
evalOpParm(mySize, nodeidx,
"size", time, 0);
133 if (
true && ( (
true&&!(((getBrick()==0)))) ) )
134 graph->
evalOpParm(myOffset, nodeidx,
"offset", time, 0);
136 if (
true && ( (
true&&!(((getBrick()==0)))) ) )
137 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
138 myFixsharededges =
true;
139 if (
true && ( (
true&&!(((getBrick()==0)))) ) )
140 graph->
evalOpParm(myFixsharededges, nodeidx,
"fixsharededges", time, 0);
143 graph->
evalOpParm(myRemovesh, nodeidx,
"removesh", time, 0);
146 graph->
evalOpParm(myDual, nodeidx,
"dual", time, 0);
147 myDualattribstoswap =
"* ^P"_UTsh;
148 if (
true && ( (
true&&!(((getDual()==0)))) ) )
149 graph->
evalOpParm(myDualattribstoswap, nodeidx,
"dualattribstoswap", time, 0);
165 template <
typename T>
172 if (idx.
size() != instance.
size()+1)
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 { doGetParmValue(idx, instance, value); }
257 { doGetParmValue(idx, instance, value); }
259 { doGetParmValue(idx, instance, value); }
261 { doGetParmValue(idx, instance, value); }
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 template <
typename T>
276 if (idx.
size() != instance.
size()+1)
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
356 { doSetParmValue(idx, instance, value); }
358 { doSetParmValue(idx, instance, value); }
360 { doSetParmValue(idx, instance, value); }
362 { doSetParmValue(idx, instance, value); }
378 if (fieldnum.
size() < 1)
387 return "usemaxsides";
397 return "avoidsmallangles";
413 return "fixsharededges";
419 return "dualattribstoswap";
427 if (fieldnum.
size() < 1)
428 return PARM_UNSUPPORTED;
507 loadData(is, rampdata);
525 int typelen = colon - data.
buffer();
539 {
int64 iv =
v; UTwrite(os, &iv); }
541 { UTwrite<fpreal64>(os, &
v); }
543 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
545 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
546 UTwrite<fpreal64>(os, &v.
z()); }
548 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
549 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
561 if (s) s->save(ostr);
563 saveData(os, result);
570 ostr << s->getDataTypeToken();
575 saveData(os, result);
579 void save(std::ostream &os)
const
583 saveData(os, myGroup);
584 saveData(os, myConvex);
585 saveData(os, myUsemaxsides);
586 saveData(os, myNumsides);
587 saveData(os, myPlanar);
588 saveData(os, myPlantol);
589 saveData(os, myNoslivers);
590 saveData(os, myAvoidsmallangles);
591 saveData(os, mySmooth);
592 saveData(os, myWeight);
593 saveData(os, myDivs);
594 saveData(os, myBrick);
595 saveData(os, mySize);
596 saveData(os, myOffset);
597 saveData(os, myAngle);
598 saveData(os, myFixsharededges);
599 saveData(os, myRemovesh);
600 saveData(os, myDual);
601 saveData(os, myDualattribstoswap);
614 loadData(is, myGroup);
615 loadData(is, myConvex);
616 loadData(is, myUsemaxsides);
617 loadData(is, myNumsides);
618 loadData(is, myPlanar);
619 loadData(is, myPlantol);
620 loadData(is, myNoslivers);
621 loadData(is, myAvoidsmallangles);
622 loadData(is, mySmooth);
623 loadData(is, myWeight);
624 loadData(is, myDivs);
625 loadData(is, myBrick);
626 loadData(is, mySize);
627 loadData(is, myOffset);
628 loadData(is, myAngle);
629 loadData(is, myFixsharededges);
630 loadData(is, myRemovesh);
631 loadData(is, myDual);
632 loadData(is, myDualattribstoswap);
642 if (!thissop)
return getGroup();
644 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
652 if (!thissop)
return getConvex();
654 OP_Utils::evalOpParm(result, thissop,
"convex", cookparms.
getCookTime(), 0);
662 if (!thissop)
return getUsemaxsides();
664 OP_Utils::evalOpParm(result, thissop,
"usemaxsides", cookparms.
getCookTime(), 0);
672 if (!thissop)
return getNumsides();
674 OP_Utils::evalOpParm(result, thissop,
"numsides", cookparms.
getCookTime(), 0);
682 if (!thissop)
return getPlanar();
684 OP_Utils::evalOpParm(result, thissop,
"planar", cookparms.
getCookTime(), 0);
692 if (!thissop)
return getPlantol();
694 OP_Utils::evalOpParm(result, thissop,
"plantol", cookparms.
getCookTime(), 0);
702 if (!thissop)
return getNoslivers();
704 OP_Utils::evalOpParm(result, thissop,
"noslivers", cookparms.
getCookTime(), 0);
712 if (!thissop)
return getAvoidsmallangles();
714 OP_Utils::evalOpParm(result, thissop,
"avoidsmallangles", cookparms.
getCookTime(), 0);
722 if (!thissop)
return getSmooth();
724 OP_Utils::evalOpParm(result, thissop,
"smooth", cookparms.
getCookTime(), 0);
732 if (!thissop)
return getWeight();
734 OP_Utils::evalOpParm(result, thissop,
"weight", cookparms.
getCookTime(), 0);
742 if (!thissop)
return getDivs();
744 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
752 if (!thissop)
return getBrick();
754 OP_Utils::evalOpParm(result, thissop,
"brick", cookparms.
getCookTime(), 0);
762 if (!thissop)
return getSize();
764 OP_Utils::evalOpParm(result, thissop,
"size", cookparms.
getCookTime(), 0);
772 if (!thissop)
return getOffset();
774 OP_Utils::evalOpParm(result, thissop,
"offset", cookparms.
getCookTime(), 0);
782 if (!thissop)
return getAngle();
784 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
792 if (!thissop)
return getFixsharededges();
794 OP_Utils::evalOpParm(result, thissop,
"fixsharededges", cookparms.
getCookTime(), 0);
802 if (!thissop)
return getRemovesh();
804 OP_Utils::evalOpParm(result, thissop,
"removesh", cookparms.
getCookTime(), 0);
812 if (!thissop)
return getDual();
814 OP_Utils::evalOpParm(result, thissop,
"dual", cookparms.
getCookTime(), 0);
822 if (!thissop)
return getDualattribstoswap();
824 OP_Utils::evalOpParm(result, thissop,
"dualattribstoswap", cookparms.
getCookTime(), 0);
836 bool myAvoidsmallangles;
844 bool myFixsharededges;
static void loadData(UT_IStream &is, fpreal64 &v)
bool isParmColorRamp(exint idx) const override
void setFixsharededges(bool val)
SOP_Node * getNode() const
bool opRemovesh(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opNoslivers(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setSize(UT_Vector3D val)
exint bread(int32 *buffer, exint asize=1)
void setOffset(UT_Vector3D val)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector2T< fpreal64 > UT_Vector2D
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 getPlantol() const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, bool v)
bool opFixsharededges(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE const char * buffer() const
bool opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_Vector3D opOffset(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool opDual(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
void setNoslivers(bool val)
void save(std::ostream &os) const
T clampMinValue(fpreal minvalue, const T &src) const
UT_Vector2D getWeight() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector3I &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.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Vector2D v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setDualattribstoswap(const UT_StringHolder &val)
UT_Vector3D opAngle(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
void setWeight(UT_Vector2D val)
void setNumsides(int64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
void setRemovesh(bool val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setAngle(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Matrix2D v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
int64 getNumsides() const
bool operator==(const SOP_DivideParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool getUsemaxsides() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool opPlanar(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void setPlantol(fpreal64 val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getDualattribstoswap() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
bool getNoslivers() const
bool getAvoidsmallangles() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void coerceValue(T &result, const S &src) const
fpreal64 opPlantol(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getOffset() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setUsemaxsides(bool val)
DEP_MicroNode * depnode() const
bool operator!=(const SOP_DivideParms &src) const
Utility class for containing a color ramp.
UT_StringHolder opDualattribstoswap(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
UT_Vector3D getSize() const
bool opAvoidsmallangles(const SOP_NodeVerb::CookParms &cookparms) const
bool opUsemaxsides(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal getCookTime() const
static void loadData(UT_IStream &is, int64 &v)
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
int64 opNumsides(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const char * findChar(int c) const
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_Vector3D getAngle() const
UT_Vector2D opWeight(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setAvoidsmallangles(bool val)
void setGroup(const UT_StringHolder &val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool getFixsharededges() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
const UT_StringHolder & getGroup() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opBrick(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept