23 namespace SOP_CircleEnums
79 if (myType != src.myType)
return false;
80 if (myOrient != src.myOrient)
return false;
81 if (myReverse != src.myReverse)
return false;
82 if (myRad != src.myRad)
return false;
83 if (myT != src.myT)
return false;
84 if (myR != src.myR)
return false;
85 if (myScale != src.myScale)
return false;
86 if (
myOrder != src.myOrder)
return false;
87 if (myImperfect != src.myImperfect)
return false;
88 if (myDivs != src.myDivs)
return false;
89 if (myArc != src.myArc)
return false;
90 if (myAngle != src.myAngle)
return false;
108 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
111 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, 0);
114 graph->
evalOpParm(myReverse, nodeidx,
"reverse", time, 0);
117 graph->
evalOpParm(myRad, nodeidx,
"rad", time, 0);
120 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
123 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
126 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
128 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1)))) ) )
131 if (
true && ( (
true&&!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
132 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, 0);
134 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
135 graph->
evalOpParm(myDivs, nodeidx,
"divs", time, 0);
137 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
138 graph->
evalOpParm(myArc, nodeidx,
"arc", time, 0);
140 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
141 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
157 template <
typename T>
164 if (idx.
size() != instance.
size()+1)
218 { doGetParmValue(idx, instance, value); }
220 { doGetParmValue(idx, instance, value); }
222 { doGetParmValue(idx, instance, value); }
224 { doGetParmValue(idx, instance, value); }
226 { doGetParmValue(idx, instance, value); }
228 { doGetParmValue(idx, instance, value); }
230 { doGetParmValue(idx, instance, value); }
232 { doGetParmValue(idx, instance, value); }
234 { doGetParmValue(idx, instance, value); }
236 { doGetParmValue(idx, instance, value); }
238 { doGetParmValue(idx, instance, value); }
240 template <
typename T>
247 if (idx.
size() != instance.
size()+1)
292 { doSetParmValue(idx, instance, value); }
294 { doSetParmValue(idx, instance, value); }
296 { doSetParmValue(idx, instance, value); }
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); }
328 if (fieldnum.
size() < 1)
363 if (fieldnum.
size() < 1)
364 return PARM_UNSUPPORTED;
412 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
414 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
416 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
429 loadData(is, rampdata);
447 int typelen = colon - data.
buffer();
461 {
int64 iv =
v; UTwrite(os, &iv); }
463 { UTwrite<fpreal64>(os, &
v); }
465 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
467 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
468 UTwrite<fpreal64>(os, &v.
z()); }
470 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
471 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
483 if (s) s->save(ostr);
485 saveData(os, result);
492 ostr << s->getDataTypeToken();
497 saveData(os, result);
501 void save(std::ostream &os)
const
505 saveData(os, myType);
506 saveData(os, myOrient);
507 saveData(os, myReverse);
511 saveData(os, myScale);
513 saveData(os, myImperfect);
514 saveData(os, myDivs);
516 saveData(os, myAngle);
529 loadData(is, myType);
530 loadData(is, myOrient);
531 loadData(is, myReverse);
535 loadData(is, myScale);
537 loadData(is, myImperfect);
538 loadData(is, myDivs);
540 loadData(is, myAngle);
550 if (!thissop)
return getType();
552 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
560 if (!thissop)
return getOrient();
562 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
570 if (!thissop)
return getReverse();
572 OP_Utils::evalOpParm(result, thissop,
"reverse", cookparms.
getCookTime(), 0);
580 if (!thissop)
return getRad();
582 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
590 if (!thissop)
return getT();
592 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
600 if (!thissop)
return getR();
602 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
612 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
620 if (!thissop)
return getOrder();
622 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
630 if (!thissop)
return getImperfect();
632 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
640 if (!thissop)
return getDivs();
642 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
650 if (!thissop)
return getArc();
652 OP_Utils::evalOpParm(result, thissop,
"arc", cookparms.
getCookTime(), 0);
660 if (!thissop)
return getAngle();
662 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_Vector2D opRad(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal64 getScale() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
T clampMaxValue(fpreal maxvalue, const T &src) const
void copyFrom(const OP_NodeParms *src) override
exint bread(int32 *buffer, exint asize=1)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setT(UT_Vector3D val)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector2T< fpreal64 > UT_Vector2D
bool getImperfect() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
void loadFromOpSubclass(const LoadParms &loadparms) override
SYS_FORCE_INLINE const char * buffer() const
Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
UT_Vector2D getRad() const
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
Arc opArc(const SOP_NodeVerb::CookParms &cookparms) const
T clampMinValue(fpreal minvalue, const T &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setReverse(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_Vector2D getAngle() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & z() noexcept
bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
void setAngle(UT_Vector2D val)
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, bool v)
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, int64 &v)
bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_Vector3T< fpreal64 > UT_Vector3D
static void loadData(UT_IStream &is, UT_Vector3D &v)
void save(std::ostream &os) const
void setRad(UT_Vector2D val)
UT_Vector2D opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool isParmColorRamp(exint idx) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, fpreal64 &v)
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
bool operator!=(const SOP_CircleParms &src) const
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setR(UT_Vector3D val)
static void saveData(std::ostream &os, UT_Matrix4D v)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
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.
bool load(UT_IStream &is)
void setImperfect(bool val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
fpreal getCookTime() const
int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setScale(fpreal64 val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator==(const SOP_CircleParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setOrient(Orient val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Vector4D v)
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept