23 namespace SOP_VolumeRasterizeLatticeEnums
46 myEnable_preprocess =
true;
50 mySourcevols =
""_UTsh;
51 myDosmoothing =
false;
52 myScalecompressed =
true;
53 myDomaxdensityscale =
true;
54 myMaxdensityscale = 10;
69 if (myGroup != src.myGroup)
return false;
70 if (myEnable_preprocess != src.myEnable_preprocess)
return false;
71 if (myDeactivate != src.myDeactivate)
return false;
72 if (myMode != src.myMode)
return false;
73 if (myAttrib != src.myAttrib)
return false;
74 if (mySourcevols != src.mySourcevols)
return false;
75 if (myDosmoothing != src.myDosmoothing)
return false;
76 if (myScalecompressed != src.myScalecompressed)
return false;
77 if (myDomaxdensityscale != src.myDomaxdensityscale)
return false;
78 if (myMaxdensityscale != src.myMaxdensityscale)
return false;
79 if (myPrune != src.myPrune)
return false;
80 if (myPrunetolerance != src.myPrunetolerance)
return false;
97 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
98 myEnable_preprocess =
true;
100 graph->
evalOpParm(myEnable_preprocess, nodeidx,
"enable_preprocess", time, 0);
102 if (
true && ( (
true&&!(((getEnable_preprocess()!=1)))) ) )
103 graph->
evalOpParm(myDeactivate, nodeidx,
"deactivate", time, 0);
106 graph->
evalOpParm(myMode, nodeidx,
"mode", time, 0);
108 if (
true && ( (
true&&!(((
int64(getMode())!=0)))) ) )
109 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, 0);
110 mySourcevols =
""_UTsh;
111 if (
true && ( (
true&&!(((
int64(getMode())!=1)))) ) )
112 graph->
evalOpParm(mySourcevols, nodeidx,
"sourcevols", time, 0);
113 myDosmoothing =
false;
115 graph->
evalOpParm(myDosmoothing, nodeidx,
"dosmoothing", time, 0);
116 myScalecompressed =
true;
118 graph->
evalOpParm(myScalecompressed, nodeidx,
"scalecompressed", time, 0);
119 myDomaxdensityscale =
true;
120 if (
true && ( (
true&&!(((getScalecompressed()!=1)))) ) )
121 graph->
evalOpParm(myDomaxdensityscale, nodeidx,
"domaxdensityscale", time, 0);
122 myMaxdensityscale = 10;
123 if (
true && ( (
true&&!(((getScalecompressed()!=1))||((getDomaxdensityscale()!=1)))) ) )
124 graph->
evalOpParm(myMaxdensityscale, nodeidx,
"maxdensityscale", time, 0);
127 graph->
evalOpParm(myPrune, nodeidx,
"prune", time, 0);
128 myPrunetolerance = 0;
129 if (
true && ( (
true&&!(((getPrune()!=1)))) ) )
130 graph->
evalOpParm(myPrunetolerance, nodeidx,
"prunetolerance", time, 0);
146 template <
typename T>
153 if (idx.
size() != instance.
size()+1)
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 template <
typename T>
236 if (idx.
size() != instance.
size()+1)
281 { doSetParmValue(idx, instance, value); }
283 { doSetParmValue(idx, instance, value); }
285 { doSetParmValue(idx, instance, value); }
287 { doSetParmValue(idx, instance, value); }
289 { doSetParmValue(idx, instance, value); }
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
297 { doSetParmValue(idx, instance, value); }
299 { doSetParmValue(idx, instance, value); }
301 { doSetParmValue(idx, instance, value); }
317 if (fieldnum.
size() < 1)
324 return "enable_preprocess";
334 return "dosmoothing";
336 return "scalecompressed";
338 return "domaxdensityscale";
340 return "maxdensityscale";
344 return "prunetolerance";
352 if (fieldnum.
size() < 1)
353 return PARM_UNSUPPORTED;
401 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
403 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
405 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
418 loadData(is, rampdata);
436 int typelen = colon - data.
buffer();
450 {
int64 iv =
v; UTwrite(os, &iv); }
452 { UTwrite<fpreal64>(os, &
v); }
454 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
456 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
457 UTwrite<fpreal64>(os, &v.
z()); }
459 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
460 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
472 if (s) s->save(ostr);
474 saveData(os, result);
481 ostr << s->getDataTypeToken();
486 saveData(os, result);
490 void save(std::ostream &os)
const
494 saveData(os, myGroup);
495 saveData(os, myEnable_preprocess);
496 saveData(os, myDeactivate);
497 saveData(os, myMode);
498 saveData(os, myAttrib);
499 saveData(os, mySourcevols);
500 saveData(os, myDosmoothing);
501 saveData(os, myScalecompressed);
502 saveData(os, myDomaxdensityscale);
503 saveData(os, myMaxdensityscale);
504 saveData(os, myPrune);
505 saveData(os, myPrunetolerance);
518 loadData(is, myGroup);
519 loadData(is, myEnable_preprocess);
520 loadData(is, myDeactivate);
521 loadData(is, myMode);
522 loadData(is, myAttrib);
523 loadData(is, mySourcevols);
524 loadData(is, myDosmoothing);
525 loadData(is, myScalecompressed);
526 loadData(is, myDomaxdensityscale);
527 loadData(is, myMaxdensityscale);
528 loadData(is, myPrune);
529 loadData(is, myPrunetolerance);
539 if (!thissop)
return getGroup();
541 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
549 if (!thissop)
return getEnable_preprocess();
551 OP_Utils::evalOpParm(result, thissop,
"enable_preprocess", cookparms.
getCookTime(), 0);
559 if (!thissop)
return getDeactivate();
561 OP_Utils::evalOpParm(result, thissop,
"deactivate", cookparms.
getCookTime(), 0);
569 if (!thissop)
return getMode();
571 OP_Utils::evalOpParm(result, thissop,
"mode", cookparms.
getCookTime(), 0);
579 if (!thissop)
return getAttrib();
581 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
589 if (!thissop)
return getSourcevols();
591 OP_Utils::evalOpParm(result, thissop,
"sourcevols", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getDosmoothing();
601 OP_Utils::evalOpParm(result, thissop,
"dosmoothing", cookparms.
getCookTime(), 0);
609 if (!thissop)
return getScalecompressed();
611 OP_Utils::evalOpParm(result, thissop,
"scalecompressed", cookparms.
getCookTime(), 0);
619 if (!thissop)
return getDomaxdensityscale();
621 OP_Utils::evalOpParm(result, thissop,
"domaxdensityscale", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getMaxdensityscale();
631 OP_Utils::evalOpParm(result, thissop,
"maxdensityscale", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getPrune();
641 OP_Utils::evalOpParm(result, thissop,
"prune", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getPrunetolerance();
651 OP_Utils::evalOpParm(result, thissop,
"prunetolerance", cookparms.
getCookTime(), 0);
657 bool myEnable_preprocess;
663 bool myScalecompressed;
664 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
T clampMaxValue(fpreal maxvalue, const T &src) const
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
T clampMinValue(fpreal minvalue, const T &src) const
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 coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setPrunetolerance(fpreal64 val)
bool load(UT_IStream &is)
DEP_MicroNode * depnode() const
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
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
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_Vector2D &value) override
void setDeactivate(Deactivate val)
constexpr SYS_FORCE_INLINE T & x() noexcept