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;
102 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
105 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
106 myGetboundary =
true;
107 if (
true && ( (
true&&!(((
int64(getGrouptype())==4)))) ) )
108 graph->
evalOpParm(myGetboundary, nodeidx,
"getboundary", time, graph->
isDirect()?
nullptr:depnode);
109 myExplicitradius =
false;
111 graph->
evalOpParm(myExplicitradius, nodeidx,
"explicitradius", time, graph->
isDirect()?
nullptr:depnode);
113 if (
true && ( (
true&&!(((getExplicitradius()==0)))) ) )
114 graph->
evalOpParm(myRadius, nodeidx,
"radius", time, graph->
isDirect()?
nullptr:depnode);
117 graph->
evalOpParm(myScale, nodeidx,
"scale", time, graph->
isDirect()?
nullptr:depnode);
118 myOutputedgegroup =
""_UTsh;
120 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, graph->
isDirect()?
nullptr:depnode);
136 template <
typename T>
143 if (idx.
size() != instance.
size()+1)
148 coerceValue(value, myGroup);
151 coerceValue(value, myGrouptype);
154 coerceValue(value, myGetboundary);
157 coerceValue(value, myExplicitradius);
160 coerceValue(value, myRadius);
163 coerceValue(value, myScale);
166 coerceValue(value, myOutputedgegroup);
182 { doGetParmValue(idx, instance, value); }
184 { doGetParmValue(idx, instance, value); }
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 template <
typename T>
211 if (idx.
size() != instance.
size()+1)
216 coerceValue(myGroup, ( ( value ) ));
219 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
222 coerceValue(myGetboundary, ( ( value ) ));
225 coerceValue(myExplicitradius, ( ( value ) ));
228 coerceValue(myRadius, ( ( value ) ));
231 coerceValue(myScale, ( ( value ) ));
234 coerceValue(myOutputedgegroup, ( ( value ) ));
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
245 { doSetParmValue(idx, instance, value); }
247 { doSetParmValue(idx, instance, value); }
249 { doSetParmValue(idx, instance, value); }
251 { doSetParmValue(idx, instance, value); }
253 { doSetParmValue(idx, instance, value); }
255 { doSetParmValue(idx, instance, value); }
257 { doSetParmValue(idx, instance, value); }
259 { doSetParmValue(idx, instance, value); }
261 { doSetParmValue(idx, instance, value); }
277 if (fieldnum.
size() < 1)
286 return "getboundary";
288 return "explicitradius";
294 return "outputedgegroup";
302 if (fieldnum.
size() < 1)
303 return PARM_UNSUPPORTED;
322 return PARM_UNSUPPORTED;
358 loadData(is, rampdata);
376 int typelen = colon - data.
buffer();
390 {
int64 iv =
v; UTwrite(os, &iv); }
392 { UTwrite<fpreal64>(os, &
v); }
394 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
396 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
397 UTwrite<fpreal64>(os, &v.
z()); }
399 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
400 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
412 if (s) s->save(ostr);
414 saveData(os, result);
421 ostr << s->getDataTypeToken();
426 saveData(os, result);
430 void save(std::ostream &os)
const
434 saveData(os, myGroup);
435 saveData(os, myGrouptype);
436 saveData(os, myGetboundary);
437 saveData(os, myExplicitradius);
438 saveData(os, myRadius);
439 saveData(os, myScale);
440 saveData(os, myOutputedgegroup);
453 loadData(is, myGroup);
454 loadData(is, myGrouptype);
455 loadData(is, myGetboundary);
456 loadData(is, myExplicitradius);
457 loadData(is, myRadius);
458 loadData(is, myScale);
459 loadData(is, myOutputedgegroup);
469 if (!thissop)
return getGroup();
471 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
479 if (!thissop)
return getGrouptype();
481 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
489 if (!thissop)
return getGetboundary();
491 OP_Utils::evalOpParm(result, thissop,
"getboundary", cookparms.
getCookTime(), 0);
499 if (!thissop)
return getExplicitradius();
501 OP_Utils::evalOpParm(result, thissop,
"explicitradius", cookparms.
getCookTime(), 0);
509 if (!thissop)
return getRadius();
511 OP_Utils::evalOpParm(result, thissop,
"radius", cookparms.
getCookTime(), 0);
521 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
529 if (!thissop)
return getOutputedgegroup();
531 OP_Utils::evalOpParm(result, thissop,
"outputedgegroup", cookparms.
getCookTime(), 0);
539 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
GLsizei const GLfloat * value
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
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