23 namespace SOP_CurveEnums
78 if (myType != src.myType)
return false;
79 if (myMethod != src.myMethod)
return false;
80 if (myCoords != src.myCoords)
return false;
81 if (myClose != src.myClose)
return false;
82 if (myReverse != src.myReverse)
return false;
83 if (
myOrder != src.myOrder)
return false;
84 if (myParam != src.myParam)
return false;
85 if (myTolerance != src.myTolerance)
return false;
86 if (mySmooth != src.mySmooth)
return false;
87 if (myCsharp != src.myCsharp)
return false;
88 if (myKeepgeo != src.myKeepgeo)
return false;
89 if (myNormalize != src.myNormalize)
return false;
107 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
110 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
113 graph->
evalOpParm(myCoords, nodeidx,
"coords", time, 0);
115 if (
true && ( (
true&&!(((
int64(getType())==3)))) ) )
116 graph->
evalOpParm(myClose, nodeidx,
"close", time, 0);
119 graph->
evalOpParm(myReverse, nodeidx,
"reverse", time, 0);
121 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2)))) ) )
124 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=1)))) ) )
125 graph->
evalOpParm(myParam, nodeidx,
"param", time, 0);
127 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=2)))) ) )
128 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, 0);
130 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=2)))) ) )
131 graph->
evalOpParm(mySmooth, nodeidx,
"smooth", time, 0);
133 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=2)))) ) )
134 graph->
evalOpParm(myCsharp, nodeidx,
"csharp", time, 0);
137 graph->
evalOpParm(myKeepgeo, nodeidx,
"keepgeo", time, 0);
139 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=1))||((
int64(getParam())!=0)))) ) )
140 graph->
evalOpParm(myNormalize, nodeidx,
"normalize", time, 0);
156 template <
typename T>
163 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 template <
typename T>
246 if (idx.
size() != instance.
size()+1)
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
297 { doSetParmValue(idx, instance, value); }
299 { doSetParmValue(idx, instance, value); }
301 { doSetParmValue(idx, instance, value); }
303 { doSetParmValue(idx, instance, value); }
305 { doSetParmValue(idx, instance, value); }
307 { doSetParmValue(idx, instance, value); }
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
327 if (fieldnum.
size() < 1)
362 if (fieldnum.
size() < 1)
363 return PARM_UNSUPPORTED;
411 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
413 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
415 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
428 loadData(is, rampdata);
446 int typelen = colon - data.
buffer();
460 {
int64 iv =
v; UTwrite(os, &iv); }
462 { UTwrite<fpreal64>(os, &
v); }
464 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
466 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
467 UTwrite<fpreal64>(os, &v.
z()); }
469 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
470 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
482 if (s) s->save(ostr);
484 saveData(os, result);
491 ostr << s->getDataTypeToken();
496 saveData(os, result);
500 void save(std::ostream &os)
const
504 saveData(os, myType);
505 saveData(os, myMethod);
506 saveData(os, myCoords);
507 saveData(os, myClose);
508 saveData(os, myReverse);
510 saveData(os, myParam);
511 saveData(os, myTolerance);
512 saveData(os, mySmooth);
513 saveData(os, myCsharp);
514 saveData(os, myKeepgeo);
515 saveData(os, myNormalize);
528 loadData(is, myType);
529 loadData(is, myMethod);
530 loadData(is, myCoords);
531 loadData(is, myClose);
532 loadData(is, myReverse);
534 loadData(is, myParam);
535 loadData(is, myTolerance);
536 loadData(is, mySmooth);
537 loadData(is, myCsharp);
538 loadData(is, myKeepgeo);
539 loadData(is, myNormalize);
549 if (!thissop)
return getType();
551 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
559 if (!thissop)
return getMethod();
561 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
569 if (!thissop)
return getCoords();
571 OP_Utils::evalOpParm(result, thissop,
"coords", cookparms.
getCookTime(), 0);
579 if (!thissop)
return getClose();
581 OP_Utils::evalOpParm(result, thissop,
"close", cookparms.
getCookTime(), 0);
589 if (!thissop)
return getReverse();
591 OP_Utils::evalOpParm(result, thissop,
"reverse", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getOrder();
601 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
609 if (!thissop)
return getParam();
611 OP_Utils::evalOpParm(result, thissop,
"param", cookparms.
getCookTime(), 0);
612 return Param(result);
619 if (!thissop)
return getTolerance();
621 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getSmooth();
631 OP_Utils::evalOpParm(result, thissop,
"smooth", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getCsharp();
641 OP_Utils::evalOpParm(result, thissop,
"csharp", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getKeepgeo();
651 OP_Utils::evalOpParm(result, thissop,
"keepgeo", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getNormalize();
661 OP_Utils::evalOpParm(result, thissop,
"normalize", cookparms.
getCookTime(), 0);
void copyFrom(const OP_NodeParms *src) override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
T clampMaxValue(fpreal maxvalue, const T &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opKeepgeo(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Vector2D v)
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const OP_Context & context() const
static void saveData(std::ostream &os, int64 v)
void setSmooth(fpreal64 val)
constexpr SYS_FORCE_INLINE T & z() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE const char * buffer() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
bool load(UT_IStream &is)
An output stream object that owns its own string buffer storage.
void setTolerance(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setReverse(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Vector3D v)
void setKeepgeo(bool val)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setMethod(Method val)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 getTolerance() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSmooth() const
UT_StringHolder opCoords(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, bool v)
const OP_GraphProxy * graph() const
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator!=(const SOP_CurveParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setCoords(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
exint getNestNumParms(TempIndex idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool getNormalize() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
void coerceValue(T &result, const S &src) const
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
bool isParmColorRamp(exint idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Utility class for containing a color ramp.
const UT_StringHolder & getCoords() const
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool opCsharp(const SOP_NodeVerb::CookParms &cookparms) const
bool opClose(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_CurveParms &src) const
fpreal getCookTime() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setNormalize(bool val)
const char * findChar(int c) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
fpreal64 opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
Param opParam(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &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)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept