23 namespace SOP_VolumeResizeEnums
35 using namespace UT::Literal;
55 myExtracttile =
false;
66 myAllowextrap =
false;
67 myUseclipplane =
false;
85 if (myGroup != src.myGroup)
return false;
86 if (myExtracttile != src.myExtracttile)
return false;
87 if (myTilecount != src.myTilecount)
return false;
88 if (myTilenum != src.myTilenum)
return false;
89 if (myCombine != src.myCombine)
return false;
90 if (mySize != src.mySize)
return false;
91 if (myT != src.myT)
return false;
92 if (myTileminpad != src.myTileminpad)
return false;
93 if (myTilemaxpad != src.myTilemaxpad)
return false;
94 if (myVoxelpad != src.myVoxelpad)
return false;
95 if (myUsepoints != src.myUsepoints)
return false;
96 if (myKeepdata != src.myKeepdata)
return false;
97 if (myAllowextrap != src.myAllowextrap)
return false;
98 if (myUseclipplane != src.myUseclipplane)
return false;
99 if (myClipcenter != src.myClipcenter)
return false;
100 if (myClipdir != src.myClipdir)
return false;
101 if (myUsemaxres != src.myUsemaxres)
return false;
102 if (myMaxres != src.myMaxres)
return false;
103 if (myDetect2d != src.myDetect2d)
return false;
122 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
123 myExtracttile =
false;
125 graph->
evalOpParm(myExtracttile, nodeidx,
"extracttile", time, graph->
isDirect()?
nullptr:depnode);
127 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
128 graph->
evalOpParm(myTilecount, nodeidx,
"tilecount", time, graph->
isDirect()?
nullptr:depnode);
130 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
131 graph->
evalOpParm(myTilenum, nodeidx,
"tilenum", time, graph->
isDirect()?
nullptr:depnode);
133 if (
true && ( (
true&&!(((getExtracttile()==1)))) ) )
134 graph->
evalOpParm(myCombine, nodeidx,
"combine", time, graph->
isDirect()?
nullptr:depnode);
136 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getExtracttile()==1)))) ) )
139 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getExtracttile()==1)))) ) )
142 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
143 graph->
evalOpParm(myTileminpad, nodeidx,
"tileminpad", time, graph->
isDirect()?
nullptr:depnode);
145 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
146 graph->
evalOpParm(myTilemaxpad, nodeidx,
"tilemaxpad", time, graph->
isDirect()?
nullptr:depnode);
149 graph->
evalOpParm(myVoxelpad, nodeidx,
"voxelpad", time, graph->
isDirect()?
nullptr:depnode);
151 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0))||((getExtracttile()==1)))) ) )
152 graph->
evalOpParm(myUsepoints, nodeidx,
"usepoints", time, graph->
isDirect()?
nullptr:depnode);
155 graph->
evalOpParm(myKeepdata, nodeidx,
"keepdata", time, graph->
isDirect()?
nullptr:depnode);
156 myAllowextrap =
false;
157 if (
true && ( (
true&&!(((getExtracttile()==0)))) ) )
158 graph->
evalOpParm(myAllowextrap, nodeidx,
"allowextrap", time, graph->
isDirect()?
nullptr:depnode);
159 myUseclipplane =
false;
160 if (
true && ( (
true&&!(((getExtracttile()==1)))) ) )
161 graph->
evalOpParm(myUseclipplane, nodeidx,
"useclipplane", time, graph->
isDirect()?
nullptr:depnode);
163 if (
true && ( (
true&&!(((getUseclipplane()==0))||((getExtracttile()==1)))) ) )
164 graph->
evalOpParm(myClipcenter, nodeidx,
"clipcenter", time, graph->
isDirect()?
nullptr:depnode);
166 if (
true && ( (
true&&!(((getUseclipplane()==0))||((getExtracttile()==1)))) ) )
167 graph->
evalOpParm(myClipdir, nodeidx,
"clipdir", time, graph->
isDirect()?
nullptr:depnode);
169 if (
true && ( (
true&&!(((getExtracttile()==1)))) ) )
170 graph->
evalOpParm(myUsemaxres, nodeidx,
"usemaxres", time, graph->
isDirect()?
nullptr:depnode);
172 if (
true && ( (
true&&!(((getUsemaxres()==0))||((getExtracttile()==1)))) ) )
173 graph->
evalOpParm(myMaxres, nodeidx,
"maxres", time, graph->
isDirect()?
nullptr:depnode);
176 graph->
evalOpParm(myDetect2d, nodeidx,
"detect2d", time, graph->
isDirect()?
nullptr:depnode);
192 template <
typename T>
199 if (idx.
size() != instance.
size()+1)
204 coerceValue(value, myGroup);
207 coerceValue(value, myExtracttile);
210 coerceValue(value, myTilecount);
213 coerceValue(value, myTilenum);
216 coerceValue(value, myCombine);
219 coerceValue(value, mySize);
222 coerceValue(value, myT);
225 coerceValue(value, myTileminpad);
228 coerceValue(value, myTilemaxpad);
231 coerceValue(value, myVoxelpad);
234 coerceValue(value, myUsepoints);
237 coerceValue(value, myKeepdata);
240 coerceValue(value, myAllowextrap);
243 coerceValue(value, myUseclipplane);
246 coerceValue(value, myClipcenter);
249 coerceValue(value, myClipdir);
252 coerceValue(value, myUsemaxres);
255 coerceValue(value, myMaxres);
258 coerceValue(value, myDetect2d);
274 { doGetParmValue(idx, instance, value); }
276 { doGetParmValue(idx, instance, value); }
278 { doGetParmValue(idx, instance, value); }
280 { doGetParmValue(idx, instance, value); }
282 { doGetParmValue(idx, instance, value); }
284 { doGetParmValue(idx, instance, value); }
286 { doGetParmValue(idx, instance, value); }
288 { doGetParmValue(idx, instance, value); }
290 { doGetParmValue(idx, instance, value); }
292 { doGetParmValue(idx, instance, value); }
294 { doGetParmValue(idx, instance, value); }
296 template <
typename T>
303 if (idx.
size() != instance.
size()+1)
308 coerceValue(myGroup, ( ( value ) ));
311 coerceValue(myExtracttile, ( ( value ) ));
314 coerceValue(myTilecount, clampMinValue(1, ( value ) ));
317 coerceValue(myTilenum, ( ( value ) ));
320 coerceValue(myCombine, clampMinValue(0, clampMaxValue(2, value ) ));
323 coerceValue(mySize, clampMinValue(0, ( value ) ));
326 coerceValue(myT, ( ( value ) ));
329 coerceValue(myTileminpad, ( ( value ) ));
332 coerceValue(myTilemaxpad, ( ( value ) ));
335 coerceValue(myVoxelpad, ( ( value ) ));
338 coerceValue(myUsepoints, ( ( value ) ));
341 coerceValue(myKeepdata, ( ( value ) ));
344 coerceValue(myAllowextrap, ( ( value ) ));
347 coerceValue(myUseclipplane, ( ( value ) ));
350 coerceValue(myClipcenter, ( ( value ) ));
353 coerceValue(myClipdir, ( ( value ) ));
356 coerceValue(myUsemaxres, ( ( value ) ));
359 coerceValue(myMaxres, ( ( value ) ));
362 coerceValue(myDetect2d, ( ( value ) ));
369 { doSetParmValue(idx, instance, value); }
371 { doSetParmValue(idx, instance, value); }
373 { doSetParmValue(idx, instance, value); }
375 { doSetParmValue(idx, instance, value); }
377 { doSetParmValue(idx, instance, value); }
379 { doSetParmValue(idx, instance, value); }
381 { doSetParmValue(idx, instance, value); }
383 { doSetParmValue(idx, instance, value); }
385 { doSetParmValue(idx, instance, value); }
387 { doSetParmValue(idx, instance, value); }
389 { doSetParmValue(idx, instance, value); }
405 if (fieldnum.
size() < 1)
412 return "extracttile";
434 return "allowextrap";
436 return "useclipplane";
454 if (fieldnum.
size() < 1)
455 return PARM_UNSUPPORTED;
498 return PARM_UNSUPPORTED;
534 loadData(is, rampdata);
552 int typelen = colon - data.
buffer();
566 {
int64 iv =
v; UTwrite(os, &iv); }
568 { UTwrite<fpreal64>(os, &
v); }
570 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
572 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
573 UTwrite<fpreal64>(os, &v.
z()); }
575 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
576 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
588 if (s) s->save(ostr);
590 saveData(os, result);
597 ostr << s->getDataTypeToken();
602 saveData(os, result);
606 void save(std::ostream &os)
const
610 saveData(os, myGroup);
611 saveData(os, myExtracttile);
612 saveData(os, myTilecount);
613 saveData(os, myTilenum);
614 saveData(os, myCombine);
615 saveData(os, mySize);
617 saveData(os, myTileminpad);
618 saveData(os, myTilemaxpad);
619 saveData(os, myVoxelpad);
620 saveData(os, myUsepoints);
621 saveData(os, myKeepdata);
622 saveData(os, myAllowextrap);
623 saveData(os, myUseclipplane);
624 saveData(os, myClipcenter);
625 saveData(os, myClipdir);
626 saveData(os, myUsemaxres);
627 saveData(os, myMaxres);
628 saveData(os, myDetect2d);
641 loadData(is, myGroup);
642 loadData(is, myExtracttile);
643 loadData(is, myTilecount);
644 loadData(is, myTilenum);
645 loadData(is, myCombine);
646 loadData(is, mySize);
648 loadData(is, myTileminpad);
649 loadData(is, myTilemaxpad);
650 loadData(is, myVoxelpad);
651 loadData(is, myUsepoints);
652 loadData(is, myKeepdata);
653 loadData(is, myAllowextrap);
654 loadData(is, myUseclipplane);
655 loadData(is, myClipcenter);
656 loadData(is, myClipdir);
657 loadData(is, myUsemaxres);
658 loadData(is, myMaxres);
659 loadData(is, myDetect2d);
669 if (!thissop)
return getGroup();
671 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
679 if (!thissop)
return getExtracttile();
681 OP_Utils::evalOpParm(result, thissop,
"extracttile", cookparms.
getCookTime(), 0);
689 if (!thissop)
return getTilecount();
691 OP_Utils::evalOpParm(result, thissop,
"tilecount", cookparms.
getCookTime(), 0);
699 if (!thissop)
return getTilenum();
701 OP_Utils::evalOpParm(result, thissop,
"tilenum", cookparms.
getCookTime(), 0);
709 if (!thissop)
return getCombine();
711 OP_Utils::evalOpParm(result, thissop,
"combine", cookparms.
getCookTime(), 0);
719 if (!thissop)
return getSize();
721 OP_Utils::evalOpParm(result, thissop,
"size", cookparms.
getCookTime(), 0);
729 if (!thissop)
return getT();
731 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
739 if (!thissop)
return getTileminpad();
741 OP_Utils::evalOpParm(result, thissop,
"tileminpad", cookparms.
getCookTime(), 0);
749 if (!thissop)
return getTilemaxpad();
751 OP_Utils::evalOpParm(result, thissop,
"tilemaxpad", cookparms.
getCookTime(), 0);
759 if (!thissop)
return getVoxelpad();
761 OP_Utils::evalOpParm(result, thissop,
"voxelpad", cookparms.
getCookTime(), 0);
769 if (!thissop)
return getUsepoints();
771 OP_Utils::evalOpParm(result, thissop,
"usepoints", cookparms.
getCookTime(), 0);
779 if (!thissop)
return getKeepdata();
781 OP_Utils::evalOpParm(result, thissop,
"keepdata", cookparms.
getCookTime(), 0);
789 if (!thissop)
return getAllowextrap();
791 OP_Utils::evalOpParm(result, thissop,
"allowextrap", cookparms.
getCookTime(), 0);
799 if (!thissop)
return getUseclipplane();
801 OP_Utils::evalOpParm(result, thissop,
"useclipplane", cookparms.
getCookTime(), 0);
809 if (!thissop)
return getClipcenter();
811 OP_Utils::evalOpParm(result, thissop,
"clipcenter", cookparms.
getCookTime(), 0);
819 if (!thissop)
return getClipdir();
821 OP_Utils::evalOpParm(result, thissop,
"clipdir", cookparms.
getCookTime(), 0);
829 if (!thissop)
return getUsemaxres();
831 OP_Utils::evalOpParm(result, thissop,
"usemaxres", cookparms.
getCookTime(), 0);
839 if (!thissop)
return getMaxres();
841 OP_Utils::evalOpParm(result, thissop,
"maxres", cookparms.
getCookTime(), 0);
849 if (!thissop)
return getDetect2d();
851 OP_Utils::evalOpParm(result, thissop,
"detect2d", cookparms.
getCookTime(), 0);
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =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
bool opAllowextrap(const SOP_NodeVerb::CookParms &cookparms) const
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)
GLsizei const GLfloat * value
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
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
bool getAllowextrap() 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
void setAllowextrap(bool val)
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
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_Vector3D getClipcenter() const
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)