37 myOverrideOutput =
false;
40 myOverrideBounds =
false;
54 myFileName =
"./sdf$F4.simdata"_UTsh;
56 myBuildPolySoup =
false;
69 if (myOutput != src.myOutput)
return false;
70 if (myMode != src.myMode)
return false;
71 if (myUniformSamples != src.myUniformSamples)
return false;
72 if (myDivs != src.myDivs)
return false;
73 if (mySampleDiv != src.mySampleDiv)
return false;
74 if (myDivSize != src.myDivSize)
return false;
75 if (myOverrideOutput != src.myOverrideOutput)
return false;
76 if (myIsoDiv != src.myIsoDiv)
return false;
77 if (myPadBounds != src.myPadBounds)
return false;
78 if (myOverrideBounds != src.myOverrideBounds)
return false;
79 if (myMin != src.myMin)
return false;
80 if (myMax != src.myMax)
return false;
81 if (myTol != src.myTol)
return false;
82 if (myOffset != src.myOffset)
return false;
83 if (myLaserScan != src.myLaserScan)
return false;
84 if (myFixSigns != src.myFixSigns)
return false;
85 if (myForceBounds != src.myForceBounds)
return false;
86 if (myInvert != src.myInvert)
return false;
87 if (myNumNeighbour != src.myNumNeighbour)
return false;
88 if (mySweepCount != src.mySweepCount)
return false;
89 if (mySweepThreshold != src.mySweepThreshold)
return false;
90 if (myTetraType != src.myTetraType)
return false;
91 if (myFileMode != src.myFileMode)
return false;
92 if (myFileName != src.myFileName)
return false;
93 if (myName != src.myName)
return false;
94 if (myBuildPolySoup != src.myBuildPolySoup)
return false;
109 graph->
evalOpParm(myOutput, nodeidx,
"output", time, 0);
112 graph->
evalOpParm(myMode, nodeidx,
"mode", time, 0);
113 myUniformSamples = 4;
115 graph->
evalOpParm(myUniformSamples, nodeidx,
"uniformsamples", time, 0);
118 graph->
evalOpParm(myDivs, nodeidx,
"divs", time, 0);
121 graph->
evalOpParm(mySampleDiv, nodeidx,
"samplediv", time, 0);
124 graph->
evalOpParm(myDivSize, nodeidx,
"divsize", time, 0);
125 myOverrideOutput =
false;
127 graph->
evalOpParm(myOverrideOutput, nodeidx,
"overrideoutput", time, 0);
130 graph->
evalOpParm(myIsoDiv, nodeidx,
"isodiv", time, 0);
133 graph->
evalOpParm(myPadBounds, nodeidx,
"padbounds", time, 0);
134 myOverrideBounds =
false;
136 graph->
evalOpParm(myOverrideBounds, nodeidx,
"overridebounds", time, 0);
139 graph->
evalOpParm(myMin, nodeidx,
"min", time, 0);
142 graph->
evalOpParm(myMax, nodeidx,
"max", time, 0);
145 graph->
evalOpParm(myTol, nodeidx,
"tol", time, 0);
148 graph->
evalOpParm(myOffset, nodeidx,
"offset", time, 0);
151 graph->
evalOpParm(myLaserScan, nodeidx,
"laserscan", time, 0);
154 graph->
evalOpParm(myFixSigns, nodeidx,
"fixsigns", time, 0);
155 myForceBounds =
true;
157 graph->
evalOpParm(myForceBounds, nodeidx,
"forcebounds", time, 0);
160 graph->
evalOpParm(myInvert, nodeidx,
"invert", time, 0);
163 graph->
evalOpParm(myNumNeighbour, nodeidx,
"numneighbour", time, 0);
166 graph->
evalOpParm(mySweepCount, nodeidx,
"sweepcount", time, 0);
167 mySweepThreshold = 2;
169 graph->
evalOpParm(mySweepThreshold, nodeidx,
"sweepalpha", time, 0);
172 graph->
evalOpParm(myTetraType, nodeidx,
"tetratype", time, 0);
175 graph->
evalOpParm(myFileMode, nodeidx,
"filemode", time, 0);
176 myFileName =
"./sdf$F4.simdata"_UTsh;
177 if (
true && ( (getFileMode()!=3) ) )
178 graph->
evalOpParm(myFileName, nodeidx,
"filename", time, 0);
181 graph->
evalOpParm(myName, nodeidx,
"name", time, 0);
182 myBuildPolySoup =
false;
184 graph->
evalOpParm(myBuildPolySoup, nodeidx,
"buildpolysoup", time, 0);
200 template <
typename T>
207 if (idx.
size() != instance.
size()+1)
303 { doGetParmValue(idx, instance, value); }
305 { doGetParmValue(idx, instance, value); }
307 { doGetParmValue(idx, instance, value); }
309 { doGetParmValue(idx, instance, value); }
311 { doGetParmValue(idx, instance, value); }
313 { doGetParmValue(idx, instance, value); }
315 { doGetParmValue(idx, instance, value); }
317 { doGetParmValue(idx, instance, value); }
319 { doGetParmValue(idx, instance, value); }
321 { doGetParmValue(idx, instance, value); }
323 { doGetParmValue(idx, instance, value); }
325 template <
typename T>
332 if (idx.
size() != instance.
size()+1)
419 { doSetParmValue(idx, instance, value); }
421 { doSetParmValue(idx, instance, value); }
423 { doSetParmValue(idx, instance, value); }
425 { doSetParmValue(idx, instance, value); }
427 { doSetParmValue(idx, instance, value); }
429 { doSetParmValue(idx, instance, value); }
431 { doSetParmValue(idx, instance, value); }
433 { doSetParmValue(idx, instance, value); }
435 { doSetParmValue(idx, instance, value); }
437 { doSetParmValue(idx, instance, value); }
439 { doSetParmValue(idx, instance, value); }
455 if (fieldnum.
size() < 1)
464 return "uniformsamples";
472 return "overrideoutput";
478 return "overridebounds";
492 return "forcebounds";
496 return "numneighbour";
510 return "buildpolysoup";
518 if (fieldnum.
size() < 1)
519 return PARM_UNSUPPORTED;
612 loadData(is, rampdata);
630 int typelen = colon - data.
buffer();
644 {
int64 iv =
v; UTwrite(os, &iv); }
646 { UTwrite<fpreal64>(os, &
v); }
648 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
650 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
651 UTwrite<fpreal64>(os, &v.
z()); }
653 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
654 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
666 if (s) s->save(ostr);
668 saveData(os, result);
675 ostr << s->getDataTypeToken();
680 saveData(os, result);
684 void save(std::ostream &os)
const
688 saveData(os, myOutput);
689 saveData(os, myMode);
690 saveData(os, myUniformSamples);
691 saveData(os, myDivs);
692 saveData(os, mySampleDiv);
693 saveData(os, myDivSize);
694 saveData(os, myOverrideOutput);
695 saveData(os, myIsoDiv);
696 saveData(os, myPadBounds);
697 saveData(os, myOverrideBounds);
701 saveData(os, myOffset);
702 saveData(os, myLaserScan);
703 saveData(os, myFixSigns);
704 saveData(os, myForceBounds);
705 saveData(os, myInvert);
706 saveData(os, myNumNeighbour);
707 saveData(os, mySweepCount);
708 saveData(os, mySweepThreshold);
709 saveData(os, myTetraType);
710 saveData(os, myFileMode);
711 saveData(os, myFileName);
712 saveData(os, myName);
713 saveData(os, myBuildPolySoup);
726 loadData(is, myOutput);
727 loadData(is, myMode);
728 loadData(is, myUniformSamples);
729 loadData(is, myDivs);
730 loadData(is, mySampleDiv);
731 loadData(is, myDivSize);
732 loadData(is, myOverrideOutput);
733 loadData(is, myIsoDiv);
734 loadData(is, myPadBounds);
735 loadData(is, myOverrideBounds);
739 loadData(is, myOffset);
740 loadData(is, myLaserScan);
741 loadData(is, myFixSigns);
742 loadData(is, myForceBounds);
743 loadData(is, myInvert);
744 loadData(is, myNumNeighbour);
745 loadData(is, mySweepCount);
746 loadData(is, mySweepThreshold);
747 loadData(is, myTetraType);
748 loadData(is, myFileMode);
749 loadData(is, myFileName);
750 loadData(is, myName);
751 loadData(is, myBuildPolySoup);
761 if (!thissop)
return getOutput();
763 OP_Utils::evalOpParm(result, thissop,
"output", cookparms.
getCookTime(), 0);
771 if (!thissop)
return getMode();
773 OP_Utils::evalOpParm(result, thissop,
"mode", cookparms.
getCookTime(), 0);
781 if (!thissop)
return getUniformSamples();
783 OP_Utils::evalOpParm(result, thissop,
"uniformsamples", cookparms.
getCookTime(), 0);
791 if (!thissop)
return getDivs();
793 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
801 if (!thissop)
return getSampleDiv();
803 OP_Utils::evalOpParm(result, thissop,
"samplediv", cookparms.
getCookTime(), 0);
811 if (!thissop)
return getDivSize();
813 OP_Utils::evalOpParm(result, thissop,
"divsize", cookparms.
getCookTime(), 0);
821 if (!thissop)
return getOverrideOutput();
823 OP_Utils::evalOpParm(result, thissop,
"overrideoutput", cookparms.
getCookTime(), 0);
831 if (!thissop)
return getIsoDiv();
833 OP_Utils::evalOpParm(result, thissop,
"isodiv", cookparms.
getCookTime(), 0);
841 if (!thissop)
return getPadBounds();
843 OP_Utils::evalOpParm(result, thissop,
"padbounds", cookparms.
getCookTime(), 0);
851 if (!thissop)
return getOverrideBounds();
853 OP_Utils::evalOpParm(result, thissop,
"overridebounds", cookparms.
getCookTime(), 0);
861 if (!thissop)
return getMin();
863 OP_Utils::evalOpParm(result, thissop,
"min", cookparms.
getCookTime(), 0);
871 if (!thissop)
return getMax();
873 OP_Utils::evalOpParm(result, thissop,
"max", cookparms.
getCookTime(), 0);
881 if (!thissop)
return getTol();
883 OP_Utils::evalOpParm(result, thissop,
"tol", cookparms.
getCookTime(), 0);
891 if (!thissop)
return getOffset();
893 OP_Utils::evalOpParm(result, thissop,
"offset", cookparms.
getCookTime(), 0);
901 if (!thissop)
return getLaserScan();
903 OP_Utils::evalOpParm(result, thissop,
"laserscan", cookparms.
getCookTime(), 0);
911 if (!thissop)
return getFixSigns();
913 OP_Utils::evalOpParm(result, thissop,
"fixsigns", cookparms.
getCookTime(), 0);
921 if (!thissop)
return getForceBounds();
923 OP_Utils::evalOpParm(result, thissop,
"forcebounds", cookparms.
getCookTime(), 0);
931 if (!thissop)
return getInvert();
933 OP_Utils::evalOpParm(result, thissop,
"invert", cookparms.
getCookTime(), 0);
941 if (!thissop)
return getNumNeighbour();
943 OP_Utils::evalOpParm(result, thissop,
"numneighbour", cookparms.
getCookTime(), 0);
951 if (!thissop)
return getSweepCount();
953 OP_Utils::evalOpParm(result, thissop,
"sweepcount", cookparms.
getCookTime(), 0);
961 if (!thissop)
return getSweepThreshold();
963 OP_Utils::evalOpParm(result, thissop,
"sweepalpha", cookparms.
getCookTime(), 0);
971 if (!thissop)
return getTetraType();
973 OP_Utils::evalOpParm(result, thissop,
"tetratype", cookparms.
getCookTime(), 0);
981 if (!thissop)
return getFileMode();
983 OP_Utils::evalOpParm(result, thissop,
"filemode", cookparms.
getCookTime(), 0);
991 if (!thissop)
return getFileName();
993 OP_Utils::evalOpParm(result, thissop,
"filename", cookparms.
getCookTime(), 0);
1001 if (!thissop)
return getName();
1003 OP_Utils::evalOpParm(result, thissop,
"name", cookparms.
getCookTime(), 0);
1011 if (!thissop)
return getBuildPolySoup();
1013 OP_Utils::evalOpParm(result, thissop,
"buildpolysoup", cookparms.
getCookTime(), 0);
1020 int64 myUniformSamples;
1024 bool myOverrideOutput;
1027 bool myOverrideBounds;
1036 int64 myNumNeighbour;
1038 int64 mySweepThreshold;
1043 bool myBuildPolySoup;
int64 opUniformSamples(const SOP_NodeVerb::CookParms &cookparms) const
bool opForceBounds(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_Vector4D v)
void setOffset(fpreal64 val)
bool getLaserScan() const
void setForceBounds(bool val)
void setLaserScan(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setOutput(int64 val)
bool opOverrideOutput(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
void setOverrideOutput(bool val)
SOP_Node * getNode() const
bool operator!=(const SOP_IsoOffsetParms &src) const
bool opInvert(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
void setTetraType(int64 val)
const UT_StringHolder & getName() const
void setIsoDiv(UT_Vector3I val)
int64 getTetraType() const
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_Vector3D &v)
void setMin(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool getForceBounds() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
const OP_Context & context() const
void setNumNeighbour(int64 val)
constexpr SYS_FORCE_INLINE T & z() noexcept
fpreal64 getOffset() const
SYS_FORCE_INLINE const char * buffer() const
int64 opFileMode(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 opDivSize(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool load(UT_IStream &is)
int64 opMode(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
UT_Vector3I opIsoDiv(const SOP_NodeVerb::CookParms &cookparms) const
bool getPadBounds() const
**But if you need a result
static void saveData(std::ostream &os, UT_Matrix2D v)
int64 getUniformSamples() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector2D v)
int64 opNumNeighbour(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_Vector3D getMax() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & x() noexcept
bool getBuildPolySoup() const
UT_Vector3I getDivs() const
UT_StringHolder opFileName(const SOP_NodeVerb::CookParms &cookparms) const
bool opOverrideBounds(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_IsoOffsetParms &src) const
int64 getSweepCount() const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, bool &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_Vector3D opMin(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setDivs(UT_Vector3I val)
fpreal64 getDivSize() const
const UT_StringHolder & getFileName() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setDivSize(fpreal64 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
static void saveData(std::ostream &os, PRM_DataItemHandle s)
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
int64 opOutput(const SOP_NodeVerb::CookParms &cookparms) const
__hostdev__ bool getMax() const
bool isParmColorRamp(exint idx) const override
const OP_GraphProxy * graph() const
void setName(const UT_StringHolder &val)
int64 getNumNeighbour() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_Vector3D getMin() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector4D &v)
int64 getSampleDiv() const
void setTol(fpreal64 val)
void setBuildPolySoup(bool val)
UT_Vector3D opMax(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I getIsoDiv() const
bool getOverrideOutput() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setFileName(const UT_StringHolder &val)
void copyFrom(const OP_NodeParms *src) override
void setUniformSamples(int64 val)
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
bool getOverrideBounds() const
int64 opSweepThreshold(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, int64 &v)
void setSweepCount(int64 val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setMax(UT_Vector3D val)
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void coerceValue(T &result, const S &src) const
fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opName(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setFixSigns(bool val)
bool opBuildPolySoup(const SOP_NodeVerb::CookParms &cookparms) const
bool opPadBounds(const SOP_NodeVerb::CookParms &cookparms) const
void setSweepThreshold(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
DEP_MicroNode * depnode() const
__hostdev__ bool getMin() const
Utility class for containing a color ramp.
void setPadBounds(bool val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
int64 getSweepThreshold() const
int64 opTetraType(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool opFixSigns(const SOP_NodeVerb::CookParms &cookparms) const
void setOverrideBounds(bool val)
int64 getFileMode() const
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setFileMode(int64 val)
const char * findChar(int c) const
void save(std::ostream &os) const
UT_Vector3I opDivs(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setSampleDiv(int64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opLaserScan(const SOP_NodeVerb::CookParms &cookparms) const
int64 opSampleDiv(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal64 opTol(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, int64 v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, fpreal64 v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
int64 opSweepCount(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept