36 myDoprojmatrix =
false;
37 myProjmatrix =
UT_Matrix4D(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
38 myDoboundingbox =
false;
44 myDonumsplits =
false;
58 if (myGroup != src.myGroup)
return false;
59 if (myConvex != src.myConvex)
return false;
60 if (myRoot3iter != src.myRoot3iter)
return false;
61 if (myDominarea != src.myDominarea)
return false;
62 if (myMinarea != src.myMinarea)
return false;
63 if (myDoprojmatrix != src.myDoprojmatrix)
return false;
64 if (myProjmatrix != src.myProjmatrix)
return false;
65 if (myDoboundingbox != src.myDoboundingbox)
return false;
66 if (mySize != src.mySize)
return false;
67 if (myCenter != src.myCenter)
return false;
68 if (myDoexpand != src.myDoexpand)
return false;
69 if (myDominedge != src.myDominedge)
return false;
70 if (myMinedge != src.myMinedge)
return false;
71 if (myDonumsplits != src.myDonumsplits)
return false;
72 if (myNumsplits != src.myNumsplits)
return false;
87 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
90 graph->
evalOpParm(myConvex, nodeidx,
"convex", time, 0);
93 graph->
evalOpParm(myRoot3iter, nodeidx,
"root3iter", time, 0);
96 graph->
evalOpParm(myDominarea, nodeidx,
"dominarea", time, 0);
98 if (
true && ( (
true&&!(((getDominarea()==0)))) ) )
99 graph->
evalOpParm(myMinarea, nodeidx,
"minarea", time, 0);
100 myDoprojmatrix =
false;
101 if (
true && ( (
true&&!(((getDominarea()==0)))) ) )
102 graph->
evalOpParm(myDoprojmatrix, nodeidx,
"doprojmatrix", time, 0);
103 myProjmatrix =
UT_Matrix4D(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
104 if (
true && ( (
true&&!(((getDoprojmatrix()==0))||((getDominarea()==0)))) ) )
105 graph->
evalOpParm(myProjmatrix, nodeidx,
"projmatrix", time, 0);
106 myDoboundingbox =
false;
107 if (
true && ( (
true&&!(((getDominarea()==0)))) ) )
108 graph->
evalOpParm(myDoboundingbox, nodeidx,
"doboundingbox", time, 0);
110 if (
true && ( (
true&&!(((getDoboundingbox()==0))||((getDominarea()==0)))) ) )
111 graph->
evalOpParm(mySize, nodeidx,
"size", time, 0);
113 if (
true && ( (
true&&!(((getDoboundingbox()==0))||((getDominarea()==0)))) ) )
114 graph->
evalOpParm(myCenter, nodeidx,
"t", time, 0);
116 if (
true && ( (
true&&!(((getDominarea()==0)))) ) )
117 graph->
evalOpParm(myDoexpand, nodeidx,
"doexpand", time, 0);
120 graph->
evalOpParm(myDominedge, nodeidx,
"dominedge", time, 0);
122 if (
true && ( (
true&&!(((getDominedge()==0)))) ) )
123 graph->
evalOpParm(myMinedge, nodeidx,
"minedge", time, 0);
124 myDonumsplits =
false;
126 graph->
evalOpParm(myDonumsplits, nodeidx,
"donumsplits", time, 0);
128 if (
true && ( (
true&&!(((getDonumsplits()==0)))) ) )
129 graph->
evalOpParm(myNumsplits, nodeidx,
"numsplits", time, 0);
145 template <
typename T>
152 if (idx.
size() != instance.
size()+1)
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 template <
typename T>
244 if (idx.
size() != instance.
size()+1)
298 { doSetParmValue(idx, instance, value); }
300 { doSetParmValue(idx, instance, value); }
302 { doSetParmValue(idx, instance, value); }
304 { doSetParmValue(idx, instance, value); }
306 { doSetParmValue(idx, instance, value); }
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
312 { doSetParmValue(idx, instance, value); }
314 { doSetParmValue(idx, instance, value); }
316 { doSetParmValue(idx, instance, value); }
318 { doSetParmValue(idx, instance, value); }
334 if (fieldnum.
size() < 1)
349 return "doprojmatrix";
353 return "doboundingbox";
365 return "donumsplits";
375 if (fieldnum.
size() < 1)
376 return PARM_UNSUPPORTED;
447 loadData(is, rampdata);
465 int typelen = colon - data.
buffer();
479 {
int64 iv =
v; UTwrite(os, &iv); }
481 { UTwrite<fpreal64>(os, &
v); }
483 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
485 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
486 UTwrite<fpreal64>(os, &v.
z()); }
488 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
489 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
501 if (s) s->save(ostr);
503 saveData(os, result);
510 ostr << s->getDataTypeToken();
515 saveData(os, result);
519 void save(std::ostream &os)
const
523 saveData(os, myGroup);
524 saveData(os, myConvex);
525 saveData(os, myRoot3iter);
526 saveData(os, myDominarea);
527 saveData(os, myMinarea);
528 saveData(os, myDoprojmatrix);
529 saveData(os, myProjmatrix);
530 saveData(os, myDoboundingbox);
531 saveData(os, mySize);
532 saveData(os, myCenter);
533 saveData(os, myDoexpand);
534 saveData(os, myDominedge);
535 saveData(os, myMinedge);
536 saveData(os, myDonumsplits);
537 saveData(os, myNumsplits);
550 loadData(is, myGroup);
551 loadData(is, myConvex);
552 loadData(is, myRoot3iter);
553 loadData(is, myDominarea);
554 loadData(is, myMinarea);
555 loadData(is, myDoprojmatrix);
556 loadData(is, myProjmatrix);
557 loadData(is, myDoboundingbox);
558 loadData(is, mySize);
559 loadData(is, myCenter);
560 loadData(is, myDoexpand);
561 loadData(is, myDominedge);
562 loadData(is, myMinedge);
563 loadData(is, myDonumsplits);
564 loadData(is, myNumsplits);
574 if (!thissop)
return getGroup();
576 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
584 if (!thissop)
return getConvex();
586 OP_Utils::evalOpParm(result, thissop,
"convex", cookparms.
getCookTime(), 0);
594 if (!thissop)
return getRoot3iter();
596 OP_Utils::evalOpParm(result, thissop,
"root3iter", cookparms.
getCookTime(), 0);
604 if (!thissop)
return getDominarea();
606 OP_Utils::evalOpParm(result, thissop,
"dominarea", cookparms.
getCookTime(), 0);
614 if (!thissop)
return getMinarea();
616 OP_Utils::evalOpParm(result, thissop,
"minarea", cookparms.
getCookTime(), 0);
624 if (!thissop)
return getDoprojmatrix();
626 OP_Utils::evalOpParm(result, thissop,
"doprojmatrix", cookparms.
getCookTime(), 0);
634 if (!thissop)
return getProjmatrix();
636 OP_Utils::evalOpParm(result, thissop,
"projmatrix", cookparms.
getCookTime(), 0);
644 if (!thissop)
return getDoboundingbox();
646 OP_Utils::evalOpParm(result, thissop,
"doboundingbox", cookparms.
getCookTime(), 0);
654 if (!thissop)
return getSize();
656 OP_Utils::evalOpParm(result, thissop,
"size", cookparms.
getCookTime(), 0);
664 if (!thissop)
return getCenter();
666 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
674 if (!thissop)
return getDoexpand();
676 OP_Utils::evalOpParm(result, thissop,
"doexpand", cookparms.
getCookTime(), 0);
684 if (!thissop)
return getDominedge();
686 OP_Utils::evalOpParm(result, thissop,
"dominedge", cookparms.
getCookTime(), 0);
694 if (!thissop)
return getMinedge();
696 OP_Utils::evalOpParm(result, thissop,
"minedge", cookparms.
getCookTime(), 0);
704 if (!thissop)
return getDonumsplits();
706 OP_Utils::evalOpParm(result, thissop,
"donumsplits", cookparms.
getCookTime(), 0);
714 if (!thissop)
return getNumsplits();
716 OP_Utils::evalOpParm(result, thissop,
"numsplits", cookparms.
getCookTime(), 0);
728 bool myDoboundingbox;
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, bool v)
void save(std::ostream &os) const
UT_Matrix4T< fpreal64 > UT_Matrix4D
static void saveData(std::ostream &os, int64 v)
const char * getNestParmName(TempIndex fieldnum) const override
void setDominarea(bool val)
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setDonumsplits(bool val)
int64 getNumsplits() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setDoprojmatrix(bool val)
bool opDonumsplits(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getCenter() const
const OP_Context & context() const
fpreal64 getMinarea() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, UT_Vector4D v)
SYS_FORCE_INLINE const char * buffer() const
void setSize(UT_Vector3D val)
UT_Vector3D getSize() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
An output stream object that owns its own string buffer storage.
bool opConvex(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
T clampMinValue(fpreal minvalue, const T &src) const
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_Vector3I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
void setDoboundingbox(bool val)
bool load(UT_IStream &is)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool getDoprojmatrix() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool getDoboundingbox() const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setMinarea(fpreal64 val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
int64 opRoot3iter(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, bool &v)
void setDoexpand(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Matrix4D getProjmatrix() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
UT_Vector3D opCenter(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
void copyFrom(const OP_NodeParms *src) override
bool opDominedge(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
void setGroup(const UT_StringHolder &val)
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 getMinedge() const
bool getDominedge() const
void setMinedge(fpreal64 val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setRoot3iter(int64 val)
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Matrix4D opProjmatrix(const SOP_NodeVerb::CookParms &cookparms) const
bool opDoprojmatrix(const SOP_NodeVerb::CookParms &cookparms) const
bool getDonumsplits() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setDominedge(bool val)
void setProjmatrix(UT_Matrix4D val)
bool isParmColorRamp(exint idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, fpreal64 v)
GT_API const UT_StringHolder version
bool operator==(const SOP_TriDivideParms &src) const
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
void coerceValue(T &result, const S &src) const
bool operator!=(const SOP_TriDivideParms &src) const
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
DEP_MicroNode * depnode() const
bool getDominarea() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
bool opDominarea(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, fpreal64 &v)
int64 opNumsplits(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal getCookTime() const
const char * findChar(int c) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
fpreal64 opMinedge(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
void setCenter(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opDoboundingbox(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void setNumsplits(int64 val)
int64 getRoot3iter() const
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opDoexpand(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opMinarea(const SOP_NodeVerb::CookParms &cookparms) const