20 using namespace UT::Literal;
35 myDetectverts =
false;
37 myUseinputnumattrib =
false;
38 myInputnumattrib =
"sourceinput"_sh;
39 myUseprimnumattrib =
false;
40 myPrimnumattrib =
"sourceprim"_sh;
41 myUseprimuvwattrib =
false;
42 myPrimuvwattrib =
"sourceprimuv"_sh;
43 myUseptnumattrib =
false;
44 myPtnumattrib =
"sourceptnum"_sh;
54 if (myAgroup != src.myAgroup)
return false;
55 if (myBgroup != src.myBgroup)
return false;
56 if (myUseproxtol != src.myUseproxtol)
return false;
57 if (myProxtol != src.myProxtol)
return false;
58 if (myDetectverts != src.myDetectverts)
return false;
59 if (myOutputsegs != src.myOutputsegs)
return false;
60 if (myUseinputnumattrib != src.myUseinputnumattrib)
return false;
61 if (myInputnumattrib != src.myInputnumattrib)
return false;
62 if (myUseprimnumattrib != src.myUseprimnumattrib)
return false;
63 if (myPrimnumattrib != src.myPrimnumattrib)
return false;
64 if (myUseprimuvwattrib != src.myUseprimuvwattrib)
return false;
65 if (myPrimuvwattrib != src.myPrimuvwattrib)
return false;
66 if (myUseptnumattrib != src.myUseptnumattrib)
return false;
67 if (myPtnumattrib != src.myPtnumattrib)
return false;
82 graph->
evalOpParm(myAgroup, nodeidx,
"agroup", time, 0);
85 graph->
evalOpParm(myBgroup, nodeidx,
"bgroup", time, 0);
88 graph->
evalOpParm(myUseproxtol, nodeidx,
"useproxtol", time, 0);
90 if (
true && ( (!(((getUseproxtol()==0)))) ) )
91 graph->
evalOpParm(myProxtol, nodeidx,
"proxtol", time, 0);
92 myDetectverts =
false;
94 graph->
evalOpParm(myDetectverts, nodeidx,
"detectverts", time, 0);
97 graph->
evalOpParm(myOutputsegs, nodeidx,
"outputsegs", time, 0);
98 myUseinputnumattrib =
false;
100 graph->
evalOpParm(myUseinputnumattrib, nodeidx,
"useinputnumattrib", time, 0);
101 myInputnumattrib =
"sourceinput"_sh;
102 if (
true && ( (!(((getUseinputnumattrib()==0)))) ) )
103 graph->
evalOpParm(myInputnumattrib, nodeidx,
"inputnumattrib", time, 0);
104 myUseprimnumattrib =
false;
106 graph->
evalOpParm(myUseprimnumattrib, nodeidx,
"useprimnumattrib", time, 0);
107 myPrimnumattrib =
"sourceprim"_sh;
108 if (
true && ( (!(((getUseprimnumattrib()==0)))) ) )
109 graph->
evalOpParm(myPrimnumattrib, nodeidx,
"primnumattrib", time, 0);
110 myUseprimuvwattrib =
false;
112 graph->
evalOpParm(myUseprimuvwattrib, nodeidx,
"useprimuvwattrib", time, 0);
113 myPrimuvwattrib =
"sourceprimuv"_sh;
114 if (
true && ( (!(((getUseprimuvwattrib()==0)))) ) )
115 graph->
evalOpParm(myPrimuvwattrib, nodeidx,
"primuvwattrib", time, 0);
116 myUseptnumattrib =
false;
118 graph->
evalOpParm(myUseptnumattrib, nodeidx,
"useptnumattrib", time, 0);
119 myPtnumattrib =
"sourceptnum"_sh;
120 if (
true && ( (!(((getUseptnumattrib()==0)))) ) )
121 graph->
evalOpParm(myPtnumattrib, nodeidx,
"ptnumattrib", time, 0);
137 template <
typename T>
144 if (idx.
size() != instance.
size()+1)
149 coerceValue(value, myAgroup);
152 coerceValue(value, myBgroup);
155 coerceValue(value, myUseproxtol);
158 coerceValue(value, myProxtol);
161 coerceValue(value, myDetectverts);
164 coerceValue(value, myOutputsegs);
167 coerceValue(value, myUseinputnumattrib);
170 coerceValue(value, myInputnumattrib);
173 coerceValue(value, myUseprimnumattrib);
176 coerceValue(value, myPrimnumattrib);
179 coerceValue(value, myUseprimuvwattrib);
182 coerceValue(value, myPrimuvwattrib);
185 coerceValue(value, myUseptnumattrib);
188 coerceValue(value, myPtnumattrib);
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 template <
typename T>
224 if (idx.
size() != instance.
size()+1)
229 coerceValue(myAgroup, value);
232 coerceValue(myBgroup, value);
235 coerceValue(myUseproxtol, value);
238 coerceValue(myProxtol, value);
241 coerceValue(myDetectverts, value);
244 coerceValue(myOutputsegs, value);
247 coerceValue(myUseinputnumattrib, value);
250 coerceValue(myInputnumattrib, value);
253 coerceValue(myUseprimnumattrib, value);
256 coerceValue(myPrimnumattrib, value);
259 coerceValue(myUseprimuvwattrib, value);
262 coerceValue(myPrimuvwattrib, value);
265 coerceValue(myUseptnumattrib, value);
268 coerceValue(myPtnumattrib, value);
275 { doSetParmValue(idx, instance, value); }
277 { doSetParmValue(idx, instance, value); }
279 { doSetParmValue(idx, instance, value); }
281 { doSetParmValue(idx, instance, value); }
283 { doSetParmValue(idx, instance, value); }
285 { doSetParmValue(idx, instance, value); }
287 { doSetParmValue(idx, instance, value); }
289 { doSetParmValue(idx, instance, value); }
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
311 if (fieldnum.
size() < 1)
324 return "detectverts";
328 return "useinputnumattrib";
330 return "inputnumattrib";
332 return "useprimnumattrib";
334 return "primnumattrib";
336 return "useprimuvwattrib";
338 return "primuvwattrib";
340 return "useptnumattrib";
342 return "ptnumattrib";
350 if (fieldnum.
size() < 1)
351 return PARM_UNSUPPORTED;
384 return PARM_UNSUPPORTED;
420 loadData(is, rampdata);
438 int typelen = colon - data.
buffer();
452 {
int64 iv =
v; UTwrite(os, &iv); }
454 { UTwrite<fpreal64>(os, &
v); }
456 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
458 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
459 UTwrite<fpreal64>(os, &v.
z()); }
461 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
462 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
474 if (s) s->save(ostr);
476 saveData(os, result);
483 ostr << s->getDataTypeToken();
488 saveData(os, result);
492 void save(std::ostream &os)
const
496 saveData(os, myAgroup);
497 saveData(os, myBgroup);
498 saveData(os, myUseproxtol);
499 saveData(os, myProxtol);
500 saveData(os, myDetectverts);
501 saveData(os, myOutputsegs);
502 saveData(os, myUseinputnumattrib);
503 saveData(os, myInputnumattrib);
504 saveData(os, myUseprimnumattrib);
505 saveData(os, myPrimnumattrib);
506 saveData(os, myUseprimuvwattrib);
507 saveData(os, myPrimuvwattrib);
508 saveData(os, myUseptnumattrib);
509 saveData(os, myPtnumattrib);
522 loadData(is, myAgroup);
523 loadData(is, myBgroup);
524 loadData(is, myUseproxtol);
525 loadData(is, myProxtol);
526 loadData(is, myDetectverts);
527 loadData(is, myOutputsegs);
528 loadData(is, myUseinputnumattrib);
529 loadData(is, myInputnumattrib);
530 loadData(is, myUseprimnumattrib);
531 loadData(is, myPrimnumattrib);
532 loadData(is, myUseprimuvwattrib);
533 loadData(is, myPrimuvwattrib);
534 loadData(is, myUseptnumattrib);
535 loadData(is, myPtnumattrib);
545 if (!thissop)
return getAgroup();
547 OP_Utils::evalOpParm(result, thissop,
"agroup", cookparms.
getCookTime(), 0);
555 if (!thissop)
return getBgroup();
557 OP_Utils::evalOpParm(result, thissop,
"bgroup", cookparms.
getCookTime(), 0);
565 if (!thissop)
return getUseproxtol();
567 OP_Utils::evalOpParm(result, thissop,
"useproxtol", cookparms.
getCookTime(), 0);
575 if (!thissop)
return getProxtol();
577 OP_Utils::evalOpParm(result, thissop,
"proxtol", cookparms.
getCookTime(), 0);
585 if (!thissop)
return getDetectverts();
587 OP_Utils::evalOpParm(result, thissop,
"detectverts", cookparms.
getCookTime(), 0);
595 if (!thissop)
return getOutputsegs();
597 OP_Utils::evalOpParm(result, thissop,
"outputsegs", cookparms.
getCookTime(), 0);
605 if (!thissop)
return getUseinputnumattrib();
607 OP_Utils::evalOpParm(result, thissop,
"useinputnumattrib", cookparms.
getCookTime(), 0);
615 if (!thissop)
return getInputnumattrib();
617 OP_Utils::evalOpParm(result, thissop,
"inputnumattrib", cookparms.
getCookTime(), 0);
625 if (!thissop)
return getUseprimnumattrib();
627 OP_Utils::evalOpParm(result, thissop,
"useprimnumattrib", cookparms.
getCookTime(), 0);
635 if (!thissop)
return getPrimnumattrib();
637 OP_Utils::evalOpParm(result, thissop,
"primnumattrib", cookparms.
getCookTime(), 0);
645 if (!thissop)
return getUseprimuvwattrib();
647 OP_Utils::evalOpParm(result, thissop,
"useprimuvwattrib", cookparms.
getCookTime(), 0);
655 if (!thissop)
return getPrimuvwattrib();
657 OP_Utils::evalOpParm(result, thissop,
"primuvwattrib", cookparms.
getCookTime(), 0);
665 if (!thissop)
return getUseptnumattrib();
667 OP_Utils::evalOpParm(result, thissop,
"useptnumattrib", cookparms.
getCookTime(), 0);
675 if (!thissop)
return getPtnumattrib();
677 OP_Utils::evalOpParm(result, thissop,
"ptnumattrib", cookparms.
getCookTime(), 0);
688 bool myUseinputnumattrib;
690 bool myUseprimnumattrib;
692 bool myUseprimuvwattrib;
694 bool myUseptnumattrib;
static void saveData(std::ostream &os, UT_Matrix2D v)
bool getUseproxtol() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
exint getNestNumParms(TempIndex idx) const override
bool opUseproxtol(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SOP_Node * getNode() const
UT_StringHolder opPrimuvwattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setPtnumattrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Vector4D v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setUseptnumattrib(bool val)
GLuint const GLfloat * val
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal64 getProxtol() const
void setUseprimuvwattrib(bool val)
fpreal64 opProxtol(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
An output stream object that owns its own string buffer storage.
bool getOutputsegs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool getDetectverts() const
bool opUseprimnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPrimuvwattrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setPrimnumattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool getUseptnumattrib() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opUseprimuvwattrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getAgroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
GLint GLenum GLsizei GLint GLsizei const void * data
void copyFrom(const SOP_NodeParms *src) override
static void loadData(UT_IStream &is, int64 &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setOutputsegs(bool val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const UT_StringHolder & getPrimnumattrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opInputnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getBgroup() const
bool operator!=(const SOP_IntersectionAnalysisParms &src) const
bool getUseprimnumattrib() const
void setUseprimnumattrib(bool val)
void setProxtol(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
UT_StringHolder opAgroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
static void saveData(std::ostream &os, fpreal64 v)
UT_StringHolder opPtnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool getUseinputnumattrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setBgroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
UT_StringHolder opPrimnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
bool getUseprimuvwattrib() const
SOP_IntersectionAnalysisParms()
bool opUseptnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
~SOP_IntersectionAnalysisParms() override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLdouble GLdouble GLdouble r
static void saveData(std::ostream &os, UT_Vector2D v)
void setUseproxtol(bool val)
bool opUseinputnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const char * findChar(int c) const
void setUseinputnumattrib(bool val)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setInputnumattrib(const UT_StringHolder &val)
void setPrimuvwattrib(const UT_StringHolder &val)
const UT_StringHolder & getPtnumattrib() const
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLsizei const GLfloat * value
void setDetectverts(bool val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opBgroup(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
void save(std::ostream &os) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
bool opDetectverts(const SOP_NodeVerb::CookParms &cookparms) const
void setAgroup(const UT_StringHolder &val)
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getInputnumattrib() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool operator==(const SOP_IntersectionAnalysisParms &src) const
static void saveData(std::ostream &os, bool v)
bool opOutputsegs(const SOP_NodeVerb::CookParms &cookparms) const