23 namespace SOP_CircleFromEdgesEnums
46 myExplicitradius =
false;
49 myOutputedgegroup =
""_UTsh;
62 if (myGroup != src.myGroup)
return false;
63 if (myGrouptype != src.myGrouptype)
return false;
64 if (myGetboundary != src.myGetboundary)
return false;
65 if (myExplicitradius != src.myExplicitradius)
return false;
66 if (myRadius != src.myRadius)
return false;
67 if (myScale != src.myScale)
return false;
68 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
84 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
87 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
89 if (
true && ( (
true&&!(((
int64(getGrouptype())==4)))) ) )
90 graph->
evalOpParm(myGetboundary, nodeidx,
"getboundary", time, 0);
91 myExplicitradius =
false;
93 graph->
evalOpParm(myExplicitradius, nodeidx,
"explicitradius", time, 0);
95 if (
true && ( (
true&&!(((getExplicitradius()==0)))) ) )
96 graph->
evalOpParm(myRadius, nodeidx,
"radius", time, 0);
99 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
100 myOutputedgegroup =
""_UTsh;
102 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
118 template <
typename T>
125 if (idx.
size() != instance.
size()+1)
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 { doGetParmValue(idx, instance, value); }
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 { doGetParmValue(idx, instance, value); }
186 template <
typename T>
193 if (idx.
size() != instance.
size()+1)
223 { doSetParmValue(idx, instance, value); }
225 { doSetParmValue(idx, instance, value); }
227 { doSetParmValue(idx, instance, value); }
229 { doSetParmValue(idx, instance, value); }
231 { doSetParmValue(idx, instance, value); }
233 { doSetParmValue(idx, instance, value); }
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
259 if (fieldnum.
size() < 1)
268 return "getboundary";
270 return "explicitradius";
276 return "outputedgegroup";
284 if (fieldnum.
size() < 1)
285 return PARM_UNSUPPORTED;
323 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
325 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
327 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
340 loadData(is, rampdata);
358 int typelen = colon - data.
buffer();
372 {
int64 iv =
v; UTwrite(os, &iv); }
374 { UTwrite<fpreal64>(os, &
v); }
376 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
378 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
379 UTwrite<fpreal64>(os, &v.
z()); }
381 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
382 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
394 if (s) s->save(ostr);
396 saveData(os, result);
403 ostr << s->getDataTypeToken();
408 saveData(os, result);
412 void save(std::ostream &os)
const
416 saveData(os, myGroup);
417 saveData(os, myGrouptype);
418 saveData(os, myGetboundary);
419 saveData(os, myExplicitradius);
420 saveData(os, myRadius);
421 saveData(os, myScale);
422 saveData(os, myOutputedgegroup);
435 loadData(is, myGroup);
436 loadData(is, myGrouptype);
437 loadData(is, myGetboundary);
438 loadData(is, myExplicitradius);
439 loadData(is, myRadius);
440 loadData(is, myScale);
441 loadData(is, myOutputedgegroup);
451 if (!thissop)
return getGroup();
453 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
461 if (!thissop)
return getGrouptype();
463 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
471 if (!thissop)
return getGetboundary();
473 OP_Utils::evalOpParm(result, thissop,
"getboundary", cookparms.
getCookTime(), 0);
481 if (!thissop)
return getExplicitradius();
483 OP_Utils::evalOpParm(result, thissop,
"explicitradius", cookparms.
getCookTime(), 0);
491 if (!thissop)
return getRadius();
493 OP_Utils::evalOpParm(result, thissop,
"radius", cookparms.
getCookTime(), 0);
503 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
511 if (!thissop)
return getOutputedgegroup();
513 OP_Utils::evalOpParm(result, thissop,
"outputedgegroup", cookparms.
getCookTime(), 0);
521 bool myExplicitradius;
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setOutputedgegroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
T clampMaxValue(fpreal maxvalue, const T &src) const
const UT_StringHolder & getGroup() const
bool load(UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const OP_Context & context() const
static void saveData(std::ostream &os, bool v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
void setScale(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix4D v)
bool getGetboundary() const
fpreal64 getRadius() const
**But if you need a result
const UT_StringHolder & getOutputedgegroup() const
fpreal64 getScale() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setGetboundary(bool val)
T clampMinValue(fpreal minvalue, const T &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setGrouptype(Grouptype val)
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, PRM_DataItemHandle &v)
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool getExplicitradius() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
ParmType getNestParmType(TempIndex fieldnum) const override
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool operator==(const SOP_CircleFromEdgesParms &src) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const OP_GraphProxy * graph() const
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SOP_CircleFromEdgesParms()
static void saveData(std::ostream &os, PRM_DataItemHandle s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opExplicitradius(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Grouptype getGrouptype() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, int64 v)
void coerceValue(T &result, const S &src) const
bool operator!=(const SOP_CircleFromEdgesParms &src) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, int64 &v)
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal getCookTime() const
fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const char * findChar(int c) const
bool opGetboundary(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
void setExplicitradius(bool val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, bool &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opOutputedgegroup(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setRadius(fpreal64 val)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept