23 namespace SOP_TubeEnums
38 using namespace UT::Literal;
64 using namespace UT::Literal;
87 using namespace UT::Literal;
110 myConsolidatepts =
true;
111 myVertexnormals =
false;
134 if (myType != src.myType)
return false;
135 if (mySurftype != src.mySurftype)
return false;
136 if (myOrient != src.myOrient)
return false;
137 if (myCap != src.myCap)
return false;
138 if (myConsolidatepts != src.myConsolidatepts)
return false;
139 if (myVertexnormals != src.myVertexnormals)
return false;
140 if (myT != src.myT)
return false;
141 if (myR != src.myR)
return false;
142 if (myRad != src.myRad)
return false;
143 if (myRadscale != src.myRadscale)
return false;
144 if (myHeight != src.myHeight)
return false;
145 if (myRows != src.myRows)
return false;
146 if (myOrderu != src.myOrderu)
return false;
147 if (myOrderv != src.myOrderv)
return false;
148 if (myImperfect != src.myImperfect)
return false;
149 if (myCols != src.myCols)
return false;
172 if (
true && ( (
true&&!(((
int64(getType())==0)))) ) )
173 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, graph->
isDirect()?
nullptr:depnode);
176 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, graph->
isDirect()?
nullptr:depnode);
180 myConsolidatepts =
true;
181 if (
true && ( (
true&&!(((getCap()==0))||((
int64(getType())!=1)&&(
int64(getType())!=5)))) ) )
182 graph->
evalOpParm(myConsolidatepts, nodeidx,
"consolidatepts", time, graph->
isDirect()?
nullptr:depnode);
183 myVertexnormals =
false;
185 graph->
evalOpParm(myVertexnormals, nodeidx,
"vertexnormals", time, graph->
isDirect()?
nullptr:depnode);
187 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)!=0)))) ) )
190 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)!=0)))) ) )
193 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)!=0)))) ) )
196 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)!=0)))) ) )
197 graph->
evalOpParm(myRadscale, nodeidx,
"radscale", time, graph->
isDirect()?
nullptr:depnode);
199 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)!=0)))) ) )
200 graph->
evalOpParm(myHeight, nodeidx,
"height", time, graph->
isDirect()?
nullptr:depnode);
202 if (
true && ( (
true&&!(((
int64(getType())==0)))) ) )
205 if (
true && ( (
true&&!(((
int64(getType())!=3)&&(
int64(getType())!=4)))) ) )
206 graph->
evalOpParm(myOrderu, nodeidx,
"orderu", time, graph->
isDirect()?
nullptr:depnode);
208 if (
true && ( (
true&&!(((
int64(getType())!=3)&&(
int64(getType())!=4)))) ) )
209 graph->
evalOpParm(myOrderv, nodeidx,
"orderv", time, graph->
isDirect()?
nullptr:depnode);
211 if (
true && ( (
true&&!(((
int64(getType())!=3)&&(
int64(getType())!=4)))) ) )
212 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, graph->
isDirect()?
nullptr:depnode);
214 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==4)&&(getImperfect()==0))||((
int64(getType())==3)&&(getImperfect()==0)))) ) )
231 template <
typename T>
238 if (idx.
size() != instance.
size()+1)
243 coerceValue(value, myType);
246 coerceValue(value, mySurftype);
249 coerceValue(value, myOrient);
252 coerceValue(value, myCap);
255 coerceValue(value, myConsolidatepts);
258 coerceValue(value, myVertexnormals);
261 coerceValue(value, myT);
264 coerceValue(value, myR);
267 coerceValue(value, myRad);
270 coerceValue(value, myRadscale);
273 coerceValue(value, myHeight);
276 coerceValue(value, myRows);
279 coerceValue(value, myOrderu);
282 coerceValue(value, myOrderv);
285 coerceValue(value, myImperfect);
288 coerceValue(value, myCols);
304 { doGetParmValue(idx, instance, value); }
306 { doGetParmValue(idx, instance, value); }
308 { doGetParmValue(idx, instance, value); }
310 { doGetParmValue(idx, instance, value); }
312 { doGetParmValue(idx, instance, value); }
314 { doGetParmValue(idx, instance, value); }
316 { doGetParmValue(idx, instance, value); }
318 { doGetParmValue(idx, instance, value); }
320 { doGetParmValue(idx, instance, value); }
322 { doGetParmValue(idx, instance, value); }
324 { doGetParmValue(idx, instance, value); }
326 template <
typename T>
333 if (idx.
size() != instance.
size()+1)
338 coerceValue(myType, clampMinValue(0, clampMaxValue(5, value ) ));
341 coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
344 coerceValue(myOrient, clampMinValue(0, clampMaxValue(2, value ) ));
347 coerceValue(myCap, ( ( value ) ));
350 coerceValue(myConsolidatepts, ( ( value ) ));
353 coerceValue(myVertexnormals, ( ( value ) ));
356 coerceValue(myT, ( ( value ) ));
359 coerceValue(myR, ( ( value ) ));
362 coerceValue(myRad, clampMinValue(0, ( value ) ));
365 coerceValue(myRadscale, clampMinValue(0, ( value ) ));
368 coerceValue(myHeight, ( ( value ) ));
371 coerceValue(myRows, clampMinValue(2, ( value ) ));
374 coerceValue(myOrderu, clampMinValue(2, clampMaxValue(11, value ) ));
377 coerceValue(myOrderv, clampMinValue(2, clampMaxValue(11, value ) ));
380 coerceValue(myImperfect, ( ( value ) ));
383 coerceValue(myCols, clampMinValue(3, ( value ) ));
390 { doSetParmValue(idx, instance, value); }
392 { doSetParmValue(idx, instance, value); }
394 { doSetParmValue(idx, instance, value); }
396 { doSetParmValue(idx, instance, value); }
398 { doSetParmValue(idx, instance, value); }
400 { doSetParmValue(idx, instance, value); }
402 { doSetParmValue(idx, instance, value); }
404 { doSetParmValue(idx, instance, value); }
406 { doSetParmValue(idx, instance, value); }
408 { doSetParmValue(idx, instance, value); }
410 { doSetParmValue(idx, instance, value); }
426 if (fieldnum.
size() < 1)
439 return "consolidatepts";
441 return "vertexnormals";
469 if (fieldnum.
size() < 1)
470 return PARM_UNSUPPORTED;
507 return PARM_UNSUPPORTED;
543 loadData(is, rampdata);
561 int typelen = colon - data.
buffer();
575 {
int64 iv =
v; UTwrite(os, &iv); }
577 { UTwrite<fpreal64>(os, &
v); }
579 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
581 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
582 UTwrite<fpreal64>(os, &v.
z()); }
584 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
585 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
597 if (s) s->save(ostr);
599 saveData(os, result);
606 ostr << s->getDataTypeToken();
611 saveData(os, result);
615 void save(std::ostream &os)
const
619 saveData(os, myType);
620 saveData(os, mySurftype);
621 saveData(os, myOrient);
623 saveData(os, myConsolidatepts);
624 saveData(os, myVertexnormals);
628 saveData(os, myRadscale);
629 saveData(os, myHeight);
630 saveData(os, myRows);
631 saveData(os, myOrderu);
632 saveData(os, myOrderv);
633 saveData(os, myImperfect);
634 saveData(os, myCols);
647 loadData(is, myType);
648 loadData(is, mySurftype);
649 loadData(is, myOrient);
651 loadData(is, myConsolidatepts);
652 loadData(is, myVertexnormals);
656 loadData(is, myRadscale);
657 loadData(is, myHeight);
658 loadData(is, myRows);
659 loadData(is, myOrderu);
660 loadData(is, myOrderv);
661 loadData(is, myImperfect);
662 loadData(is, myCols);
672 if (!thissop)
return getType();
674 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
682 if (!thissop)
return getSurftype();
684 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
692 if (!thissop)
return getOrient();
694 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
702 if (!thissop)
return getCap();
704 OP_Utils::evalOpParm(result, thissop,
"cap", cookparms.
getCookTime(), 0);
712 if (!thissop)
return getConsolidatepts();
714 OP_Utils::evalOpParm(result, thissop,
"consolidatepts", cookparms.
getCookTime(), 0);
722 if (!thissop)
return getVertexnormals();
724 OP_Utils::evalOpParm(result, thissop,
"vertexnormals", cookparms.
getCookTime(), 0);
732 if (!thissop)
return getT();
734 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
742 if (!thissop)
return getR();
744 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
752 if (!thissop)
return getRad();
754 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
762 if (!thissop)
return getRadscale();
764 OP_Utils::evalOpParm(result, thissop,
"radscale", cookparms.
getCookTime(), 0);
772 if (!thissop)
return getHeight();
774 OP_Utils::evalOpParm(result, thissop,
"height", cookparms.
getCookTime(), 0);
782 if (!thissop)
return getRows();
784 OP_Utils::evalOpParm(result, thissop,
"rows", cookparms.
getCookTime(), 0);
792 if (!thissop)
return getOrderu();
794 OP_Utils::evalOpParm(result, thissop,
"orderu", cookparms.
getCookTime(), 0);
802 if (!thissop)
return getOrderv();
804 OP_Utils::evalOpParm(result, thissop,
"orderv", cookparms.
getCookTime(), 0);
812 if (!thissop)
return getImperfect();
814 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
822 if (!thissop)
return getCols();
824 OP_Utils::evalOpParm(result, thissop,
"cols", cookparms.
getCookTime(), 0);
833 bool myConsolidatepts;
834 bool myVertexnormals;
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
void setRad(UT_Vector2D val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool opVertexnormals(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D getRad() const
bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opRad(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, fpreal64 &v)
bool opConsolidatepts(const SOP_NodeVerb::CookParms &cookparms) const
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
bool getImperfect() const
fpreal64 getHeight() const
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, UT_Vector3D v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 opRadscale(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setT(UT_Vector3D val)
SYS_FORCE_INLINE const char * buffer() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setSurftype(Surftype val)
**But if you need a result
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
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 loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
fpreal64 getRadscale() const
static void saveData(std::ostream &os, bool v)
void setOrderu(int64 val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool load(UT_IStream &is)
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
bool isParmColorRamp(exint idx) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setVertexnormals(bool val)
Surftype getSurftype() const
ParmType getNestParmType(TempIndex fieldnum) const override
bool getVertexnormals() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 opHeight(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
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 setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setConsolidatepts(bool val)
const OP_GraphProxy * graph() const
bool operator!=(const SOP_TubeParms &src) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool operator==(const SOP_TubeParms &src) const
int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
void setRadscale(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_Vector3T< fpreal64 > UT_Vector3D
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_Matrix3D v)
Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
void save(std::ostream &os) const
void setImperfect(bool val)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, int64 &v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setOrient(Orient val)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setR(UT_Vector3D val)
virtual UT_StringHolder baseGetSignature() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setOrderv(int64 val)
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
const char * findChar(int c) const
void setHeight(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Vector2D v)
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
constexpr SYS_FORCE_INLINE T & y() noexcept
bool getConsolidatepts() const
static void saveData(std::ostream &os, UT_Matrix2D v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
exint getNestNumParms(TempIndex idx) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opCap(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept