23 namespace SOP_SphereEnums
74 myTriangularpoles =
true;
89 if (myType != src.myType)
return false;
90 if (mySurftype != src.mySurftype)
return false;
91 if (myRad != src.myRad)
return false;
92 if (myT != src.myT)
return false;
93 if (myR != src.myR)
return false;
94 if (myScale != src.myScale)
return false;
95 if (myOrient != src.myOrient)
return false;
96 if (myFreq != src.myFreq)
return false;
97 if (myOrderu != src.myOrderu)
return false;
98 if (myOrderv != src.myOrderv)
return false;
99 if (myImperfect != src.myImperfect)
return false;
100 if (myUpole != src.myUpole)
return false;
101 if (myAccurate != src.myAccurate)
return false;
102 if (myTriangularpoles != src.myTriangularpoles)
return false;
103 if (myRows != src.myRows)
return false;
104 if (myCols != src.myCols)
return false;
122 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
124 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6)))) ) )
125 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, 0);
127 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
128 graph->
evalOpParm(myRad, nodeidx,
"rad", time, 0);
130 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
131 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
134 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
136 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
137 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
140 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, 0);
142 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=6)))) ) )
143 graph->
evalOpParm(myFreq, nodeidx,
"freq", time, 0);
145 if (
true && ( (
true&&!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
146 graph->
evalOpParm(myOrderu, nodeidx,
"orderu", time, 0);
148 if (
true && ( (
true&&!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
149 graph->
evalOpParm(myOrderv, nodeidx,
"orderv", time, 0);
151 if (
true && ( (
true&&!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
152 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, 0);
154 if (
true && ( (
true&&!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
155 graph->
evalOpParm(myUpole, nodeidx,
"upole", time, 0);
157 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
158 graph->
evalOpParm(myAccurate, nodeidx,
"accurate", time, 0);
159 myTriangularpoles =
true;
160 if (
true && ( (
true&&!(((
int64(getType())!=2))||((
int64(getType())==2)&&(
int64(getSurftype())!=4)&&(
int64(getSurftype())!=0)&&(
int64(getSurftype())!=1)&&(
int64(getSurftype())!=2)))) ) )
161 graph->
evalOpParm(myTriangularpoles, nodeidx,
"triangularpoles", time, 0);
163 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6))||((
int64(getType())==4)&&(getImperfect()==0))||((
int64(getType())==5)&&(getImperfect()==0)))) ) )
164 graph->
evalOpParm(myRows, nodeidx,
"rows", time, 0);
166 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6))||((
int64(getType())==4)&&(getImperfect()==0))||((
int64(getType())==5)&&(getImperfect()==0)))) ) )
167 graph->
evalOpParm(myCols, nodeidx,
"cols", time, 0);
183 template <
typename T>
190 if (idx.
size() != instance.
size()+1)
256 { doGetParmValue(idx, instance, value); }
258 { doGetParmValue(idx, instance, value); }
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 { doGetParmValue(idx, instance, value); }
272 { doGetParmValue(idx, instance, value); }
274 { doGetParmValue(idx, instance, value); }
276 { doGetParmValue(idx, instance, value); }
278 template <
typename T>
285 if (idx.
size() != instance.
size()+1)
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
356 { doSetParmValue(idx, instance, value); }
358 { doSetParmValue(idx, instance, value); }
360 { doSetParmValue(idx, instance, value); }
362 { doSetParmValue(idx, instance, value); }
378 if (fieldnum.
size() < 1)
409 return "triangularpoles";
421 if (fieldnum.
size() < 1)
422 return PARM_UNSUPPORTED;
478 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
480 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
482 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
495 loadData(is, rampdata);
513 int typelen = colon - data.
buffer();
527 {
int64 iv =
v; UTwrite(os, &iv); }
529 { UTwrite<fpreal64>(os, &
v); }
531 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
533 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
534 UTwrite<fpreal64>(os, &v.
z()); }
536 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
537 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
549 if (s) s->save(ostr);
551 saveData(os, result);
558 ostr << s->getDataTypeToken();
563 saveData(os, result);
567 void save(std::ostream &os)
const
571 saveData(os, myType);
572 saveData(os, mySurftype);
576 saveData(os, myScale);
577 saveData(os, myOrient);
578 saveData(os, myFreq);
579 saveData(os, myOrderu);
580 saveData(os, myOrderv);
581 saveData(os, myImperfect);
582 saveData(os, myUpole);
583 saveData(os, myAccurate);
584 saveData(os, myTriangularpoles);
585 saveData(os, myRows);
586 saveData(os, myCols);
599 loadData(is, myType);
600 loadData(is, mySurftype);
604 loadData(is, myScale);
605 loadData(is, myOrient);
606 loadData(is, myFreq);
607 loadData(is, myOrderu);
608 loadData(is, myOrderv);
609 loadData(is, myImperfect);
610 loadData(is, myUpole);
611 loadData(is, myAccurate);
612 loadData(is, myTriangularpoles);
613 loadData(is, myRows);
614 loadData(is, myCols);
624 if (!thissop)
return getType();
626 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
634 if (!thissop)
return getSurftype();
636 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
644 if (!thissop)
return getRad();
646 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
654 if (!thissop)
return getT();
656 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
664 if (!thissop)
return getR();
666 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
676 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
684 if (!thissop)
return getOrient();
686 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
694 if (!thissop)
return getFreq();
696 OP_Utils::evalOpParm(result, thissop,
"freq", cookparms.
getCookTime(), 0);
704 if (!thissop)
return getOrderu();
706 OP_Utils::evalOpParm(result, thissop,
"orderu", cookparms.
getCookTime(), 0);
714 if (!thissop)
return getOrderv();
716 OP_Utils::evalOpParm(result, thissop,
"orderv", cookparms.
getCookTime(), 0);
724 if (!thissop)
return getImperfect();
726 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
734 if (!thissop)
return getUpole();
736 OP_Utils::evalOpParm(result, thissop,
"upole", cookparms.
getCookTime(), 0);
744 if (!thissop)
return getAccurate();
746 OP_Utils::evalOpParm(result, thissop,
"accurate", cookparms.
getCookTime(), 0);
754 if (!thissop)
return getTriangularpoles();
756 OP_Utils::evalOpParm(result, thissop,
"triangularpoles", cookparms.
getCookTime(), 0);
764 if (!thissop)
return getRows();
766 OP_Utils::evalOpParm(result, thissop,
"rows", cookparms.
getCookTime(), 0);
774 if (!thissop)
return getCols();
776 OP_Utils::evalOpParm(result, thissop,
"cols", cookparms.
getCookTime(), 0);
794 bool myTriangularpoles;
const char * getNestParmName(TempIndex fieldnum) const override
bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_SphereParms &src) const
void setRad(UT_Vector3D val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
T clampMaxValue(fpreal maxvalue, const T &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const OP_Context & context() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_Vector3D opRad(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_StringHolder s)
Surftype getSurftype() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
void setOrderu(int64 val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool getImperfect() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
int64 opFreq(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setSurftype(Surftype val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void copyFrom(const OP_NodeParms *src) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
bool getTriangularpoles() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
const OP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setR(UT_Vector3D val)
ParmType getNestParmType(TempIndex fieldnum) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void setOrderv(int64 val)
void setT(UT_Vector3D val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool opTriangularpoles(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool isParmColorRamp(exint idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator==(const SOP_SphereParms &src) const
void setScale(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setTriangularpoles(bool val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void coerceValue(T &result, const S &src) const
int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
DEP_MicroNode * depnode() const
void setOrient(Orient val)
bool opUpole(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal getCookTime() const
const char * findChar(int c) const
void setAccurate(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void save(std::ostream &os) const
fpreal64 getScale() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getRad() const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
void setImperfect(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept