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;
90 graph->
evalOpParm(mySubdivisions, nodeidx,
"subdivisions", time, graph->
isDirect()?
nullptr:depnode);
93 graph->
evalOpParm(mySampletarget, nodeidx,
"sampletarget", time, graph->
isDirect()?
nullptr:depnode);
96 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, graph->
isDirect()?
nullptr:depnode);
99 graph->
evalOpParm(myBoundary, nodeidx,
"boundary", time, graph->
isDirect()?
nullptr:depnode);
115 template <
typename T>
122 if (idx.
size() != instance.
size()+1)
127 coerceValue(value, mySubdivisions);
130 coerceValue(value, mySampletarget);
133 coerceValue(value, myIterations);
136 coerceValue(value, myBoundary);
152 { doGetParmValue(idx, instance, value); }
154 { doGetParmValue(idx, instance, value); }
156 { doGetParmValue(idx, instance, value); }
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 { doGetParmValue(idx, instance, value); }
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 template <
typename T>
181 if (idx.
size() != instance.
size()+1)
186 coerceValue(mySubdivisions, clampMinValue(1, clampMaxValue(19, value ) ));
189 coerceValue(mySampletarget, clampMinValue(0, ( value ) ));
192 coerceValue(myIterations, clampMinValue(1, ( value ) ));
195 coerceValue(myBoundary, clampMinValue(0, clampMaxValue(1, value ) ));
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, value); }
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, value); }
210 { doSetParmValue(idx, instance, value); }
212 { doSetParmValue(idx, instance, value); }
214 { doSetParmValue(idx, instance, value); }
216 { doSetParmValue(idx, instance, value); }
218 { doSetParmValue(idx, instance, value); }
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
238 if (fieldnum.
size() < 1)
243 return "subdivisions";
245 return "sampletarget";
257 if (fieldnum.
size() < 1)
258 return PARM_UNSUPPORTED;
271 return PARM_UNSUPPORTED;
307 loadData(is, rampdata);
325 int typelen = colon - data.
buffer();
339 {
int64 iv =
v; UTwrite(os, &iv); }
341 { UTwrite<fpreal64>(os, &
v); }
343 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
345 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
346 UTwrite<fpreal64>(os, &v.
z()); }
348 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
349 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
361 if (s) s->save(ostr);
363 saveData(os, result);
370 ostr << s->getDataTypeToken();
375 saveData(os, result);
379 void save(std::ostream &os)
const
383 saveData(os, mySubdivisions);
384 saveData(os, mySampletarget);
385 saveData(os, myIterations);
386 saveData(os, myBoundary);
399 loadData(is, mySubdivisions);
400 loadData(is, mySampletarget);
401 loadData(is, myIterations);
402 loadData(is, myBoundary);
412 if (!thissop)
return getSubdivisions();
414 OP_Utils::evalOpParm(result, thissop,
"subdivisions", cookparms.
getCookTime(), 0);
422 if (!thissop)
return getSampletarget();
424 OP_Utils::evalOpParm(result, thissop,
"sampletarget", cookparms.
getCookTime(), 0);
432 if (!thissop)
return getIterations();
434 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
442 if (!thissop)
return getBoundary();
444 OP_Utils::evalOpParm(result, thissop,
"boundary", cookparms.
getCookTime(), 0);
449 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
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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