20 using namespace UT::Literal;
23 namespace SOP_CircleFromEdgesEnums
46 myExplicitradius =
false;
48 myOutputedgegroup =
""_sh;
58 if (myGroup != src.myGroup)
return false;
59 if (myGrouptype != src.myGrouptype)
return false;
60 if (myGetboundary != src.myGetboundary)
return false;
61 if (myExplicitradius != src.myExplicitradius)
return false;
62 if (myRadius != src.myRadius)
return false;
63 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
79 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
82 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
84 if (
true && ( (!(((
int64(getGrouptype())==4)))) ) )
85 graph->
evalOpParm(myGetboundary, nodeidx,
"getboundary", time, 0);
86 myExplicitradius =
false;
88 graph->
evalOpParm(myExplicitradius, nodeidx,
"explicitradius", time, 0);
90 if (
true && ( (!(((getExplicitradius()==0)))) ) )
91 graph->
evalOpParm(myRadius, nodeidx,
"radius", time, 0);
92 myOutputedgegroup =
""_sh;
94 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
110 template <
typename T>
117 if (idx.
size() != instance.
size()+1)
122 coerceValue(value, myGroup);
125 coerceValue(value, myGrouptype);
128 coerceValue(value, myGetboundary);
131 coerceValue(value, myExplicitradius);
134 coerceValue(value, myRadius);
137 coerceValue(value, myOutputedgegroup);
144 { doGetParmValue(idx, instance, value); }
146 { doGetParmValue(idx, instance, value); }
148 { doGetParmValue(idx, instance, value); }
150 { doGetParmValue(idx, instance, value); }
152 { doGetParmValue(idx, instance, value); }
154 { doGetParmValue(idx, instance, value); }
156 { doGetParmValue(idx, instance, value); }
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 template <
typename T>
173 if (idx.
size() != instance.
size()+1)
178 coerceValue(myGroup, value);
181 coerceValue(myGrouptype, value);
184 coerceValue(myGetboundary, value);
187 coerceValue(myExplicitradius, value);
190 coerceValue(myRadius, value);
193 coerceValue(myOutputedgegroup, value);
200 { doSetParmValue(idx, instance, value); }
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, value); }
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, value); }
210 { doSetParmValue(idx, instance, value); }
212 { doSetParmValue(idx, instance, value); }
214 { doSetParmValue(idx, instance, value); }
216 { doSetParmValue(idx, instance, value); }
218 { doSetParmValue(idx, instance, value); }
220 { doSetParmValue(idx, instance, value); }
236 if (fieldnum.
size() < 1)
245 return "getboundary";
247 return "explicitradius";
251 return "outputedgegroup";
259 if (fieldnum.
size() < 1)
260 return PARM_UNSUPPORTED;
277 return PARM_UNSUPPORTED;
313 loadData(is, rampdata);
331 int typelen = colon - data.
buffer();
345 {
int64 iv =
v; UTwrite(os, &iv); }
347 { UTwrite<fpreal64>(os, &
v); }
349 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
351 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
352 UTwrite<fpreal64>(os, &v.
z()); }
354 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
355 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
367 if (s) s->save(ostr);
369 saveData(os, result);
376 ostr << s->getDataTypeToken();
381 saveData(os, result);
385 void save(std::ostream &os)
const
389 saveData(os, myGroup);
390 saveData(os, myGrouptype);
391 saveData(os, myGetboundary);
392 saveData(os, myExplicitradius);
393 saveData(os, myRadius);
394 saveData(os, myOutputedgegroup);
407 loadData(is, myGroup);
408 loadData(is, myGrouptype);
409 loadData(is, myGetboundary);
410 loadData(is, myExplicitradius);
411 loadData(is, myRadius);
412 loadData(is, myOutputedgegroup);
422 if (!thissop)
return getGroup();
424 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
432 if (!thissop)
return getGrouptype();
434 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
442 if (!thissop)
return getGetboundary();
444 OP_Utils::evalOpParm(result, thissop,
"getboundary", cookparms.
getCookTime(), 0);
452 if (!thissop)
return getExplicitradius();
454 OP_Utils::evalOpParm(result, thissop,
"explicitradius", cookparms.
getCookTime(), 0);
462 if (!thissop)
return getRadius();
464 OP_Utils::evalOpParm(result, thissop,
"radius", cookparms.
getCookTime(), 0);
472 if (!thissop)
return getOutputedgegroup();
474 OP_Utils::evalOpParm(result, thissop,
"outputedgegroup", cookparms.
getCookTime(), 0);
482 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
const UT_StringHolder & getGroup() const
bool load(UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void copyFrom(const SOP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
GLuint const GLfloat * val
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix4D v)
bool getGetboundary() const
fpreal64 getRadius() const
const UT_StringHolder & getOutputedgegroup() 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
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)
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 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)
GLint GLenum GLsizei GLint GLsizei const void * data
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
~SOP_CircleFromEdgesParms() override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SOP_CircleFromEdgesParms()
static void saveData(std::ostream &os, PRM_DataItemHandle s)
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
DEP_MicroNode * depnode() const
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)
Utility class for containing a color ramp.
GLdouble GLdouble GLdouble r
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
UT_StringHolder opOutputedgegroup(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_Matrix3D v)
const OP_Context & context() const
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
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