23 namespace SOP_WindingNumberEnums
36 using namespace UT::Literal;
56 myQueryPoints =
""_UTsh;
57 myMeshPrims =
""_UTsh;
59 myAttrib =
"winding_number"_UTsh;
60 myAsSolidAngle =
false;
62 myFullAccuracy =
false;
76 if (myQueryPoints != src.myQueryPoints)
return false;
77 if (myMeshPrims != src.myMeshPrims)
return false;
78 if (myType != src.myType)
return false;
79 if (myAttrib != src.myAttrib)
return false;
80 if (myAsSolidAngle != src.myAsSolidAngle)
return false;
81 if (myNegate != src.myNegate)
return false;
82 if (myFullAccuracy != src.myFullAccuracy)
return false;
83 if (myAccuracyScale != src.myAccuracyScale)
return false;
100 myQueryPoints =
""_UTsh;
102 graph->
evalOpParm(myQueryPoints, nodeidx,
"querypoints", time, graph->
isDirect()?
nullptr:depnode);
103 myMeshPrims =
""_UTsh;
105 graph->
evalOpParm(myMeshPrims, nodeidx,
"meshprims", time, graph->
isDirect()?
nullptr:depnode);
109 myAttrib =
"winding_number"_UTsh;
111 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, graph->
isDirect()?
nullptr:depnode);
112 myAsSolidAngle =
false;
114 graph->
evalOpParm(myAsSolidAngle, nodeidx,
"assolidangle", time, graph->
isDirect()?
nullptr:depnode);
117 graph->
evalOpParm(myNegate, nodeidx,
"negate", time, graph->
isDirect()?
nullptr:depnode);
118 myFullAccuracy =
false;
120 graph->
evalOpParm(myFullAccuracy, nodeidx,
"fullaccuracy", time, graph->
isDirect()?
nullptr:depnode);
122 if (
true && ( (
true&&!(((getFullAccuracy()==1)))) ) )
123 graph->
evalOpParm(myAccuracyScale, nodeidx,
"accuracyscale", time, graph->
isDirect()?
nullptr:depnode);
139 template <
typename T>
146 if (idx.
size() != instance.
size()+1)
151 coerceValue(value, myQueryPoints);
154 coerceValue(value, myMeshPrims);
157 coerceValue(value, myType);
160 coerceValue(value, myAttrib);
163 coerceValue(value, myAsSolidAngle);
166 coerceValue(value, myNegate);
169 coerceValue(value, myFullAccuracy);
172 coerceValue(value, myAccuracyScale);
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 template <
typename T>
217 if (idx.
size() != instance.
size()+1)
222 coerceValue(myQueryPoints, ( ( value ) ));
225 coerceValue(myMeshPrims, ( ( value ) ));
228 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
231 coerceValue(myAttrib, ( ( value ) ));
234 coerceValue(myAsSolidAngle, ( ( value ) ));
237 coerceValue(myNegate, ( ( value ) ));
240 coerceValue(myFullAccuracy, ( ( value ) ));
243 coerceValue(myAccuracyScale, clampMinValue(1, ( value ) ));
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
258 { doSetParmValue(idx, instance, value); }
260 { doSetParmValue(idx, instance, value); }
262 { doSetParmValue(idx, instance, value); }
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
286 if (fieldnum.
size() < 1)
291 return "querypoints";
299 return "assolidangle";
303 return "fullaccuracy";
305 return "accuracyscale";
313 if (fieldnum.
size() < 1)
314 return PARM_UNSUPPORTED;
335 return PARM_UNSUPPORTED;
371 loadData(is, rampdata);
389 int typelen = colon - data.
buffer();
403 {
int64 iv =
v; UTwrite(os, &iv); }
405 { UTwrite<fpreal64>(os, &
v); }
407 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
409 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
410 UTwrite<fpreal64>(os, &v.
z()); }
412 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
413 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
425 if (s) s->save(ostr);
427 saveData(os, result);
434 ostr << s->getDataTypeToken();
439 saveData(os, result);
443 void save(std::ostream &os)
const
447 saveData(os, myQueryPoints);
448 saveData(os, myMeshPrims);
449 saveData(os, myType);
450 saveData(os, myAttrib);
451 saveData(os, myAsSolidAngle);
452 saveData(os, myNegate);
453 saveData(os, myFullAccuracy);
454 saveData(os, myAccuracyScale);
467 loadData(is, myQueryPoints);
468 loadData(is, myMeshPrims);
469 loadData(is, myType);
470 loadData(is, myAttrib);
471 loadData(is, myAsSolidAngle);
472 loadData(is, myNegate);
473 loadData(is, myFullAccuracy);
474 loadData(is, myAccuracyScale);
484 if (!thissop)
return getQueryPoints();
486 OP_Utils::evalOpParm(result, thissop,
"querypoints", cookparms.
getCookTime(), 0);
494 if (!thissop)
return getMeshPrims();
496 OP_Utils::evalOpParm(result, thissop,
"meshprims", cookparms.
getCookTime(), 0);
504 if (!thissop)
return getType();
506 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
514 if (!thissop)
return getAttrib();
516 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
524 if (!thissop)
return getAsSolidAngle();
526 OP_Utils::evalOpParm(result, thissop,
"assolidangle", cookparms.
getCookTime(), 0);
534 if (!thissop)
return getNegate();
536 OP_Utils::evalOpParm(result, thissop,
"negate", cookparms.
getCookTime(), 0);
544 if (!thissop)
return getFullAccuracy();
546 OP_Utils::evalOpParm(result, thissop,
"fullaccuracy", cookparms.
getCookTime(), 0);
554 if (!thissop)
return getAccuracyScale();
556 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
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
GLsizei const GLfloat * value
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)
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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 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)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
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)
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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)
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
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