23 namespace SOP_SphereEnums
39 using namespace UT::Literal;
66 using namespace UT::Literal;
89 using namespace UT::Literal;
121 myTriangularpoles =
true;
136 if (myType != src.myType)
return false;
137 if (mySurftype != src.mySurftype)
return false;
138 if (myRad != src.myRad)
return false;
139 if (myT != src.myT)
return false;
140 if (myR != src.myR)
return false;
141 if (myScale != src.myScale)
return false;
142 if (myOrient != src.myOrient)
return false;
143 if (myFreq != src.myFreq)
return false;
144 if (myOrderu != src.myOrderu)
return false;
145 if (myOrderv != src.myOrderv)
return false;
146 if (myImperfect != src.myImperfect)
return false;
147 if (myUpole != src.myUpole)
return false;
148 if (myAccurate != src.myAccurate)
return false;
149 if (myTriangularpoles != src.myTriangularpoles)
return false;
150 if (myRows != src.myRows)
return false;
151 if (myCols != src.myCols)
return false;
174 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6)))) ) )
175 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, graph->
isDirect()?
nullptr:depnode);
177 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
180 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
186 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
187 graph->
evalOpParm(myScale, nodeidx,
"scale", time, graph->
isDirect()?
nullptr:depnode);
190 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, graph->
isDirect()?
nullptr:depnode);
192 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=6)))) ) )
195 if (
true && ( (
true&&!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
196 graph->
evalOpParm(myOrderu, nodeidx,
"orderu", time, graph->
isDirect()?
nullptr:depnode);
198 if (
true && ( (
true&&!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
199 graph->
evalOpParm(myOrderv, nodeidx,
"orderv", time, graph->
isDirect()?
nullptr:depnode);
201 if (
true && ( (
true&&!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
202 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, graph->
isDirect()?
nullptr:depnode);
204 if (
true && ( (
true&&!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
205 graph->
evalOpParm(myUpole, nodeidx,
"upole", time, graph->
isDirect()?
nullptr:depnode);
207 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
208 graph->
evalOpParm(myAccurate, nodeidx,
"accurate", time, graph->
isDirect()?
nullptr:depnode);
209 myTriangularpoles =
true;
210 if (
true && ( (
true&&!(((
int64(getType())!=2))||((
int64(getType())==2)&&(
int64(getSurftype())!=4)&&(
int64(getSurftype())!=0)&&(
int64(getSurftype())!=1)&&(
int64(getSurftype())!=2)))) ) )
211 graph->
evalOpParm(myTriangularpoles, nodeidx,
"triangularpoles", time, graph->
isDirect()?
nullptr:depnode);
213 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6))||((
int64(getType())==4)&&(getImperfect()==0))||((
int64(getType())==5)&&(getImperfect()==0)))) ) )
216 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6))||((
int64(getType())==4)&&(getImperfect()==0))||((
int64(getType())==5)&&(getImperfect()==0)))) ) )
233 template <
typename T>
240 if (idx.
size() != instance.
size()+1)
245 coerceValue(value, myType);
248 coerceValue(value, mySurftype);
251 coerceValue(value, myRad);
254 coerceValue(value, myT);
257 coerceValue(value, myR);
260 coerceValue(value, myScale);
263 coerceValue(value, myOrient);
266 coerceValue(value, myFreq);
269 coerceValue(value, myOrderu);
272 coerceValue(value, myOrderv);
275 coerceValue(value, myImperfect);
278 coerceValue(value, myUpole);
281 coerceValue(value, myAccurate);
284 coerceValue(value, myTriangularpoles);
287 coerceValue(value, myRows);
290 coerceValue(value, myCols);
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 { doGetParmValue(idx, instance, value); }
328 template <
typename T>
335 if (idx.
size() != instance.
size()+1)
340 coerceValue(myType, clampMinValue(0, clampMaxValue(6, value ) ));
343 coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
346 coerceValue(myRad, ( ( value ) ));
349 coerceValue(myT, ( ( value ) ));
352 coerceValue(myR, ( ( value ) ));
355 coerceValue(myScale, ( ( value ) ));
358 coerceValue(myOrient, clampMinValue(0, clampMaxValue(2, value ) ));
361 coerceValue(myFreq, clampMinValue(1, ( value ) ));
364 coerceValue(myOrderu, clampMinValue(2, clampMaxValue(11, value ) ));
367 coerceValue(myOrderv, clampMinValue(2, clampMaxValue(11, value ) ));
370 coerceValue(myImperfect, ( ( value ) ));
373 coerceValue(myUpole, ( ( value ) ));
376 coerceValue(myAccurate, ( ( value ) ));
379 coerceValue(myTriangularpoles, ( ( value ) ));
382 coerceValue(myRows, clampMinValue(3, ( value ) ));
385 coerceValue(myCols, clampMinValue(3, ( 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); }
412 { doSetParmValue(idx, instance, value); }
428 if (fieldnum.
size() < 1)
459 return "triangularpoles";
471 if (fieldnum.
size() < 1)
472 return PARM_UNSUPPORTED;
509 return PARM_UNSUPPORTED;
545 loadData(is, rampdata);
563 int typelen = colon - data.
buffer();
577 {
int64 iv =
v; UTwrite(os, &iv); }
579 { UTwrite<fpreal64>(os, &
v); }
581 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
583 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
584 UTwrite<fpreal64>(os, &v.
z()); }
586 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
587 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
599 if (s) s->save(ostr);
601 saveData(os, result);
608 ostr << s->getDataTypeToken();
613 saveData(os, result);
617 void save(std::ostream &os)
const
621 saveData(os, myType);
622 saveData(os, mySurftype);
626 saveData(os, myScale);
627 saveData(os, myOrient);
628 saveData(os, myFreq);
629 saveData(os, myOrderu);
630 saveData(os, myOrderv);
631 saveData(os, myImperfect);
632 saveData(os, myUpole);
633 saveData(os, myAccurate);
634 saveData(os, myTriangularpoles);
635 saveData(os, myRows);
636 saveData(os, myCols);
649 loadData(is, myType);
650 loadData(is, mySurftype);
654 loadData(is, myScale);
655 loadData(is, myOrient);
656 loadData(is, myFreq);
657 loadData(is, myOrderu);
658 loadData(is, myOrderv);
659 loadData(is, myImperfect);
660 loadData(is, myUpole);
661 loadData(is, myAccurate);
662 loadData(is, myTriangularpoles);
663 loadData(is, myRows);
664 loadData(is, myCols);
674 if (!thissop)
return getType();
676 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
684 if (!thissop)
return getSurftype();
686 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
694 if (!thissop)
return getRad();
696 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
704 if (!thissop)
return getT();
706 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
714 if (!thissop)
return getR();
716 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
726 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
734 if (!thissop)
return getOrient();
736 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
744 if (!thissop)
return getFreq();
746 OP_Utils::evalOpParm(result, thissop,
"freq", cookparms.
getCookTime(), 0);
754 if (!thissop)
return getOrderu();
756 OP_Utils::evalOpParm(result, thissop,
"orderu", cookparms.
getCookTime(), 0);
764 if (!thissop)
return getOrderv();
766 OP_Utils::evalOpParm(result, thissop,
"orderv", cookparms.
getCookTime(), 0);
774 if (!thissop)
return getImperfect();
776 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
784 if (!thissop)
return getUpole();
786 OP_Utils::evalOpParm(result, thissop,
"upole", cookparms.
getCookTime(), 0);
794 if (!thissop)
return getAccurate();
796 OP_Utils::evalOpParm(result, thissop,
"accurate", cookparms.
getCookTime(), 0);
804 if (!thissop)
return getTriangularpoles();
806 OP_Utils::evalOpParm(result, thissop,
"triangularpoles", cookparms.
getCookTime(), 0);
814 if (!thissop)
return getRows();
816 OP_Utils::evalOpParm(result, thissop,
"rows", cookparms.
getCookTime(), 0);
824 if (!thissop)
return getCols();
826 OP_Utils::evalOpParm(result, thissop,
"cols", cookparms.
getCookTime(), 0);
844 bool myTriangularpoles;
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
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
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
GLsizei const GLfloat * value
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
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)
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
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)
LeafData & operator=(const LeafData &)=delete
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
virtual UT_StringHolder baseGetSignature() const
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
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
void setAccurate(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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
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
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept