23 namespace SOP_PointCloudSurfaceEnums
56 if (mySubdivisions != src.mySubdivisions)
return false;
57 if (mySampletarget != src.mySampletarget)
return false;
58 if (myIterations != src.myIterations)
return false;
59 if (myBoundary != src.myBoundary)
return false;
75 graph->
evalOpParm(mySubdivisions, nodeidx,
"subdivisions", time, 0);
78 graph->
evalOpParm(mySampletarget, nodeidx,
"sampletarget", time, 0);
81 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, 0);
84 graph->
evalOpParm(myBoundary, nodeidx,
"boundary", time, 0);
100 template <
typename T>
107 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
159 template <
typename T>
166 if (idx.
size() != instance.
size()+1)
187 { doSetParmValue(idx, instance, value); }
189 { doSetParmValue(idx, instance, value); }
191 { doSetParmValue(idx, instance, value); }
193 { doSetParmValue(idx, instance, value); }
195 { doSetParmValue(idx, instance, value); }
197 { doSetParmValue(idx, instance, 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); }
223 if (fieldnum.
size() < 1)
228 return "subdivisions";
230 return "sampletarget";
242 if (fieldnum.
size() < 1)
243 return PARM_UNSUPPORTED;
275 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
277 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
279 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
292 loadData(is, rampdata);
310 int typelen = colon - data.
buffer();
324 {
int64 iv =
v; UTwrite(os, &iv); }
326 { UTwrite<fpreal64>(os, &
v); }
328 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
330 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
331 UTwrite<fpreal64>(os, &v.
z()); }
333 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
334 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
346 if (s) s->save(ostr);
348 saveData(os, result);
355 ostr << s->getDataTypeToken();
360 saveData(os, result);
364 void save(std::ostream &os)
const
368 saveData(os, mySubdivisions);
369 saveData(os, mySampletarget);
370 saveData(os, myIterations);
371 saveData(os, myBoundary);
384 loadData(is, mySubdivisions);
385 loadData(is, mySampletarget);
386 loadData(is, myIterations);
387 loadData(is, myBoundary);
397 if (!thissop)
return getSubdivisions();
399 OP_Utils::evalOpParm(result, thissop,
"subdivisions", cookparms.
getCookTime(), 0);
407 if (!thissop)
return getSampletarget();
409 OP_Utils::evalOpParm(result, thissop,
"sampletarget", cookparms.
getCookTime(), 0);
417 if (!thissop)
return getIterations();
419 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
427 if (!thissop)
return getBoundary();
429 OP_Utils::evalOpParm(result, thissop,
"boundary", cookparms.
getCookTime(), 0);
434 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
T clampMaxValue(fpreal maxvalue, const T &src) const
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)
T clampMinValue(fpreal minvalue, const T &src) const
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 coerceValue(T &result, const S &src) 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)
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
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)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept