23 namespace SOP_FacetEnums
59 myOrientpolys =
false;
78 if (myGroup != src.myGroup)
return false;
79 if (myGroupType != src.myGroupType)
return false;
80 if (myPrenml != src.myPrenml)
return false;
81 if (myUnit != src.myUnit)
return false;
82 if (myUnique != src.myUnique)
return false;
83 if (myCons != src.myCons)
return false;
84 if (myDist != src.myDist)
return false;
85 if (myAccurate != src.myAccurate)
return false;
86 if (myInline != src.myInline)
return false;
87 if (myInlinedist != src.myInlinedist)
return false;
88 if (myOrientpolys != src.myOrientpolys)
return false;
89 if (myCusp != src.myCusp)
return false;
90 if (myAngle != src.myAngle)
return false;
91 if (myRemove != src.myRemove)
return false;
92 if (myMkplanar != src.myMkplanar)
return false;
93 if (myPostnml != src.myPostnml)
return false;
94 if (myReversenml != src.myReversenml)
return false;
111 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
114 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, 0);
117 graph->
evalOpParm(myPrenml, nodeidx,
"prenml", time, 0);
119 if (
true && ( (
true&&!(((getPrenml()==1)))) ) )
120 graph->
evalOpParm(myUnit, nodeidx,
"unit", time, 0);
123 graph->
evalOpParm(myUnique, nodeidx,
"unique", time, 0);
126 graph->
evalOpParm(myCons, nodeidx,
"cons", time, 0);
128 if (
true && ( (
true&&!(((
int64(getCons())==0)))) ) )
129 graph->
evalOpParm(myDist, nodeidx,
"dist", time, 0);
131 if (
true && ( (
true&&!(((
int64(getCons())==0)))) ) )
132 graph->
evalOpParm(myAccurate, nodeidx,
"accurate", time, 0);
135 graph->
evalOpParm(myInline, nodeidx,
"inline", time, 0);
136 myInlinedist = 0.001;
137 if (
true && ( (
true&&!(((getInline()==0)))) ) )
138 graph->
evalOpParm(myInlinedist, nodeidx,
"inlinedist", time, 0);
139 myOrientpolys =
false;
141 graph->
evalOpParm(myOrientpolys, nodeidx,
"orientPolys", time, 0);
144 graph->
evalOpParm(myCusp, nodeidx,
"cusp", time, 0);
146 if (
true && ( (
true&&!(((getCusp()==0)))) ) )
147 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
150 graph->
evalOpParm(myRemove, nodeidx,
"remove", time, 0);
153 graph->
evalOpParm(myMkplanar, nodeidx,
"mkplanar", time, 0);
156 graph->
evalOpParm(myPostnml, nodeidx,
"postnml", time, 0);
157 myReversenml =
false;
159 graph->
evalOpParm(myReversenml, nodeidx,
"reversenml", time, 0);
175 template <
typename T>
182 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 template <
typename T>
280 if (idx.
size() != instance.
size()+1)
340 { doSetParmValue(idx, instance, value); }
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); }
376 if (fieldnum.
size() < 1)
401 return "orientPolys";
421 if (fieldnum.
size() < 1)
422 return PARM_UNSUPPORTED;
480 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
482 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
484 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
497 loadData(is, rampdata);
515 int typelen = colon - data.
buffer();
529 {
int64 iv =
v; UTwrite(os, &iv); }
531 { UTwrite<fpreal64>(os, &
v); }
533 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
535 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
536 UTwrite<fpreal64>(os, &v.
z()); }
538 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
539 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
551 if (s) s->save(ostr);
553 saveData(os, result);
560 ostr << s->getDataTypeToken();
565 saveData(os, result);
569 void save(std::ostream &os)
const
573 saveData(os, myGroup);
574 saveData(os, myGroupType);
575 saveData(os, myPrenml);
576 saveData(os, myUnit);
577 saveData(os, myUnique);
578 saveData(os, myCons);
579 saveData(os, myDist);
580 saveData(os, myAccurate);
581 saveData(os, myInline);
582 saveData(os, myInlinedist);
583 saveData(os, myOrientpolys);
584 saveData(os, myCusp);
585 saveData(os, myAngle);
586 saveData(os, myRemove);
587 saveData(os, myMkplanar);
588 saveData(os, myPostnml);
589 saveData(os, myReversenml);
602 loadData(is, myGroup);
603 loadData(is, myGroupType);
604 loadData(is, myPrenml);
605 loadData(is, myUnit);
606 loadData(is, myUnique);
607 loadData(is, myCons);
608 loadData(is, myDist);
609 loadData(is, myAccurate);
610 loadData(is, myInline);
611 loadData(is, myInlinedist);
612 loadData(is, myOrientpolys);
613 loadData(is, myCusp);
614 loadData(is, myAngle);
615 loadData(is, myRemove);
616 loadData(is, myMkplanar);
617 loadData(is, myPostnml);
618 loadData(is, myReversenml);
628 if (!thissop)
return getGroup();
630 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getGroupType();
640 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getPrenml();
650 OP_Utils::evalOpParm(result, thissop,
"prenml", cookparms.
getCookTime(), 0);
658 if (!thissop)
return getUnit();
660 OP_Utils::evalOpParm(result, thissop,
"unit", cookparms.
getCookTime(), 0);
668 if (!thissop)
return getUnique();
670 OP_Utils::evalOpParm(result, thissop,
"unique", cookparms.
getCookTime(), 0);
678 if (!thissop)
return getCons();
680 OP_Utils::evalOpParm(result, thissop,
"cons", cookparms.
getCookTime(), 0);
688 if (!thissop)
return getDist();
690 OP_Utils::evalOpParm(result, thissop,
"dist", cookparms.
getCookTime(), 0);
698 if (!thissop)
return getAccurate();
700 OP_Utils::evalOpParm(result, thissop,
"accurate", cookparms.
getCookTime(), 0);
708 if (!thissop)
return getInline();
710 OP_Utils::evalOpParm(result, thissop,
"inline", cookparms.
getCookTime(), 0);
718 if (!thissop)
return getInlinedist();
720 OP_Utils::evalOpParm(result, thissop,
"inlinedist", cookparms.
getCookTime(), 0);
728 if (!thissop)
return getOrientpolys();
730 OP_Utils::evalOpParm(result, thissop,
"orientPolys", cookparms.
getCookTime(), 0);
738 if (!thissop)
return getCusp();
740 OP_Utils::evalOpParm(result, thissop,
"cusp", cookparms.
getCookTime(), 0);
748 if (!thissop)
return getAngle();
750 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
758 if (!thissop)
return getRemove();
760 OP_Utils::evalOpParm(result, thissop,
"remove", cookparms.
getCookTime(), 0);
768 if (!thissop)
return getMkplanar();
770 OP_Utils::evalOpParm(result, thissop,
"mkplanar", cookparms.
getCookTime(), 0);
778 if (!thissop)
return getPostnml();
780 OP_Utils::evalOpParm(result, thissop,
"postnml", cookparms.
getCookTime(), 0);
788 if (!thissop)
return getReversenml();
790 OP_Utils::evalOpParm(result, thissop,
"reversenml", cookparms.
getCookTime(), 0);
void save(std::ostream &os) const
bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GroupType getGroupType() const
SOP_Node * getNode() const
bool opReversenml(const SOP_NodeVerb::CookParms &cookparms) const
T clampMaxValue(fpreal maxvalue, const T &src) const
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setInlinedist(fpreal64 val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setMkplanar(bool val)
bool opUnique(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool load(UT_IStream &is)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, fpreal64 &v)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool getReversenml() const
void setGroupType(GroupType val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opUnit(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const SOP_FacetParms &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void setAngle(fpreal64 val)
bool isParmColorRamp(exint idx) const override
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, UT_Matrix4D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opMkplanar(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const OP_GraphProxy * graph() const
void setOrientpolys(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opInlinedist(const SOP_NodeVerb::CookParms &cookparms) const
Cons opCons(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool opPostnml(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void setDist(fpreal64 val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setGroup(const UT_StringHolder &val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_Matrix3D v)
GT_API const UT_StringHolder version
void setPostnml(bool val)
fpreal64 getInlinedist() const
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
bool opInline(const SOP_NodeVerb::CookParms &cookparms) const
void coerceValue(T &result, const S &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal64 getAngle() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
DEP_MicroNode * depnode() const
static void saveData(std::ostream &os, UT_Vector4D v)
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool getOrientpolys() const
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool opOrientpolys(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const char * findChar(int c) const
bool opCusp(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setReversenml(bool val)
bool operator!=(const SOP_FacetParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
ParmType getNestParmType(TempIndex fieldnum) const override
bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
void setAccurate(bool val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
const char * getNestParmName(TempIndex fieldnum) const override
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, bool &v)
bool opPrenml(const SOP_NodeVerb::CookParms &cookparms) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)