23 namespace SOP_CircleEnums
36 using namespace UT::Literal;
56 using namespace UT::Literal;
76 using namespace UT::Literal;
120 if (myType != src.myType)
return false;
121 if (myOrient != src.myOrient)
return false;
122 if (myReverse != src.myReverse)
return false;
123 if (myRad != src.myRad)
return false;
124 if (myT != src.myT)
return false;
125 if (myR != src.myR)
return false;
126 if (myScale != src.myScale)
return false;
127 if (
myOrder != src.myOrder)
return false;
128 if (myImperfect != src.myImperfect)
return false;
129 if (myDivs != src.myDivs)
return false;
130 if (myArc != src.myArc)
return false;
131 if (myAngle != src.myAngle)
return false;
149 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
152 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, 0);
155 graph->
evalOpParm(myReverse, nodeidx,
"reverse", time, 0);
158 graph->
evalOpParm(myRad, nodeidx,
"rad", time, 0);
161 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
164 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
167 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
169 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1)))) ) )
172 if (
true && ( (
true&&!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
173 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, 0);
175 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
176 graph->
evalOpParm(myDivs, nodeidx,
"divs", time, 0);
178 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
179 graph->
evalOpParm(myArc, nodeidx,
"arc", time, 0);
181 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
182 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
198 template <
typename T>
205 if (idx.
size() != instance.
size()+1)
210 coerceValue(value, myType);
213 coerceValue(value, myOrient);
216 coerceValue(value, myReverse);
219 coerceValue(value, myRad);
222 coerceValue(value, myT);
225 coerceValue(value, myR);
228 coerceValue(value, myScale);
234 coerceValue(value, myImperfect);
237 coerceValue(value, myDivs);
240 coerceValue(value, myArc);
243 coerceValue(value, myAngle);
259 { doGetParmValue(idx, instance, value); }
261 { doGetParmValue(idx, instance, value); }
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 { doGetParmValue(idx, instance, value); }
275 { doGetParmValue(idx, instance, value); }
277 { doGetParmValue(idx, instance, value); }
279 { doGetParmValue(idx, instance, value); }
281 template <
typename T>
288 if (idx.
size() != instance.
size()+1)
293 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
296 coerceValue(myOrient, clampMinValue(0, clampMaxValue(2, value ) ));
299 coerceValue(myReverse, ( ( value ) ));
302 coerceValue(myRad, ( ( value ) ));
305 coerceValue(myT, ( ( value ) ));
308 coerceValue(myR, ( ( value ) ));
311 coerceValue(myScale, ( ( value ) ));
314 coerceValue(
myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
317 coerceValue(myImperfect, ( ( value ) ));
320 coerceValue(myDivs, clampMinValue(1, ( value ) ));
323 coerceValue(myArc, clampMinValue(0, clampMaxValue(3, value ) ));
326 coerceValue(myAngle, ( ( value ) ));
333 { doSetParmValue(idx, instance, value); }
335 { doSetParmValue(idx, instance, value); }
337 { doSetParmValue(idx, instance, value); }
339 { doSetParmValue(idx, instance, value); }
341 { doSetParmValue(idx, instance, value); }
343 { doSetParmValue(idx, instance, value); }
345 { doSetParmValue(idx, instance, value); }
347 { doSetParmValue(idx, instance, value); }
349 { doSetParmValue(idx, instance, value); }
351 { doSetParmValue(idx, instance, value); }
353 { doSetParmValue(idx, instance, value); }
369 if (fieldnum.
size() < 1)
404 if (fieldnum.
size() < 1)
405 return PARM_UNSUPPORTED;
434 return PARM_UNSUPPORTED;
470 loadData(is, rampdata);
488 int typelen = colon - data.
buffer();
502 {
int64 iv =
v; UTwrite(os, &iv); }
504 { UTwrite<fpreal64>(os, &
v); }
506 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
508 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
509 UTwrite<fpreal64>(os, &v.
z()); }
511 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
512 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
524 if (s) s->save(ostr);
526 saveData(os, result);
533 ostr << s->getDataTypeToken();
538 saveData(os, result);
542 void save(std::ostream &os)
const
546 saveData(os, myType);
547 saveData(os, myOrient);
548 saveData(os, myReverse);
552 saveData(os, myScale);
554 saveData(os, myImperfect);
555 saveData(os, myDivs);
557 saveData(os, myAngle);
570 loadData(is, myType);
571 loadData(is, myOrient);
572 loadData(is, myReverse);
576 loadData(is, myScale);
578 loadData(is, myImperfect);
579 loadData(is, myDivs);
581 loadData(is, myAngle);
591 if (!thissop)
return getType();
593 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
601 if (!thissop)
return getOrient();
603 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
611 if (!thissop)
return getReverse();
613 OP_Utils::evalOpParm(result, thissop,
"reverse", cookparms.
getCookTime(), 0);
621 if (!thissop)
return getRad();
623 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
631 if (!thissop)
return getT();
633 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
641 if (!thissop)
return getR();
643 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
653 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
661 if (!thissop)
return getOrder();
663 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
671 if (!thissop)
return getImperfect();
673 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
681 if (!thissop)
return getDivs();
683 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
691 if (!thissop)
return getArc();
693 OP_Utils::evalOpParm(result, thissop,
"arc", cookparms.
getCookTime(), 0);
701 if (!thissop)
return getAngle();
703 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
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
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
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
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
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)
LeafData & operator=(const LeafData &)=delete
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)
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