23 namespace SOP_VolumeRasterizeLatticeEnums
34 using namespace UT::Literal;
51 using namespace UT::Literal;
70 myEnable_preprocess =
true;
74 mySourcevols =
""_UTsh;
75 myDosmoothing =
false;
76 myScalecompressed =
true;
77 myDomaxdensityscale =
true;
78 myMaxdensityscale = 10;
93 if (myGroup != src.myGroup)
return false;
94 if (myEnable_preprocess != src.myEnable_preprocess)
return false;
95 if (myDeactivate != src.myDeactivate)
return false;
96 if (myMode != src.myMode)
return false;
97 if (myAttrib != src.myAttrib)
return false;
98 if (mySourcevols != src.mySourcevols)
return false;
99 if (myDosmoothing != src.myDosmoothing)
return false;
100 if (myScalecompressed != src.myScalecompressed)
return false;
101 if (myDomaxdensityscale != src.myDomaxdensityscale)
return false;
102 if (myMaxdensityscale != src.myMaxdensityscale)
return false;
103 if (myPrune != src.myPrune)
return false;
104 if (myPrunetolerance != src.myPrunetolerance)
return false;
121 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
122 myEnable_preprocess =
true;
124 graph->
evalOpParm(myEnable_preprocess, nodeidx,
"enable_preprocess", time, 0);
126 if (
true && ( (
true&&!(((getEnable_preprocess()!=1)))) ) )
127 graph->
evalOpParm(myDeactivate, nodeidx,
"deactivate", time, 0);
130 graph->
evalOpParm(myMode, nodeidx,
"mode", time, 0);
132 if (
true && ( (
true&&!(((
int64(getMode())!=0)))) ) )
133 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, 0);
134 mySourcevols =
""_UTsh;
135 if (
true && ( (
true&&!(((
int64(getMode())!=1)))) ) )
136 graph->
evalOpParm(mySourcevols, nodeidx,
"sourcevols", time, 0);
137 myDosmoothing =
false;
139 graph->
evalOpParm(myDosmoothing, nodeidx,
"dosmoothing", time, 0);
140 myScalecompressed =
true;
142 graph->
evalOpParm(myScalecompressed, nodeidx,
"scalecompressed", time, 0);
143 myDomaxdensityscale =
true;
144 if (
true && ( (
true&&!(((getScalecompressed()!=1)))) ) )
145 graph->
evalOpParm(myDomaxdensityscale, nodeidx,
"domaxdensityscale", time, 0);
146 myMaxdensityscale = 10;
147 if (
true && ( (
true&&!(((getScalecompressed()!=1))||((getDomaxdensityscale()!=1)))) ) )
148 graph->
evalOpParm(myMaxdensityscale, nodeidx,
"maxdensityscale", time, 0);
151 graph->
evalOpParm(myPrune, nodeidx,
"prune", time, 0);
152 myPrunetolerance = 0;
153 if (
true && ( (
true&&!(((getPrune()!=1)))) ) )
154 graph->
evalOpParm(myPrunetolerance, nodeidx,
"prunetolerance", time, 0);
170 template <
typename T>
177 if (idx.
size() != instance.
size()+1)
182 coerceValue(value, myGroup);
185 coerceValue(value, myEnable_preprocess);
188 coerceValue(value, myDeactivate);
191 coerceValue(value, myMode);
194 coerceValue(value, myAttrib);
197 coerceValue(value, mySourcevols);
200 coerceValue(value, myDosmoothing);
203 coerceValue(value, myScalecompressed);
206 coerceValue(value, myDomaxdensityscale);
209 coerceValue(value, myMaxdensityscale);
212 coerceValue(value, myPrune);
215 coerceValue(value, myPrunetolerance);
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 template <
typename T>
260 if (idx.
size() != instance.
size()+1)
265 coerceValue(myGroup, ( ( value ) ));
268 coerceValue(myEnable_preprocess, ( ( value ) ));
271 coerceValue(myDeactivate, clampMinValue(0, clampMaxValue(1, value ) ));
274 coerceValue(myMode, clampMinValue(0, clampMaxValue(1, value ) ));
277 coerceValue(myAttrib, ( ( value ) ));
280 coerceValue(mySourcevols, ( ( value ) ));
283 coerceValue(myDosmoothing, ( ( value ) ));
286 coerceValue(myScalecompressed, ( ( value ) ));
289 coerceValue(myDomaxdensityscale, ( ( value ) ));
292 coerceValue(myMaxdensityscale, ( ( value ) ));
295 coerceValue(myPrune, ( ( value ) ));
298 coerceValue(myPrunetolerance, ( ( value ) ));
305 { doSetParmValue(idx, instance, value); }
307 { doSetParmValue(idx, instance, value); }
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
313 { doSetParmValue(idx, instance, value); }
315 { doSetParmValue(idx, instance, value); }
317 { doSetParmValue(idx, instance, value); }
319 { doSetParmValue(idx, instance, value); }
321 { doSetParmValue(idx, instance, value); }
323 { doSetParmValue(idx, instance, value); }
325 { doSetParmValue(idx, instance, value); }
341 if (fieldnum.
size() < 1)
348 return "enable_preprocess";
358 return "dosmoothing";
360 return "scalecompressed";
362 return "domaxdensityscale";
364 return "maxdensityscale";
368 return "prunetolerance";
376 if (fieldnum.
size() < 1)
377 return PARM_UNSUPPORTED;
406 return PARM_UNSUPPORTED;
442 loadData(is, rampdata);
460 int typelen = colon - data.
buffer();
474 {
int64 iv =
v; UTwrite(os, &iv); }
476 { UTwrite<fpreal64>(os, &
v); }
478 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
480 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
481 UTwrite<fpreal64>(os, &v.
z()); }
483 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
484 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
496 if (s) s->save(ostr);
498 saveData(os, result);
505 ostr << s->getDataTypeToken();
510 saveData(os, result);
514 void save(std::ostream &os)
const
518 saveData(os, myGroup);
519 saveData(os, myEnable_preprocess);
520 saveData(os, myDeactivate);
521 saveData(os, myMode);
522 saveData(os, myAttrib);
523 saveData(os, mySourcevols);
524 saveData(os, myDosmoothing);
525 saveData(os, myScalecompressed);
526 saveData(os, myDomaxdensityscale);
527 saveData(os, myMaxdensityscale);
528 saveData(os, myPrune);
529 saveData(os, myPrunetolerance);
542 loadData(is, myGroup);
543 loadData(is, myEnable_preprocess);
544 loadData(is, myDeactivate);
545 loadData(is, myMode);
546 loadData(is, myAttrib);
547 loadData(is, mySourcevols);
548 loadData(is, myDosmoothing);
549 loadData(is, myScalecompressed);
550 loadData(is, myDomaxdensityscale);
551 loadData(is, myMaxdensityscale);
552 loadData(is, myPrune);
553 loadData(is, myPrunetolerance);
563 if (!thissop)
return getGroup();
565 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
573 if (!thissop)
return getEnable_preprocess();
575 OP_Utils::evalOpParm(result, thissop,
"enable_preprocess", cookparms.
getCookTime(), 0);
583 if (!thissop)
return getDeactivate();
585 OP_Utils::evalOpParm(result, thissop,
"deactivate", cookparms.
getCookTime(), 0);
593 if (!thissop)
return getMode();
595 OP_Utils::evalOpParm(result, thissop,
"mode", cookparms.
getCookTime(), 0);
603 if (!thissop)
return getAttrib();
605 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
613 if (!thissop)
return getSourcevols();
615 OP_Utils::evalOpParm(result, thissop,
"sourcevols", cookparms.
getCookTime(), 0);
623 if (!thissop)
return getDosmoothing();
625 OP_Utils::evalOpParm(result, thissop,
"dosmoothing", cookparms.
getCookTime(), 0);
633 if (!thissop)
return getScalecompressed();
635 OP_Utils::evalOpParm(result, thissop,
"scalecompressed", cookparms.
getCookTime(), 0);
643 if (!thissop)
return getDomaxdensityscale();
645 OP_Utils::evalOpParm(result, thissop,
"domaxdensityscale", cookparms.
getCookTime(), 0);
653 if (!thissop)
return getMaxdensityscale();
655 OP_Utils::evalOpParm(result, thissop,
"maxdensityscale", cookparms.
getCookTime(), 0);
663 if (!thissop)
return getPrune();
665 OP_Utils::evalOpParm(result, thissop,
"prune", cookparms.
getCookTime(), 0);
673 if (!thissop)
return getPrunetolerance();
675 OP_Utils::evalOpParm(result, thissop,
"prunetolerance", cookparms.
getCookTime(), 0);
681 bool myEnable_preprocess;
687 bool myScalecompressed;
688 bool myDomaxdensityscale;
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool getEnable_preprocess() const
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 opMaxdensityscale(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setDomaxdensityscale(bool val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opScalecompressed(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
const OP_Context & context() const
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getGroup() const
fpreal64 opPrunetolerance(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setDosmoothing(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
SOP_VolumeRasterizeLatticeParms()
static void saveData(std::ostream &os, UT_Matrix3D v)
**But if you need a result
fpreal64 getPrunetolerance() const
UT_StringHolder opSourcevols(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setAttrib(const UT_StringHolder &val)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool opDosmoothing(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setMaxdensityscale(fpreal64 val)
bool operator!=(const SOP_VolumeRasterizeLatticeParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opPrune(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setSourcevols(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, fpreal64 v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
fpreal64 getMaxdensityscale() const
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool operator==(const SOP_VolumeRasterizeLatticeParms &src) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
const UT_StringHolder & getAttrib() const
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opDomaxdensityscale(const SOP_NodeVerb::CookParms &cookparms) const
Deactivate opDeactivate(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
void setScalecompressed(bool val)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool getDomaxdensityscale() const
exint getNestNumParms(TempIndex idx) const override
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.
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setGroup(const UT_StringHolder &val)
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool getDosmoothing() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
Deactivate getDeactivate() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setPrunetolerance(fpreal64 val)
bool load(UT_IStream &is)
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
bool opEnable_preprocess(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setEnable_preprocess(bool val)
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
bool getScalecompressed() const
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Deactivate enum_value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const UT_StringHolder & getSourcevols() const
constexpr SYS_FORCE_INLINE T & y() noexcept
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void save(std::ostream &os) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setDeactivate(Deactivate val)
constexpr SYS_FORCE_INLINE T & x() noexcept