23 namespace SOP_TetLayerEnums
43 myEnableThicknessMultiplierAttribute =
false;
44 myThicknessMultiplierAttribute =
""_UTsh;
45 myCreateBoundaryTriangles =
false;
59 if (myGroup != src.myGroup)
return false;
60 if (myBuildDirection != src.myBuildDirection)
return false;
61 if (myThickness != src.myThickness)
return false;
62 if (myEnableThicknessMultiplierAttribute != src.myEnableThicknessMultiplierAttribute)
return false;
63 if (myThicknessMultiplierAttribute != src.myThicknessMultiplierAttribute)
return false;
64 if (myCreateBoundaryTriangles != src.myCreateBoundaryTriangles)
return false;
65 if (myCreateTets != src.myCreateTets)
return false;
81 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
84 graph->
evalOpParm(myBuildDirection, nodeidx,
"direction", time, 0);
87 graph->
evalOpParm(myThickness, nodeidx,
"thickness", time, 0);
88 myEnableThicknessMultiplierAttribute =
false;
90 graph->
evalOpParm(myEnableThicknessMultiplierAttribute, nodeidx,
"enablethicknessmultiplierattribute", time, 0);
91 myThicknessMultiplierAttribute =
""_UTsh;
92 if (
true && ( (
true&&!(((getEnableThicknessMultiplierAttribute()==0)))) ) )
93 graph->
evalOpParm(myThicknessMultiplierAttribute, nodeidx,
"thicknessmultiplierattribute", time, 0);
94 myCreateBoundaryTriangles =
false;
96 graph->
evalOpParm(myCreateBoundaryTriangles, nodeidx,
"createboundarytriangles", time, 0);
99 graph->
evalOpParm(myCreateTets, nodeidx,
"createtets", time, 0);
115 template <
typename T>
122 if (idx.
size() != instance.
size()+1)
136 coerceValue(value, myEnableThicknessMultiplierAttribute);
139 coerceValue(value, myThicknessMultiplierAttribute);
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 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 template <
typename T>
190 if (idx.
size() != instance.
size()+1)
204 coerceValue(myEnableThicknessMultiplierAttribute, ( ( value ) ));
207 coerceValue(myThicknessMultiplierAttribute, ( ( value ) ));
210 coerceValue(myCreateBoundaryTriangles, ( ( value ) ));
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
256 if (fieldnum.
size() < 1)
267 return "enablethicknessmultiplierattribute";
269 return "thicknessmultiplierattribute";
271 return "createboundarytriangles";
281 if (fieldnum.
size() < 1)
282 return PARM_UNSUPPORTED;
320 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
322 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
324 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
337 loadData(is, rampdata);
355 int typelen = colon - data.
buffer();
369 {
int64 iv =
v; UTwrite(os, &iv); }
371 { UTwrite<fpreal64>(os, &
v); }
373 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
375 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
376 UTwrite<fpreal64>(os, &v.
z()); }
378 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
379 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
391 if (s) s->save(ostr);
393 saveData(os, result);
400 ostr << s->getDataTypeToken();
405 saveData(os, result);
409 void save(std::ostream &os)
const
413 saveData(os, myGroup);
414 saveData(os, myBuildDirection);
415 saveData(os, myThickness);
416 saveData(os, myEnableThicknessMultiplierAttribute);
417 saveData(os, myThicknessMultiplierAttribute);
418 saveData(os, myCreateBoundaryTriangles);
419 saveData(os, myCreateTets);
432 loadData(is, myGroup);
433 loadData(is, myBuildDirection);
434 loadData(is, myThickness);
435 loadData(is, myEnableThicknessMultiplierAttribute);
436 loadData(is, myThicknessMultiplierAttribute);
437 loadData(is, myCreateBoundaryTriangles);
438 loadData(is, myCreateTets);
448 if (!thissop)
return getGroup();
450 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
458 if (!thissop)
return getBuildDirection();
460 OP_Utils::evalOpParm(result, thissop,
"direction", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getThickness();
470 OP_Utils::evalOpParm(result, thissop,
"thickness", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getEnableThicknessMultiplierAttribute();
480 OP_Utils::evalOpParm(result, thissop,
"enablethicknessmultiplierattribute", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getThicknessMultiplierAttribute();
490 OP_Utils::evalOpParm(result, thissop,
"thicknessmultiplierattribute", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getCreateBoundaryTriangles();
500 OP_Utils::evalOpParm(result, thissop,
"createboundarytriangles", cookparms.
getCookTime(), 0);
508 if (!thissop)
return getCreateTets();
510 OP_Utils::evalOpParm(result, thissop,
"createtets", cookparms.
getCookTime(), 0);
516 int64 myBuildDirection;
518 bool myEnableThicknessMultiplierAttribute;
520 bool myCreateBoundaryTriangles;
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opThicknessMultiplierAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SOP_Node * getNode() const
void setThickness(fpreal64 val)
BuildDirection getBuildDirection() const
T clampMaxValue(fpreal maxvalue, const T &src) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setCreateTets(bool val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator!=(const SOP_TetLayerParms &src) const
fpreal64 getThickness() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_Context & context() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void setGroup(const UT_StringHolder &val)
void save(std::ostream &os) const
const UT_StringHolder & getThicknessMultiplierAttribute() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, bool v)
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opCreateTets(const SOP_NodeVerb::CookParms &cookparms) const
void setBuildDirection(BuildDirection val)
bool getCreateTets() const
BuildDirection opBuildDirection(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setEnableThicknessMultiplierAttribute(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
bool opEnableThicknessMultiplierAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool getCreateBoundaryTriangles() const
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
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator==(const SOP_TetLayerParms &src) const
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setCreateBoundaryTriangles(bool val)
void coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool opCreateBoundaryTriangles(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal getCookTime() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint getNestNumParms(TempIndex idx) const override
void setThicknessMultiplierAttribute(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_StringHolder s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal64 opThickness(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool getEnableThicknessMultiplierAttribute() const
constexpr SYS_FORCE_INLINE T & x() noexcept
ParmType getNestParmType(TempIndex fieldnum) const override