23 namespace SOP_VolumeResizeEnums
35 using namespace UT::Literal;
55 myExtracttile =
false;
66 myUseclipplane =
false;
84 if (myGroup != src.myGroup)
return false;
85 if (myExtracttile != src.myExtracttile)
return false;
86 if (myTilecount != src.myTilecount)
return false;
87 if (myTilenum != src.myTilenum)
return false;
88 if (myCombine != src.myCombine)
return false;
89 if (mySize != src.mySize)
return false;
90 if (myT != src.myT)
return false;
91 if (myTileminpad != src.myTileminpad)
return false;
92 if (myTilemaxpad != src.myTilemaxpad)
return false;
93 if (myVoxelpad != src.myVoxelpad)
return false;
94 if (myUsepoints != src.myUsepoints)
return false;
95 if (myKeepdata != src.myKeepdata)
return false;
96 if (myUseclipplane != src.myUseclipplane)
return false;
97 if (myClipcenter != src.myClipcenter)
return false;
98 if (myClipdir != src.myClipdir)
return false;
99 if (myUsemaxres != src.myUsemaxres)
return false;
100 if (myMaxres != src.myMaxres)
return false;
101 if (myDetect2d != src.myDetect2d)
return false;
117 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
118 myExtracttile =
false;
120 graph->
evalOpParm(myExtracttile, nodeidx,
"extracttile", time, 0);
122 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
123 graph->
evalOpParm(myTilecount, nodeidx,
"tilecount", time, 0);
125 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
126 graph->
evalOpParm(myTilenum, nodeidx,
"tilenum", time, 0);
128 if (
true && ( (
true&&!(((getExtracttile()==1)))) ) )
129 graph->
evalOpParm(myCombine, nodeidx,
"combine", time, 0);
131 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getExtracttile()==1)))) ) )
132 graph->
evalOpParm(mySize, nodeidx,
"size", time, 0);
134 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getExtracttile()==1)))) ) )
135 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
137 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
138 graph->
evalOpParm(myTileminpad, nodeidx,
"tileminpad", time, 0);
140 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
141 graph->
evalOpParm(myTilemaxpad, nodeidx,
"tilemaxpad", time, 0);
144 graph->
evalOpParm(myVoxelpad, nodeidx,
"voxelpad", time, 0);
146 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0))||((getExtracttile()==1)))) ) )
147 graph->
evalOpParm(myUsepoints, nodeidx,
"usepoints", time, 0);
150 graph->
evalOpParm(myKeepdata, nodeidx,
"keepdata", time, 0);
151 myUseclipplane =
false;
152 if (
true && ( (
true&&!(((getExtracttile()==1)))) ) )
153 graph->
evalOpParm(myUseclipplane, nodeidx,
"useclipplane", time, 0);
155 if (
true && ( (
true&&!(((getUseclipplane()==0))||((getExtracttile()==1)))) ) )
156 graph->
evalOpParm(myClipcenter, nodeidx,
"clipcenter", time, 0);
158 if (
true && ( (
true&&!(((getUseclipplane()==0))||((getExtracttile()==1)))) ) )
159 graph->
evalOpParm(myClipdir, nodeidx,
"clipdir", time, 0);
161 if (
true && ( (
true&&!(((getExtracttile()==1)))) ) )
162 graph->
evalOpParm(myUsemaxres, nodeidx,
"usemaxres", time, 0);
164 if (
true && ( (
true&&!(((getUsemaxres()==0))||((getExtracttile()==1)))) ) )
165 graph->
evalOpParm(myMaxres, nodeidx,
"maxres", time, 0);
168 graph->
evalOpParm(myDetect2d, nodeidx,
"detect2d", time, 0);
184 template <
typename T>
191 if (idx.
size() != instance.
size()+1)
196 coerceValue(value, myGroup);
199 coerceValue(value, myExtracttile);
202 coerceValue(value, myTilecount);
205 coerceValue(value, myTilenum);
208 coerceValue(value, myCombine);
211 coerceValue(value, mySize);
214 coerceValue(value, myT);
217 coerceValue(value, myTileminpad);
220 coerceValue(value, myTilemaxpad);
223 coerceValue(value, myVoxelpad);
226 coerceValue(value, myUsepoints);
229 coerceValue(value, myKeepdata);
232 coerceValue(value, myUseclipplane);
235 coerceValue(value, myClipcenter);
238 coerceValue(value, myClipdir);
241 coerceValue(value, myUsemaxres);
244 coerceValue(value, myMaxres);
247 coerceValue(value, myDetect2d);
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 { doGetParmValue(idx, instance, value); }
275 { doGetParmValue(idx, instance, value); }
277 { doGetParmValue(idx, instance, value); }
279 { doGetParmValue(idx, instance, value); }
281 { doGetParmValue(idx, instance, value); }
283 { doGetParmValue(idx, instance, value); }
285 template <
typename T>
292 if (idx.
size() != instance.
size()+1)
297 coerceValue(myGroup, ( ( value ) ));
300 coerceValue(myExtracttile, ( ( value ) ));
303 coerceValue(myTilecount, clampMinValue(1, ( value ) ));
306 coerceValue(myTilenum, ( ( value ) ));
309 coerceValue(myCombine, clampMinValue(0, clampMaxValue(2, value ) ));
312 coerceValue(mySize, clampMinValue(0, ( value ) ));
315 coerceValue(myT, ( ( value ) ));
318 coerceValue(myTileminpad, ( ( value ) ));
321 coerceValue(myTilemaxpad, ( ( value ) ));
324 coerceValue(myVoxelpad, ( ( value ) ));
327 coerceValue(myUsepoints, ( ( value ) ));
330 coerceValue(myKeepdata, ( ( value ) ));
333 coerceValue(myUseclipplane, ( ( value ) ));
336 coerceValue(myClipcenter, ( ( value ) ));
339 coerceValue(myClipdir, ( ( value ) ));
342 coerceValue(myUsemaxres, ( ( value ) ));
345 coerceValue(myMaxres, ( ( value ) ));
348 coerceValue(myDetect2d, ( ( value ) ));
355 { doSetParmValue(idx, instance, value); }
357 { doSetParmValue(idx, instance, value); }
359 { doSetParmValue(idx, instance, value); }
361 { doSetParmValue(idx, instance, value); }
363 { doSetParmValue(idx, instance, value); }
365 { doSetParmValue(idx, instance, value); }
367 { doSetParmValue(idx, instance, value); }
369 { doSetParmValue(idx, instance, value); }
371 { doSetParmValue(idx, instance, value); }
373 { doSetParmValue(idx, instance, value); }
375 { doSetParmValue(idx, instance, value); }
391 if (fieldnum.
size() < 1)
398 return "extracttile";
420 return "useclipplane";
438 if (fieldnum.
size() < 1)
439 return PARM_UNSUPPORTED;
480 return PARM_UNSUPPORTED;
516 loadData(is, rampdata);
534 int typelen = colon - data.
buffer();
548 {
int64 iv =
v; UTwrite(os, &iv); }
550 { UTwrite<fpreal64>(os, &
v); }
552 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
554 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
555 UTwrite<fpreal64>(os, &v.
z()); }
557 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
558 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
570 if (s) s->save(ostr);
572 saveData(os, result);
579 ostr << s->getDataTypeToken();
584 saveData(os, result);
588 void save(std::ostream &os)
const
592 saveData(os, myGroup);
593 saveData(os, myExtracttile);
594 saveData(os, myTilecount);
595 saveData(os, myTilenum);
596 saveData(os, myCombine);
597 saveData(os, mySize);
599 saveData(os, myTileminpad);
600 saveData(os, myTilemaxpad);
601 saveData(os, myVoxelpad);
602 saveData(os, myUsepoints);
603 saveData(os, myKeepdata);
604 saveData(os, myUseclipplane);
605 saveData(os, myClipcenter);
606 saveData(os, myClipdir);
607 saveData(os, myUsemaxres);
608 saveData(os, myMaxres);
609 saveData(os, myDetect2d);
622 loadData(is, myGroup);
623 loadData(is, myExtracttile);
624 loadData(is, myTilecount);
625 loadData(is, myTilenum);
626 loadData(is, myCombine);
627 loadData(is, mySize);
629 loadData(is, myTileminpad);
630 loadData(is, myTilemaxpad);
631 loadData(is, myVoxelpad);
632 loadData(is, myUsepoints);
633 loadData(is, myKeepdata);
634 loadData(is, myUseclipplane);
635 loadData(is, myClipcenter);
636 loadData(is, myClipdir);
637 loadData(is, myUsemaxres);
638 loadData(is, myMaxres);
639 loadData(is, myDetect2d);
649 if (!thissop)
return getGroup();
651 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getExtracttile();
661 OP_Utils::evalOpParm(result, thissop,
"extracttile", cookparms.
getCookTime(), 0);
669 if (!thissop)
return getTilecount();
671 OP_Utils::evalOpParm(result, thissop,
"tilecount", cookparms.
getCookTime(), 0);
679 if (!thissop)
return getTilenum();
681 OP_Utils::evalOpParm(result, thissop,
"tilenum", cookparms.
getCookTime(), 0);
689 if (!thissop)
return getCombine();
691 OP_Utils::evalOpParm(result, thissop,
"combine", cookparms.
getCookTime(), 0);
699 if (!thissop)
return getSize();
701 OP_Utils::evalOpParm(result, thissop,
"size", cookparms.
getCookTime(), 0);
709 if (!thissop)
return getT();
711 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
719 if (!thissop)
return getTileminpad();
721 OP_Utils::evalOpParm(result, thissop,
"tileminpad", cookparms.
getCookTime(), 0);
729 if (!thissop)
return getTilemaxpad();
731 OP_Utils::evalOpParm(result, thissop,
"tilemaxpad", cookparms.
getCookTime(), 0);
739 if (!thissop)
return getVoxelpad();
741 OP_Utils::evalOpParm(result, thissop,
"voxelpad", cookparms.
getCookTime(), 0);
749 if (!thissop)
return getUsepoints();
751 OP_Utils::evalOpParm(result, thissop,
"usepoints", cookparms.
getCookTime(), 0);
759 if (!thissop)
return getKeepdata();
761 OP_Utils::evalOpParm(result, thissop,
"keepdata", cookparms.
getCookTime(), 0);
769 if (!thissop)
return getUseclipplane();
771 OP_Utils::evalOpParm(result, thissop,
"useclipplane", cookparms.
getCookTime(), 0);
779 if (!thissop)
return getClipcenter();
781 OP_Utils::evalOpParm(result, thissop,
"clipcenter", cookparms.
getCookTime(), 0);
789 if (!thissop)
return getClipdir();
791 OP_Utils::evalOpParm(result, thissop,
"clipdir", cookparms.
getCookTime(), 0);
799 if (!thissop)
return getUsemaxres();
801 OP_Utils::evalOpParm(result, thissop,
"usemaxres", cookparms.
getCookTime(), 0);
809 if (!thissop)
return getMaxres();
811 OP_Utils::evalOpParm(result, thissop,
"maxres", cookparms.
getCookTime(), 0);
819 if (!thissop)
return getDetect2d();
821 OP_Utils::evalOpParm(result, thissop,
"detect2d", cookparms.
getCookTime(), 0);
bool getUsemaxres() const
UT_Vector3D opVoxelpad(const SOP_NodeVerb::CookParms &cookparms) const
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 setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setUsepoints(bool val)
void setVoxelpad(UT_Vector3D val)
Combine opCombine(const SOP_NodeVerb::CookParms &cookparms) const
bool opExtracttile(const SOP_NodeVerb::CookParms &cookparms) const
int64 opTilenum(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setExtracttile(bool val)
exint getNestNumParms(TempIndex idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, int64 &v)
ParmType getNestParmType(TempIndex fieldnum) const override
const OP_Context & context() const
void setMaxres(UT_Vector3I val)
constexpr SYS_FORCE_INLINE T & z() noexcept
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
SYS_FORCE_INLINE const char * buffer() const
bool opKeepdata(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, bool &v)
bool operator==(const SOP_VolumeResizeParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool getUseclipplane() const
**But if you need a result
UT_Vector3T< int64 > UT_Vector3I
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_Vector3D opClipcenter(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I opTilemaxpad(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool getUsepoints() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
UT_Vector3D opClipdir(const SOP_NodeVerb::CookParms &cookparms) const
void setSize(UT_Vector3D val)
bool getExtracttile() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
Combine getCombine() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_Vector3I getTilemaxpad() const
SYS_FORCE_INLINE UT_StringHolder getToken(Combine enum_value)
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
void setUsemaxres(bool val)
static void saveData(std::ostream &os, UT_Matrix4D v)
const OP_GraphProxy * graph() const
void setTilecount(UT_Vector3I val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_Vector3D getSize() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setClipcenter(UT_Vector3D val)
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
void setTilenum(int64 val)
void setDetect2d(bool val)
void copyFrom(const OP_NodeParms *src) override
const char * getNestParmName(TempIndex fieldnum) const override
void save(std::ostream &os) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
UT_Vector3I opMaxres(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
GT_API const UT_StringHolder version
UT_Vector3D getVoxelpad() const
UT_Vector3I opTilecount(const SOP_NodeVerb::CookParms &cookparms) const
bool opDetect2d(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setTileminpad(UT_Vector3I val)
UT_Vector3I getTilecount() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_Vector3D getClipdir() const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setKeepdata(bool val)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setClipdir(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
UT_Vector3I getMaxres() const
void setUseclipplane(bool val)
bool opUsemaxres(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
void setGroup(const UT_StringHolder &val)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Matrix3D v)
bool opUseclipplane(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool operator!=(const SOP_VolumeResizeParms &src) const
UT_Vector3I opTileminpad(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, bool v)
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I getTileminpad() const
UT_Vector3D getClipcenter() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setTilemaxpad(UT_Vector3I val)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
bool opUsepoints(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setCombine(Combine val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setT(UT_Vector3D val)
static void saveData(std::ostream &os, int64 v)