23 namespace SOP_TetCraftEnums
34 using namespace UT::Literal;
67 if (myGroup != src.myGroup)
return false;
68 if (myBuildDirection != src.myBuildDirection)
return false;
69 if (myCreateTets != src.myCreateTets)
return false;
91 graph->
evalOpParm(myBuildDirection, nodeidx,
"direction", time, graph->
isDirect()?
nullptr:depnode);
94 graph->
evalOpParm(myCreateTets, nodeidx,
"createtets", time, graph->
isDirect()?
nullptr:depnode);
110 template <
typename T>
117 if (idx.
size() != instance.
size()+1)
122 coerceValue(value, myGroup);
125 coerceValue(value, myBuildDirection);
128 coerceValue(value, myCreateTets);
144 { doGetParmValue(idx, instance, value); }
146 { doGetParmValue(idx, instance, value); }
148 { doGetParmValue(idx, instance, value); }
150 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
173 if (idx.
size() != instance.
size()+1)
178 coerceValue(myGroup, ( ( value ) ));
181 coerceValue(myBuildDirection, clampMinValue(0, clampMaxValue(1, value ) ));
184 coerceValue(myCreateTets, ( ( 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); }
209 { doSetParmValue(idx, instance, value); }
211 { doSetParmValue(idx, instance, value); }
227 if (fieldnum.
size() < 1)
244 if (fieldnum.
size() < 1)
245 return PARM_UNSUPPORTED;
256 return PARM_UNSUPPORTED;
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, myGroup);
369 saveData(os, myBuildDirection);
370 saveData(os, myCreateTets);
383 loadData(is, myGroup);
384 loadData(is, myBuildDirection);
385 loadData(is, myCreateTets);
395 if (!thissop)
return getGroup();
397 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
405 if (!thissop)
return getBuildDirection();
407 OP_Utils::evalOpParm(result, thissop,
"direction", cookparms.
getCookTime(), 0);
415 if (!thissop)
return getCreateTets();
417 OP_Utils::evalOpParm(result, thissop,
"createtets", cookparms.
getCookTime(), 0);
423 int64 myBuildDirection;
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
BuildDirection getBuildDirection() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setCreateTets(bool val)
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
GLsizei const GLfloat * value
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
**But if you need a result
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setBuildDirection(BuildDirection val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
BuildDirection opBuildDirection(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const OP_GraphProxy * graph() const
SYS_FORCE_INLINE UT_StringHolder getToken(BuildDirection enum_value)
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, bool v)
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setGroup(const UT_StringHolder &val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
bool load(UT_IStream &is)
bool operator!=(const SOP_TetCraftParms &src) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
ParmType getNestParmType(TempIndex fieldnum) const override
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opCreateTets(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator==(const SOP_TetCraftParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
bool getCreateTets() const
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override