23 namespace SOP_WindingNumberEnums
42 myQueryPoints =
""_UTsh;
43 myMeshPrims =
""_UTsh;
45 myAttrib =
"winding_number"_UTsh;
46 myAsSolidAngle =
false;
48 myFullAccuracy =
false;
62 if (myQueryPoints != src.myQueryPoints)
return false;
63 if (myMeshPrims != src.myMeshPrims)
return false;
64 if (myType != src.myType)
return false;
65 if (myAttrib != src.myAttrib)
return false;
66 if (myAsSolidAngle != src.myAsSolidAngle)
return false;
67 if (myNegate != src.myNegate)
return false;
68 if (myFullAccuracy != src.myFullAccuracy)
return false;
69 if (myAccuracyScale != src.myAccuracyScale)
return false;
83 myQueryPoints =
""_UTsh;
85 graph->
evalOpParm(myQueryPoints, nodeidx,
"querypoints", time, 0);
86 myMeshPrims =
""_UTsh;
88 graph->
evalOpParm(myMeshPrims, nodeidx,
"meshprims", time, 0);
91 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
92 myAttrib =
"winding_number"_UTsh;
94 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, 0);
95 myAsSolidAngle =
false;
97 graph->
evalOpParm(myAsSolidAngle, nodeidx,
"assolidangle", time, 0);
100 graph->
evalOpParm(myNegate, nodeidx,
"negate", time, 0);
101 myFullAccuracy =
false;
103 graph->
evalOpParm(myFullAccuracy, nodeidx,
"fullaccuracy", time, 0);
105 if (
true && ( (
true&&!(((getFullAccuracy()==1)))) ) )
106 graph->
evalOpParm(myAccuracyScale, nodeidx,
"accuracyscale", time, 0);
122 template <
typename T>
129 if (idx.
size() != instance.
size()+1)
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 template <
typename T>
200 if (idx.
size() != instance.
size()+1)
233 { doSetParmValue(idx, instance, value); }
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
245 { doSetParmValue(idx, instance, value); }
247 { doSetParmValue(idx, instance, value); }
249 { doSetParmValue(idx, instance, value); }
251 { doSetParmValue(idx, instance, value); }
253 { doSetParmValue(idx, instance, value); }
269 if (fieldnum.
size() < 1)
274 return "querypoints";
282 return "assolidangle";
286 return "fullaccuracy";
288 return "accuracyscale";
296 if (fieldnum.
size() < 1)
297 return PARM_UNSUPPORTED;
337 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
339 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
341 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
354 loadData(is, rampdata);
372 int typelen = colon - data.
buffer();
386 {
int64 iv =
v; UTwrite(os, &iv); }
388 { UTwrite<fpreal64>(os, &
v); }
390 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
392 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
393 UTwrite<fpreal64>(os, &v.
z()); }
395 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
396 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
408 if (s) s->save(ostr);
410 saveData(os, result);
417 ostr << s->getDataTypeToken();
422 saveData(os, result);
426 void save(std::ostream &os)
const
430 saveData(os, myQueryPoints);
431 saveData(os, myMeshPrims);
432 saveData(os, myType);
433 saveData(os, myAttrib);
434 saveData(os, myAsSolidAngle);
435 saveData(os, myNegate);
436 saveData(os, myFullAccuracy);
437 saveData(os, myAccuracyScale);
450 loadData(is, myQueryPoints);
451 loadData(is, myMeshPrims);
452 loadData(is, myType);
453 loadData(is, myAttrib);
454 loadData(is, myAsSolidAngle);
455 loadData(is, myNegate);
456 loadData(is, myFullAccuracy);
457 loadData(is, myAccuracyScale);
467 if (!thissop)
return getQueryPoints();
469 OP_Utils::evalOpParm(result, thissop,
"querypoints", cookparms.
getCookTime(), 0);
477 if (!thissop)
return getMeshPrims();
479 OP_Utils::evalOpParm(result, thissop,
"meshprims", cookparms.
getCookTime(), 0);
487 if (!thissop)
return getType();
489 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
497 if (!thissop)
return getAttrib();
499 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
507 if (!thissop)
return getAsSolidAngle();
509 OP_Utils::evalOpParm(result, thissop,
"assolidangle", cookparms.
getCookTime(), 0);
517 if (!thissop)
return getNegate();
519 OP_Utils::evalOpParm(result, thissop,
"negate", cookparms.
getCookTime(), 0);
527 if (!thissop)
return getFullAccuracy();
529 OP_Utils::evalOpParm(result, thissop,
"fullaccuracy", cookparms.
getCookTime(), 0);
537 if (!thissop)
return getAccuracyScale();
539 OP_Utils::evalOpParm(result, thissop,
"accuracyscale", cookparms.
getCookTime(), 0);
static void saveData(std::ostream &os, UT_Matrix2D v)
void setFullAccuracy(bool val)
void copyFrom(const OP_NodeParms *src) override
SOP_Node * getNode() const
fpreal64 getAccuracyScale() const
const UT_StringHolder & getAttrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
T clampMaxValue(fpreal maxvalue, const T &src) 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
void setAsSolidAngle(bool val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getMeshPrims() const
bool load(UT_IStream &is)
void setAttrib(const UT_StringHolder &val)
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
UT_StringHolder opQueryPoints(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
bool getAsSolidAngle() const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
An output stream object that owns its own string buffer storage.
const UT_StringHolder & getQueryPoints() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
**But if you need a result
bool operator==(const SOP_WindingNumberParms &src) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
T clampMinValue(fpreal minvalue, const T &src) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector3I &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator!=(const SOP_WindingNumberParms &src) const
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool getFullAccuracy() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_StringHolder opMeshPrims(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setAccuracyScale(fpreal64 val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
fpreal64 opAccuracyScale(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
bool opAsSolidAngle(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
DEP_MicroNode * depnode() const
ParmType getNestParmType(TempIndex fieldnum) const override
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal getCookTime() const
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, bool v)
void setQueryPoints(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool opNegate(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, int64 &v)
bool opFullAccuracy(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setMeshPrims(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override