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;
155 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, graph->
isDirect()?
nullptr:depnode);
158 graph->
evalOpParm(myReverse, nodeidx,
"reverse", time, graph->
isDirect()?
nullptr:depnode);
170 graph->
evalOpParm(myScale, nodeidx,
"scale", time, graph->
isDirect()?
nullptr:depnode);
172 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1)))) ) )
175 if (
true && ( (
true&&!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
176 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, graph->
isDirect()?
nullptr:depnode);
178 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
181 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
184 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==2)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
185 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, graph->
isDirect()?
nullptr:depnode);
201 template <
typename T>
208 if (idx.
size() != instance.
size()+1)
213 coerceValue(value, myType);
216 coerceValue(value, myOrient);
219 coerceValue(value, myReverse);
222 coerceValue(value, myRad);
225 coerceValue(value, myT);
228 coerceValue(value, myR);
231 coerceValue(value, myScale);
237 coerceValue(value, myImperfect);
240 coerceValue(value, myDivs);
243 coerceValue(value, myArc);
246 coerceValue(value, myAngle);
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 { doGetParmValue(idx, instance, value); }
272 { doGetParmValue(idx, instance, value); }
274 { doGetParmValue(idx, instance, value); }
276 { doGetParmValue(idx, instance, value); }
278 { doGetParmValue(idx, instance, value); }
280 { doGetParmValue(idx, instance, value); }
282 { doGetParmValue(idx, instance, value); }
284 template <
typename T>
291 if (idx.
size() != instance.
size()+1)
296 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
299 coerceValue(myOrient, clampMinValue(0, clampMaxValue(2, value ) ));
302 coerceValue(myReverse, ( ( value ) ));
305 coerceValue(myRad, ( ( value ) ));
308 coerceValue(myT, ( ( value ) ));
311 coerceValue(myR, ( ( value ) ));
314 coerceValue(myScale, ( ( value ) ));
317 coerceValue(
myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
320 coerceValue(myImperfect, ( ( value ) ));
323 coerceValue(myDivs, clampMinValue(1, ( value ) ));
326 coerceValue(myArc, clampMinValue(0, clampMaxValue(3, value ) ));
329 coerceValue(myAngle, ( ( value ) ));
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
356 { doSetParmValue(idx, instance, value); }
372 if (fieldnum.
size() < 1)
407 if (fieldnum.
size() < 1)
408 return PARM_UNSUPPORTED;
437 return PARM_UNSUPPORTED;
473 loadData(is, rampdata);
491 int typelen = colon - data.
buffer();
505 {
int64 iv =
v; UTwrite(os, &iv); }
507 { UTwrite<fpreal64>(os, &
v); }
509 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
511 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
512 UTwrite<fpreal64>(os, &v.
z()); }
514 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
515 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
527 if (s) s->save(ostr);
529 saveData(os, result);
536 ostr << s->getDataTypeToken();
541 saveData(os, result);
545 void save(std::ostream &os)
const
549 saveData(os, myType);
550 saveData(os, myOrient);
551 saveData(os, myReverse);
555 saveData(os, myScale);
557 saveData(os, myImperfect);
558 saveData(os, myDivs);
560 saveData(os, myAngle);
573 loadData(is, myType);
574 loadData(is, myOrient);
575 loadData(is, myReverse);
579 loadData(is, myScale);
581 loadData(is, myImperfect);
582 loadData(is, myDivs);
584 loadData(is, myAngle);
594 if (!thissop)
return getType();
596 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
604 if (!thissop)
return getOrient();
606 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
614 if (!thissop)
return getReverse();
616 OP_Utils::evalOpParm(result, thissop,
"reverse", cookparms.
getCookTime(), 0);
624 if (!thissop)
return getRad();
626 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
634 if (!thissop)
return getT();
636 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
644 if (!thissop)
return getR();
646 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
656 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
664 if (!thissop)
return getOrder();
666 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
674 if (!thissop)
return getImperfect();
676 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
684 if (!thissop)
return getDivs();
686 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
694 if (!thissop)
return getArc();
696 OP_Utils::evalOpParm(result, thissop,
"arc", cookparms.
getCookTime(), 0);
704 if (!thissop)
return getAngle();
706 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
GLsizei const GLfloat * value
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
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.
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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