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;
124 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
125 myEnable_preprocess =
true;
127 graph->
evalOpParm(myEnable_preprocess, nodeidx,
"enable_preprocess", time, graph->
isDirect()?
nullptr:depnode);
129 if (
true && ( (
true&&!(((getEnable_preprocess()!=1)))) ) )
130 graph->
evalOpParm(myDeactivate, nodeidx,
"deactivate", time, graph->
isDirect()?
nullptr:depnode);
135 if (
true && ( (
true&&!(((
int64(getMode())!=0)))) ) )
136 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, graph->
isDirect()?
nullptr:depnode);
137 mySourcevols =
""_UTsh;
138 if (
true && ( (
true&&!(((
int64(getMode())!=1)))) ) )
139 graph->
evalOpParm(mySourcevols, nodeidx,
"sourcevols", time, graph->
isDirect()?
nullptr:depnode);
140 myDosmoothing =
false;
142 graph->
evalOpParm(myDosmoothing, nodeidx,
"dosmoothing", time, graph->
isDirect()?
nullptr:depnode);
143 myScalecompressed =
true;
145 graph->
evalOpParm(myScalecompressed, nodeidx,
"scalecompressed", time, graph->
isDirect()?
nullptr:depnode);
146 myDomaxdensityscale =
true;
147 if (
true && ( (
true&&!(((getScalecompressed()!=1)))) ) )
148 graph->
evalOpParm(myDomaxdensityscale, nodeidx,
"domaxdensityscale", time, graph->
isDirect()?
nullptr:depnode);
149 myMaxdensityscale = 10;
150 if (
true && ( (
true&&!(((getScalecompressed()!=1))||((getDomaxdensityscale()!=1)))) ) )
151 graph->
evalOpParm(myMaxdensityscale, nodeidx,
"maxdensityscale", time, graph->
isDirect()?
nullptr:depnode);
154 graph->
evalOpParm(myPrune, nodeidx,
"prune", time, graph->
isDirect()?
nullptr:depnode);
155 myPrunetolerance = 0;
156 if (
true && ( (
true&&!(((getPrune()!=1)))) ) )
157 graph->
evalOpParm(myPrunetolerance, nodeidx,
"prunetolerance", time, graph->
isDirect()?
nullptr:depnode);
173 template <
typename T>
180 if (idx.
size() != instance.
size()+1)
185 coerceValue(value, myGroup);
188 coerceValue(value, myEnable_preprocess);
191 coerceValue(value, myDeactivate);
194 coerceValue(value, myMode);
197 coerceValue(value, myAttrib);
200 coerceValue(value, mySourcevols);
203 coerceValue(value, myDosmoothing);
206 coerceValue(value, myScalecompressed);
209 coerceValue(value, myDomaxdensityscale);
212 coerceValue(value, myMaxdensityscale);
215 coerceValue(value, myPrune);
218 coerceValue(value, myPrunetolerance);
234 { doGetParmValue(idx, instance, value); }
236 { doGetParmValue(idx, instance, value); }
238 { doGetParmValue(idx, instance, value); }
240 { doGetParmValue(idx, instance, value); }
242 { doGetParmValue(idx, instance, value); }
244 { doGetParmValue(idx, instance, value); }
246 { doGetParmValue(idx, instance, value); }
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 template <
typename T>
263 if (idx.
size() != instance.
size()+1)
268 coerceValue(myGroup, ( ( value ) ));
271 coerceValue(myEnable_preprocess, ( ( value ) ));
274 coerceValue(myDeactivate, clampMinValue(0, clampMaxValue(1, value ) ));
277 coerceValue(myMode, clampMinValue(0, clampMaxValue(1, value ) ));
280 coerceValue(myAttrib, ( ( value ) ));
283 coerceValue(mySourcevols, ( ( value ) ));
286 coerceValue(myDosmoothing, ( ( value ) ));
289 coerceValue(myScalecompressed, ( ( value ) ));
292 coerceValue(myDomaxdensityscale, ( ( value ) ));
295 coerceValue(myMaxdensityscale, ( ( value ) ));
298 coerceValue(myPrune, ( ( value ) ));
301 coerceValue(myPrunetolerance, ( ( value ) ));
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
312 { doSetParmValue(idx, instance, value); }
314 { doSetParmValue(idx, instance, value); }
316 { doSetParmValue(idx, instance, value); }
318 { doSetParmValue(idx, instance, value); }
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
326 { doSetParmValue(idx, instance, value); }
328 { doSetParmValue(idx, instance, value); }
344 if (fieldnum.
size() < 1)
351 return "enable_preprocess";
361 return "dosmoothing";
363 return "scalecompressed";
365 return "domaxdensityscale";
367 return "maxdensityscale";
371 return "prunetolerance";
379 if (fieldnum.
size() < 1)
380 return PARM_UNSUPPORTED;
409 return PARM_UNSUPPORTED;
445 loadData(is, rampdata);
463 int typelen = colon - data.
buffer();
477 {
int64 iv =
v; UTwrite(os, &iv); }
479 { UTwrite<fpreal64>(os, &
v); }
481 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
483 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
484 UTwrite<fpreal64>(os, &v.
z()); }
486 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
487 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
499 if (s) s->save(ostr);
501 saveData(os, result);
508 ostr << s->getDataTypeToken();
513 saveData(os, result);
517 void save(std::ostream &os)
const
521 saveData(os, myGroup);
522 saveData(os, myEnable_preprocess);
523 saveData(os, myDeactivate);
524 saveData(os, myMode);
525 saveData(os, myAttrib);
526 saveData(os, mySourcevols);
527 saveData(os, myDosmoothing);
528 saveData(os, myScalecompressed);
529 saveData(os, myDomaxdensityscale);
530 saveData(os, myMaxdensityscale);
531 saveData(os, myPrune);
532 saveData(os, myPrunetolerance);
545 loadData(is, myGroup);
546 loadData(is, myEnable_preprocess);
547 loadData(is, myDeactivate);
548 loadData(is, myMode);
549 loadData(is, myAttrib);
550 loadData(is, mySourcevols);
551 loadData(is, myDosmoothing);
552 loadData(is, myScalecompressed);
553 loadData(is, myDomaxdensityscale);
554 loadData(is, myMaxdensityscale);
555 loadData(is, myPrune);
556 loadData(is, myPrunetolerance);
566 if (!thissop)
return getGroup();
568 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
576 if (!thissop)
return getEnable_preprocess();
578 OP_Utils::evalOpParm(result, thissop,
"enable_preprocess", cookparms.
getCookTime(), 0);
586 if (!thissop)
return getDeactivate();
588 OP_Utils::evalOpParm(result, thissop,
"deactivate", cookparms.
getCookTime(), 0);
596 if (!thissop)
return getMode();
598 OP_Utils::evalOpParm(result, thissop,
"mode", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getAttrib();
608 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getSourcevols();
618 OP_Utils::evalOpParm(result, thissop,
"sourcevols", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getDosmoothing();
628 OP_Utils::evalOpParm(result, thissop,
"dosmoothing", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getScalecompressed();
638 OP_Utils::evalOpParm(result, thissop,
"scalecompressed", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getDomaxdensityscale();
648 OP_Utils::evalOpParm(result, thissop,
"domaxdensityscale", cookparms.
getCookTime(), 0);
656 if (!thissop)
return getMaxdensityscale();
658 OP_Utils::evalOpParm(result, thissop,
"maxdensityscale", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getPrune();
668 OP_Utils::evalOpParm(result, thissop,
"prune", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getPrunetolerance();
678 OP_Utils::evalOpParm(result, thissop,
"prunetolerance", cookparms.
getCookTime(), 0);
684 bool myEnable_preprocess;
690 bool myScalecompressed;
691 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
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
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