23 namespace SOP_RevolveEnums
74 if (myGroup != src.myGroup)
return false;
75 if (mySurftype != src.mySurftype)
return false;
76 if (myOrigin != src.myOrigin)
return false;
77 if (myDir != src.myDir)
return false;
78 if (myPolys != src.myPolys)
return false;
79 if (myImperfect != src.myImperfect)
return false;
80 if (myType != src.myType)
return false;
81 if (myAngle != src.myAngle)
return false;
82 if (myDivs != src.myDivs)
return false;
83 if (
myOrder != src.myOrder)
return false;
84 if (myCap != src.myCap)
return false;
101 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
104 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, 0);
107 graph->
evalOpParm(myOrigin, nodeidx,
"origin", time, 0);
110 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
113 graph->
evalOpParm(myPolys, nodeidx,
"polys", time, 0);
116 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, 0);
119 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
122 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
125 graph->
evalOpParm(myDivs, nodeidx,
"divs", time, 0);
131 graph->
evalOpParm(myCap, nodeidx,
"cap", time, 0);
147 template <
typename T>
154 if (idx.
size() != instance.
size()+1)
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 template <
typename T>
234 if (idx.
size() != instance.
size()+1)
276 { doSetParmValue(idx, instance, value); }
278 { doSetParmValue(idx, instance, value); }
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
286 { doSetParmValue(idx, instance, value); }
288 { doSetParmValue(idx, instance, value); }
290 { doSetParmValue(idx, instance, value); }
292 { doSetParmValue(idx, instance, value); }
294 { doSetParmValue(idx, instance, value); }
296 { doSetParmValue(idx, instance, value); }
312 if (fieldnum.
size() < 1)
345 if (fieldnum.
size() < 1)
346 return PARM_UNSUPPORTED;
392 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
394 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
396 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
409 loadData(is, rampdata);
427 int typelen = colon - data.
buffer();
441 {
int64 iv =
v; UTwrite(os, &iv); }
443 { UTwrite<fpreal64>(os, &
v); }
445 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
447 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
448 UTwrite<fpreal64>(os, &v.
z()); }
450 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
451 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
463 if (s) s->save(ostr);
465 saveData(os, result);
472 ostr << s->getDataTypeToken();
477 saveData(os, result);
481 void save(std::ostream &os)
const
485 saveData(os, myGroup);
486 saveData(os, mySurftype);
487 saveData(os, myOrigin);
489 saveData(os, myPolys);
490 saveData(os, myImperfect);
491 saveData(os, myType);
492 saveData(os, myAngle);
493 saveData(os, myDivs);
508 loadData(is, myGroup);
509 loadData(is, mySurftype);
510 loadData(is, myOrigin);
512 loadData(is, myPolys);
513 loadData(is, myImperfect);
514 loadData(is, myType);
515 loadData(is, myAngle);
516 loadData(is, myDivs);
528 if (!thissop)
return getGroup();
530 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
538 if (!thissop)
return getSurftype();
540 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
548 if (!thissop)
return getOrigin();
550 OP_Utils::evalOpParm(result, thissop,
"origin", cookparms.
getCookTime(), 0);
558 if (!thissop)
return getDir();
560 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
568 if (!thissop)
return getPolys();
570 OP_Utils::evalOpParm(result, thissop,
"polys", cookparms.
getCookTime(), 0);
578 if (!thissop)
return getImperfect();
580 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
588 if (!thissop)
return getType();
590 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
598 if (!thissop)
return getAngle();
600 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
608 if (!thissop)
return getDivs();
610 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getOrder();
620 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getCap();
630 OP_Utils::evalOpParm(result, thissop,
"cap", cookparms.
getCookTime(), 0);
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
bool operator!=(const SOP_RevolveParms &src) const
bool load(UT_IStream &is)
UT_Vector3D getOrigin() const
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setAngle(UT_Vector2D val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
T clampMaxValue(fpreal maxvalue, const T &src) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opCap(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector2T< fpreal64 > UT_Vector2D
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool operator==(const SOP_RevolveParms &src) const
An output stream object that owns its own string buffer storage.
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
**But if you need a result
void setDir(UT_Vector3D val)
T clampMinValue(fpreal minvalue, const T &src) const
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool getImperfect() const
static void loadData(UT_IStream &is, bool &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Matrix4D v)
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Vector3D getDir() const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
UT_StringHolder opGroup(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 fpreal &value) override
void coerceValue(T &result, const S &src) const
void setOrigin(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, bool v)
Utility class for containing a color ramp.
void setSurftype(Surftype val)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal getCookTime() const
const char * findChar(int c) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setGroup(const UT_StringHolder &val)
Surftype getSurftype() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setImperfect(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector2D getAngle() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void save(std::ostream &os) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept