23 namespace SOP_PointCloudSurfaceEnums
34 using namespace UT::Literal;
68 if (mySubdivisions != src.mySubdivisions)
return false;
69 if (mySampletarget != src.mySampletarget)
return false;
70 if (myIterations != src.myIterations)
return false;
71 if (myBoundary != src.myBoundary)
return false;
87 graph->
evalOpParm(mySubdivisions, nodeidx,
"subdivisions", time, 0);
90 graph->
evalOpParm(mySampletarget, nodeidx,
"sampletarget", time, 0);
93 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, 0);
96 graph->
evalOpParm(myBoundary, nodeidx,
"boundary", time, 0);
112 template <
typename T>
119 if (idx.
size() != instance.
size()+1)
124 coerceValue(value, mySubdivisions);
127 coerceValue(value, mySampletarget);
130 coerceValue(value, myIterations);
133 coerceValue(value, myBoundary);
149 { doGetParmValue(idx, instance, value); }
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 { doGetParmValue(idx, instance, value); }
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 template <
typename T>
178 if (idx.
size() != instance.
size()+1)
183 coerceValue(mySubdivisions, clampMinValue(1, clampMaxValue(19, value ) ));
186 coerceValue(mySampletarget, clampMinValue(0, ( value ) ));
189 coerceValue(myIterations, clampMinValue(1, ( value ) ));
192 coerceValue(myBoundary, clampMinValue(0, clampMaxValue(1, value ) ));
199 { doSetParmValue(idx, instance, value); }
201 { doSetParmValue(idx, instance, value); }
203 { doSetParmValue(idx, instance, value); }
205 { doSetParmValue(idx, instance, value); }
207 { doSetParmValue(idx, instance, value); }
209 { doSetParmValue(idx, instance, value); }
211 { doSetParmValue(idx, instance, value); }
213 { doSetParmValue(idx, instance, value); }
215 { doSetParmValue(idx, instance, value); }
217 { doSetParmValue(idx, instance, value); }
219 { doSetParmValue(idx, instance, value); }
235 if (fieldnum.
size() < 1)
240 return "subdivisions";
242 return "sampletarget";
254 if (fieldnum.
size() < 1)
255 return PARM_UNSUPPORTED;
268 return PARM_UNSUPPORTED;
304 loadData(is, rampdata);
322 int typelen = colon - data.
buffer();
336 {
int64 iv =
v; UTwrite(os, &iv); }
338 { UTwrite<fpreal64>(os, &
v); }
340 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
342 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
343 UTwrite<fpreal64>(os, &v.
z()); }
345 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
346 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
358 if (s) s->save(ostr);
360 saveData(os, result);
367 ostr << s->getDataTypeToken();
372 saveData(os, result);
376 void save(std::ostream &os)
const
380 saveData(os, mySubdivisions);
381 saveData(os, mySampletarget);
382 saveData(os, myIterations);
383 saveData(os, myBoundary);
396 loadData(is, mySubdivisions);
397 loadData(is, mySampletarget);
398 loadData(is, myIterations);
399 loadData(is, myBoundary);
409 if (!thissop)
return getSubdivisions();
411 OP_Utils::evalOpParm(result, thissop,
"subdivisions", cookparms.
getCookTime(), 0);
419 if (!thissop)
return getSampletarget();
421 OP_Utils::evalOpParm(result, thissop,
"sampletarget", cookparms.
getCookTime(), 0);
429 if (!thissop)
return getIterations();
431 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
439 if (!thissop)
return getBoundary();
441 OP_Utils::evalOpParm(result, thissop,
"boundary", cookparms.
getCookTime(), 0);
446 int64 mySubdivisions;
static void saveData(std::ostream &os, UT_Matrix2D v)
void setSubdivisions(int64 val)
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, int64 &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal64 opSampletarget(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int64 opSubdivisions(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
exint bread(int32 *buffer, exint asize=1)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, fpreal64 v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
SOP_PointCloudSurfaceParms()
void copyFrom(const OP_NodeParms *src) override
bool operator!=(const SOP_PointCloudSurfaceParms &src) const
**But if you need a result
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const 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.
ParmType getNestParmType(TempIndex fieldnum) const override
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setBoundary(Boundary val)
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_Vector4D &value) override
void setSampletarget(fpreal64 val)
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, bool &v)
int64 getSubdivisions() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
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 getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool load(UT_IStream &is)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
void save(std::ostream &os) const
void setIterations(int64 val)
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
Boundary opBoundary(const SOP_NodeVerb::CookParms &cookparms) const
Boundary getBoundary() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Boundary enum_value)
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 getSampletarget() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
int64 getIterations() const
fpreal getCookTime() const
const char * findChar(int c) const
bool operator==(const SOP_PointCloudSurfaceParms &src) const
static void saveData(std::ostream &os, bool v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
const char * getNestParmName(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept