23 namespace SOP_FacetEnums
35 using namespace UT::Literal;
56 using namespace UT::Literal;
87 myOrientpolys =
false;
106 if (myGroup != src.myGroup)
return false;
107 if (myGroupType != src.myGroupType)
return false;
108 if (myPrenml != src.myPrenml)
return false;
109 if (myUnit != src.myUnit)
return false;
110 if (myUnique != src.myUnique)
return false;
111 if (myCons != src.myCons)
return false;
112 if (myDist != src.myDist)
return false;
113 if (myAccurate != src.myAccurate)
return false;
114 if (myInline != src.myInline)
return false;
115 if (myInlinedist != src.myInlinedist)
return false;
116 if (myOrientpolys != src.myOrientpolys)
return false;
117 if (myCusp != src.myCusp)
return false;
118 if (myAngle != src.myAngle)
return false;
119 if (myRemove != src.myRemove)
return false;
120 if (myMkplanar != src.myMkplanar)
return false;
121 if (myPostnml != src.myPostnml)
return false;
122 if (myReversenml != src.myReversenml)
return false;
139 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
142 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, 0);
145 graph->
evalOpParm(myPrenml, nodeidx,
"prenml", time, 0);
147 if (
true && ( (
true&&!(((getPrenml()==1)))) ) )
148 graph->
evalOpParm(myUnit, nodeidx,
"unit", time, 0);
151 graph->
evalOpParm(myUnique, nodeidx,
"unique", time, 0);
154 graph->
evalOpParm(myCons, nodeidx,
"cons", time, 0);
156 if (
true && ( (
true&&!(((
int64(getCons())==0)))) ) )
157 graph->
evalOpParm(myDist, nodeidx,
"dist", time, 0);
159 if (
true && ( (
true&&!(((
int64(getCons())==0)))) ) )
160 graph->
evalOpParm(myAccurate, nodeidx,
"accurate", time, 0);
163 graph->
evalOpParm(myInline, nodeidx,
"inline", time, 0);
164 myInlinedist = 0.001;
165 if (
true && ( (
true&&!(((getInline()==0)))) ) )
166 graph->
evalOpParm(myInlinedist, nodeidx,
"inlinedist", time, 0);
167 myOrientpolys =
false;
169 graph->
evalOpParm(myOrientpolys, nodeidx,
"orientPolys", time, 0);
172 graph->
evalOpParm(myCusp, nodeidx,
"cusp", time, 0);
174 if (
true && ( (
true&&!(((getCusp()==0)))) ) )
175 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
178 graph->
evalOpParm(myRemove, nodeidx,
"remove", time, 0);
181 graph->
evalOpParm(myMkplanar, nodeidx,
"mkplanar", time, 0);
184 graph->
evalOpParm(myPostnml, nodeidx,
"postnml", time, 0);
185 myReversenml =
false;
187 graph->
evalOpParm(myReversenml, nodeidx,
"reversenml", time, 0);
203 template <
typename T>
210 if (idx.
size() != instance.
size()+1)
215 coerceValue(value, myGroup);
218 coerceValue(value, myGroupType);
221 coerceValue(value, myPrenml);
224 coerceValue(value, myUnit);
227 coerceValue(value, myUnique);
230 coerceValue(value, myCons);
233 coerceValue(value, myDist);
236 coerceValue(value, myAccurate);
239 coerceValue(value, myInline);
242 coerceValue(value, myInlinedist);
245 coerceValue(value, myOrientpolys);
248 coerceValue(value, myCusp);
251 coerceValue(value, myAngle);
254 coerceValue(value, myRemove);
257 coerceValue(value, myMkplanar);
260 coerceValue(value, myPostnml);
263 coerceValue(value, myReversenml);
279 { doGetParmValue(idx, instance, value); }
281 { doGetParmValue(idx, instance, value); }
283 { doGetParmValue(idx, instance, value); }
285 { doGetParmValue(idx, instance, value); }
287 { doGetParmValue(idx, instance, value); }
289 { doGetParmValue(idx, instance, value); }
291 { doGetParmValue(idx, instance, value); }
293 { doGetParmValue(idx, instance, value); }
295 { doGetParmValue(idx, instance, value); }
297 { doGetParmValue(idx, instance, value); }
299 { doGetParmValue(idx, instance, value); }
301 template <
typename T>
308 if (idx.
size() != instance.
size()+1)
313 coerceValue(myGroup, ( ( value ) ));
316 coerceValue(myGroupType, clampMinValue(0, clampMaxValue(2, value ) ));
319 coerceValue(myPrenml, ( ( value ) ));
322 coerceValue(myUnit, ( ( value ) ));
325 coerceValue(myUnique, ( ( value ) ));
328 coerceValue(myCons, clampMinValue(0, clampMaxValue(4, value ) ));
331 coerceValue(myDist, ( ( value ) ));
334 coerceValue(myAccurate, ( ( value ) ));
337 coerceValue(myInline, ( ( value ) ));
340 coerceValue(myInlinedist, ( ( value ) ));
343 coerceValue(myOrientpolys, ( ( value ) ));
346 coerceValue(myCusp, ( ( value ) ));
349 coerceValue(myAngle, ( ( value ) ));
352 coerceValue(myRemove, ( ( value ) ));
355 coerceValue(myMkplanar, ( ( value ) ));
358 coerceValue(myPostnml, ( ( value ) ));
361 coerceValue(myReversenml, ( ( value ) ));
368 { doSetParmValue(idx, instance, value); }
370 { doSetParmValue(idx, instance, value); }
372 { doSetParmValue(idx, instance, value); }
374 { doSetParmValue(idx, instance, value); }
376 { doSetParmValue(idx, instance, value); }
378 { doSetParmValue(idx, instance, value); }
380 { doSetParmValue(idx, instance, value); }
382 { doSetParmValue(idx, instance, value); }
384 { doSetParmValue(idx, instance, value); }
386 { doSetParmValue(idx, instance, value); }
388 { doSetParmValue(idx, instance, value); }
404 if (fieldnum.
size() < 1)
429 return "orientPolys";
449 if (fieldnum.
size() < 1)
450 return PARM_UNSUPPORTED;
489 return PARM_UNSUPPORTED;
525 loadData(is, rampdata);
543 int typelen = colon - data.
buffer();
557 {
int64 iv =
v; UTwrite(os, &iv); }
559 { UTwrite<fpreal64>(os, &
v); }
561 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
563 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
564 UTwrite<fpreal64>(os, &v.
z()); }
566 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
567 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
579 if (s) s->save(ostr);
581 saveData(os, result);
588 ostr << s->getDataTypeToken();
593 saveData(os, result);
597 void save(std::ostream &os)
const
601 saveData(os, myGroup);
602 saveData(os, myGroupType);
603 saveData(os, myPrenml);
604 saveData(os, myUnit);
605 saveData(os, myUnique);
606 saveData(os, myCons);
607 saveData(os, myDist);
608 saveData(os, myAccurate);
609 saveData(os, myInline);
610 saveData(os, myInlinedist);
611 saveData(os, myOrientpolys);
612 saveData(os, myCusp);
613 saveData(os, myAngle);
614 saveData(os, myRemove);
615 saveData(os, myMkplanar);
616 saveData(os, myPostnml);
617 saveData(os, myReversenml);
630 loadData(is, myGroup);
631 loadData(is, myGroupType);
632 loadData(is, myPrenml);
633 loadData(is, myUnit);
634 loadData(is, myUnique);
635 loadData(is, myCons);
636 loadData(is, myDist);
637 loadData(is, myAccurate);
638 loadData(is, myInline);
639 loadData(is, myInlinedist);
640 loadData(is, myOrientpolys);
641 loadData(is, myCusp);
642 loadData(is, myAngle);
643 loadData(is, myRemove);
644 loadData(is, myMkplanar);
645 loadData(is, myPostnml);
646 loadData(is, myReversenml);
656 if (!thissop)
return getGroup();
658 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getGroupType();
668 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getPrenml();
678 OP_Utils::evalOpParm(result, thissop,
"prenml", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getUnit();
688 OP_Utils::evalOpParm(result, thissop,
"unit", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getUnique();
698 OP_Utils::evalOpParm(result, thissop,
"unique", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getCons();
708 OP_Utils::evalOpParm(result, thissop,
"cons", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getDist();
718 OP_Utils::evalOpParm(result, thissop,
"dist", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getAccurate();
728 OP_Utils::evalOpParm(result, thissop,
"accurate", cookparms.
getCookTime(), 0);
736 if (!thissop)
return getInline();
738 OP_Utils::evalOpParm(result, thissop,
"inline", cookparms.
getCookTime(), 0);
746 if (!thissop)
return getInlinedist();
748 OP_Utils::evalOpParm(result, thissop,
"inlinedist", cookparms.
getCookTime(), 0);
756 if (!thissop)
return getOrientpolys();
758 OP_Utils::evalOpParm(result, thissop,
"orientPolys", cookparms.
getCookTime(), 0);
766 if (!thissop)
return getCusp();
768 OP_Utils::evalOpParm(result, thissop,
"cusp", cookparms.
getCookTime(), 0);
776 if (!thissop)
return getAngle();
778 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
786 if (!thissop)
return getRemove();
788 OP_Utils::evalOpParm(result, thissop,
"remove", cookparms.
getCookTime(), 0);
796 if (!thissop)
return getMkplanar();
798 OP_Utils::evalOpParm(result, thissop,
"mkplanar", cookparms.
getCookTime(), 0);
806 if (!thissop)
return getPostnml();
808 OP_Utils::evalOpParm(result, thissop,
"postnml", cookparms.
getCookTime(), 0);
816 if (!thissop)
return getReversenml();
818 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
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
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)
SYS_FORCE_INLINE UT_StringHolder getToken(GroupType enum_value)
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 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)
LeafData & operator=(const LeafData &)=delete
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
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)