23 namespace SOP_CircleFromEdgesEnums
37 using namespace UT::Literal;
61 myExplicitradius =
false;
64 myOutputedgegroup =
""_UTsh;
77 if (myGroup != src.myGroup)
return false;
78 if (myGrouptype != src.myGrouptype)
return false;
79 if (myGetboundary != src.myGetboundary)
return false;
80 if (myExplicitradius != src.myExplicitradius)
return false;
81 if (myRadius != src.myRadius)
return false;
82 if (myScale != src.myScale)
return false;
83 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
99 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
102 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
103 myGetboundary =
true;
104 if (
true && ( (
true&&!(((
int64(getGrouptype())==4)))) ) )
105 graph->
evalOpParm(myGetboundary, nodeidx,
"getboundary", time, 0);
106 myExplicitradius =
false;
108 graph->
evalOpParm(myExplicitradius, nodeidx,
"explicitradius", time, 0);
110 if (
true && ( (
true&&!(((getExplicitradius()==0)))) ) )
111 graph->
evalOpParm(myRadius, nodeidx,
"radius", time, 0);
114 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
115 myOutputedgegroup =
""_UTsh;
117 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
133 template <
typename T>
140 if (idx.
size() != instance.
size()+1)
145 coerceValue(value, myGroup);
148 coerceValue(value, myGrouptype);
151 coerceValue(value, myGetboundary);
154 coerceValue(value, myExplicitradius);
157 coerceValue(value, myRadius);
160 coerceValue(value, myScale);
163 coerceValue(value, myOutputedgegroup);
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 { doGetParmValue(idx, instance, value); }
201 template <
typename T>
208 if (idx.
size() != instance.
size()+1)
213 coerceValue(myGroup, ( ( value ) ));
216 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
219 coerceValue(myGetboundary, ( ( value ) ));
222 coerceValue(myExplicitradius, ( ( value ) ));
225 coerceValue(myRadius, ( ( value ) ));
228 coerceValue(myScale, ( ( value ) ));
231 coerceValue(myOutputedgegroup, ( ( value ) ));
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
258 { doSetParmValue(idx, instance, value); }
274 if (fieldnum.
size() < 1)
283 return "getboundary";
285 return "explicitradius";
291 return "outputedgegroup";
299 if (fieldnum.
size() < 1)
300 return PARM_UNSUPPORTED;
319 return PARM_UNSUPPORTED;
355 loadData(is, rampdata);
373 int typelen = colon - data.
buffer();
387 {
int64 iv =
v; UTwrite(os, &iv); }
389 { UTwrite<fpreal64>(os, &
v); }
391 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
394 UTwrite<fpreal64>(os, &v.
z()); }
396 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
397 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
409 if (s) s->save(ostr);
411 saveData(os, result);
418 ostr << s->getDataTypeToken();
423 saveData(os, result);
427 void save(std::ostream &os)
const
431 saveData(os, myGroup);
432 saveData(os, myGrouptype);
433 saveData(os, myGetboundary);
434 saveData(os, myExplicitradius);
435 saveData(os, myRadius);
436 saveData(os, myScale);
437 saveData(os, myOutputedgegroup);
450 loadData(is, myGroup);
451 loadData(is, myGrouptype);
452 loadData(is, myGetboundary);
453 loadData(is, myExplicitradius);
454 loadData(is, myRadius);
455 loadData(is, myScale);
456 loadData(is, myOutputedgegroup);
466 if (!thissop)
return getGroup();
468 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
476 if (!thissop)
return getGrouptype();
478 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
486 if (!thissop)
return getGetboundary();
488 OP_Utils::evalOpParm(result, thissop,
"getboundary", cookparms.
getCookTime(), 0);
496 if (!thissop)
return getExplicitradius();
498 OP_Utils::evalOpParm(result, thissop,
"explicitradius", cookparms.
getCookTime(), 0);
506 if (!thissop)
return getRadius();
508 OP_Utils::evalOpParm(result, thissop,
"radius", cookparms.
getCookTime(), 0);
518 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
526 if (!thissop)
return getOutputedgegroup();
528 OP_Utils::evalOpParm(result, thissop,
"outputedgegroup", cookparms.
getCookTime(), 0);
536 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)
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
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)
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)
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
LeafData & operator=(const LeafData &)=delete
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)
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