34 myIgnorepiece =
false;
48 if (myRadiusscale != src.myRadiusscale)
return false;
49 if (mySrcphase != src.mySrcphase)
return false;
50 if (myDstphase != src.myDstphase)
return false;
51 if (myIgnorepiece != src.myIgnorepiece)
return false;
52 if (myLeaveongpu != src.myLeaveongpu)
return false;
67 graph->
evalOpParm(myRadiusscale, nodeidx,
"radiusscale", time, 0);
70 graph->
evalOpParm(mySrcphase, nodeidx,
"srcphase", time, 0);
73 graph->
evalOpParm(myDstphase, nodeidx,
"dstphase", time, 0);
74 myIgnorepiece =
false;
76 graph->
evalOpParm(myIgnorepiece, nodeidx,
"ignorepiece", time, 0);
79 graph->
evalOpParm(myLeaveongpu, nodeidx,
"leaveongpu", time, 0);
102 if (idx.
size() != instance.
size()+1)
135 { doGetParmValue(idx, instance, value); }
137 { doGetParmValue(idx, instance, value); }
139 { doGetParmValue(idx, instance, value); }
141 { doGetParmValue(idx, instance, value); }
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 { doGetParmValue(idx, instance, value); }
149 { doGetParmValue(idx, instance, value); }
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 template <
typename T>
164 if (idx.
size() != instance.
size()+1)
188 { doSetParmValue(idx, instance, value); }
190 { doSetParmValue(idx, instance, value); }
192 { doSetParmValue(idx, instance, value); }
194 { doSetParmValue(idx, instance, value); }
196 { doSetParmValue(idx, instance, value); }
198 { doSetParmValue(idx, instance, value); }
200 { doSetParmValue(idx, instance, value); }
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, value); }
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, value); }
224 if (fieldnum.
size() < 1)
229 return "radiusscale";
235 return "ignorepiece";
245 if (fieldnum.
size() < 1)
246 return PARM_UNSUPPORTED;
297 loadData(is, rampdata);
315 int typelen = colon - data.
buffer();
329 {
int64 iv =
v; UTwrite(os, &iv); }
331 { UTwrite<fpreal64>(os, &
v); }
333 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
335 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
336 UTwrite<fpreal64>(os, &v.
z()); }
338 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
339 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
351 if (s) s->save(ostr);
353 saveData(os, result);
360 ostr << s->getDataTypeToken();
365 saveData(os, result);
369 void save(std::ostream &os)
const
373 saveData(os, myRadiusscale);
374 saveData(os, mySrcphase);
375 saveData(os, myDstphase);
376 saveData(os, myIgnorepiece);
377 saveData(os, myLeaveongpu);
390 loadData(is, myRadiusscale);
391 loadData(is, mySrcphase);
392 loadData(is, myDstphase);
393 loadData(is, myIgnorepiece);
394 loadData(is, myLeaveongpu);
404 if (!thissop)
return getRadiusscale();
406 OP_Utils::evalOpParm(result, thissop,
"radiusscale", cookparms.
getCookTime(), 0);
414 if (!thissop)
return getSrcphase();
416 OP_Utils::evalOpParm(result, thissop,
"srcphase", cookparms.
getCookTime(), 0);
424 if (!thissop)
return getDstphase();
426 OP_Utils::evalOpParm(result, thissop,
"dstphase", cookparms.
getCookTime(), 0);
434 if (!thissop)
return getIgnorepiece();
436 OP_Utils::evalOpParm(result, thissop,
"ignorepiece", cookparms.
getCookTime(), 0);
444 if (!thissop)
return getLeaveongpu();
446 OP_Utils::evalOpParm(result, thissop,
"leaveongpu", cookparms.
getCookTime(), 0);
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool getIgnorepiece() const
void setDstphase(int64 val)
bool operator!=(const SOP_NeighborSearchCLParms &src) const
SOP_Node * getNode() const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setSrcphase(int64 val)
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setIgnorepiece(bool val)
bool isParmColorRamp(exint idx) const override
ParmType getNestParmType(TempIndex fieldnum) const override
const OP_Context & context() const
void setRadiusscale(fpreal64 val)
const char * getNestParmName(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void copyFrom(const OP_NodeParms *src) override
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, bool &v)
**But if you need a result
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
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 setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
fpreal64 getRadiusscale() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setLeaveongpu(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, fpreal64 v)
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 getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
int64 getSrcphase() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
int64 opDstphase(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_StringHolder s)
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool opLeaveongpu(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void coerceValue(T &result, const S &src) const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool opIgnorepiece(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
fpreal getCookTime() const
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Vector2D v)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator==(const SOP_NeighborSearchCLParms &src) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool getLeaveongpu() const
constexpr SYS_FORCE_INLINE T & y() noexcept
int64 opSrcphase(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opRadiusscale(const SOP_NodeVerb::CookParms &cookparms) const
SOP_NeighborSearchCLParms()
int64 getDstphase() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void loadData(UT_IStream &is, UT_Vector4D &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept