20 using namespace UT::Literal;
23 namespace SOP_SphereEnums
74 myTriangularpoles =
true;
86 if (myType != src.myType)
return false;
87 if (mySurftype != src.mySurftype)
return false;
88 if (myRad != src.myRad)
return false;
89 if (myT != src.myT)
return false;
90 if (myR != src.myR)
return false;
91 if (myScale != src.myScale)
return false;
92 if (myOrient != src.myOrient)
return false;
93 if (myFreq != src.myFreq)
return false;
94 if (myOrderu != src.myOrderu)
return false;
95 if (myOrderv != src.myOrderv)
return false;
96 if (myImperfect != src.myImperfect)
return false;
97 if (myUpole != src.myUpole)
return false;
98 if (myAccurate != src.myAccurate)
return false;
99 if (myTriangularpoles != src.myTriangularpoles)
return false;
100 if (myRows != src.myRows)
return false;
101 if (myCols != src.myCols)
return false;
119 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
121 if (
true && ( (!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6)))) ) )
122 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, 0);
124 if (
true && ( (!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
125 graph->
evalOpParm(myRad, nodeidx,
"rad", time, 0);
127 if (
true && ( (!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
128 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
131 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
133 if (
true && ( (!((((graph->
getInput(nodeidx,0)>=0)==1)))) ) )
134 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
137 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, 0);
139 if (
true && ( (!(((
int64(getType())!=1)&&(
int64(getType())!=6)))) ) )
140 graph->
evalOpParm(myFreq, nodeidx,
"freq", time, 0);
142 if (
true && ( (!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
143 graph->
evalOpParm(myOrderu, nodeidx,
"orderu", time, 0);
145 if (
true && ( (!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
146 graph->
evalOpParm(myOrderv, nodeidx,
"orderv", time, 0);
148 if (
true && ( (!(((
int64(getType())!=5)&&(
int64(getType())!=4)))) ) )
149 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, 0);
151 if (
true && ( (!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
152 graph->
evalOpParm(myUpole, nodeidx,
"upole", time, 0);
154 if (
true && ( (!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
155 graph->
evalOpParm(myAccurate, nodeidx,
"accurate", time, 0);
156 myTriangularpoles =
true;
157 if (
true && ( (!(((
int64(getType())!=2))||((
int64(getType())==2)&&(
int64(getSurftype())!=4)&&(
int64(getSurftype())!=0)&&(
int64(getSurftype())!=1)&&(
int64(getSurftype())!=2)))) ) )
158 graph->
evalOpParm(myTriangularpoles, nodeidx,
"triangularpoles", time, 0);
160 if (
true && ( (!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6))||((
int64(getType())==4)&&(getImperfect()==0))||((
int64(getType())==5)&&(getImperfect()==0)))) ) )
161 graph->
evalOpParm(myRows, nodeidx,
"rows", time, 0);
163 if (
true && ( (!(((
int64(getType())==0))||((
int64(getType())==1))||((
int64(getType())==6))||((
int64(getType())==4)&&(getImperfect()==0))||((
int64(getType())==5)&&(getImperfect()==0)))) ) )
164 graph->
evalOpParm(myCols, nodeidx,
"cols", time, 0);
180 template <
typename T>
187 if (idx.
size() != instance.
size()+1)
192 coerceValue(value, myType);
195 coerceValue(value, mySurftype);
198 coerceValue(value, myRad);
201 coerceValue(value, myT);
204 coerceValue(value, myR);
207 coerceValue(value, myScale);
210 coerceValue(value, myOrient);
213 coerceValue(value, myFreq);
216 coerceValue(value, myOrderu);
219 coerceValue(value, myOrderv);
222 coerceValue(value, myImperfect);
225 coerceValue(value, myUpole);
228 coerceValue(value, myAccurate);
231 coerceValue(value, myTriangularpoles);
234 coerceValue(value, myRows);
237 coerceValue(value, myCols);
244 { doGetParmValue(idx, instance, value); }
246 { doGetParmValue(idx, instance, value); }
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
273 if (idx.
size() != instance.
size()+1)
278 coerceValue(myType, value);
281 coerceValue(mySurftype, value);
284 coerceValue(myRad, value);
287 coerceValue(myT, value);
290 coerceValue(myR, value);
293 coerceValue(myScale, value);
296 coerceValue(myOrient, value);
299 coerceValue(myFreq, value);
302 coerceValue(myOrderu, value);
305 coerceValue(myOrderv, value);
308 coerceValue(myImperfect, value);
311 coerceValue(myUpole, value);
314 coerceValue(myAccurate, value);
317 coerceValue(myTriangularpoles, value);
320 coerceValue(myRows, value);
323 coerceValue(myCols, value);
330 { doSetParmValue(idx, instance, value); }
332 { doSetParmValue(idx, instance, value); }
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
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); }
366 if (fieldnum.
size() < 1)
397 return "triangularpoles";
409 if (fieldnum.
size() < 1)
410 return PARM_UNSUPPORTED;
447 return PARM_UNSUPPORTED;
483 loadData(is, rampdata);
501 int typelen = colon - data.
buffer();
515 {
int64 iv =
v; UTwrite(os, &iv); }
517 { UTwrite<fpreal64>(os, &
v); }
519 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
521 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
522 UTwrite<fpreal64>(os, &v.
z()); }
524 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
525 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
537 if (s) s->save(ostr);
539 saveData(os, result);
546 ostr << s->getDataTypeToken();
551 saveData(os, result);
555 void save(std::ostream &os)
const
559 saveData(os, myType);
560 saveData(os, mySurftype);
564 saveData(os, myScale);
565 saveData(os, myOrient);
566 saveData(os, myFreq);
567 saveData(os, myOrderu);
568 saveData(os, myOrderv);
569 saveData(os, myImperfect);
570 saveData(os, myUpole);
571 saveData(os, myAccurate);
572 saveData(os, myTriangularpoles);
573 saveData(os, myRows);
574 saveData(os, myCols);
587 loadData(is, myType);
588 loadData(is, mySurftype);
592 loadData(is, myScale);
593 loadData(is, myOrient);
594 loadData(is, myFreq);
595 loadData(is, myOrderu);
596 loadData(is, myOrderv);
597 loadData(is, myImperfect);
598 loadData(is, myUpole);
599 loadData(is, myAccurate);
600 loadData(is, myTriangularpoles);
601 loadData(is, myRows);
602 loadData(is, myCols);
612 if (!thissop)
return getType();
614 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
622 if (!thissop)
return getSurftype();
624 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
632 if (!thissop)
return getRad();
634 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
642 if (!thissop)
return getT();
644 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
652 if (!thissop)
return getR();
654 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
664 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
672 if (!thissop)
return getOrient();
674 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
682 if (!thissop)
return getFreq();
684 OP_Utils::evalOpParm(result, thissop,
"freq", cookparms.
getCookTime(), 0);
692 if (!thissop)
return getOrderu();
694 OP_Utils::evalOpParm(result, thissop,
"orderu", cookparms.
getCookTime(), 0);
702 if (!thissop)
return getOrderv();
704 OP_Utils::evalOpParm(result, thissop,
"orderv", cookparms.
getCookTime(), 0);
712 if (!thissop)
return getImperfect();
714 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
722 if (!thissop)
return getUpole();
724 OP_Utils::evalOpParm(result, thissop,
"upole", cookparms.
getCookTime(), 0);
732 if (!thissop)
return getAccurate();
734 OP_Utils::evalOpParm(result, thissop,
"accurate", cookparms.
getCookTime(), 0);
742 if (!thissop)
return getTriangularpoles();
744 OP_Utils::evalOpParm(result, thissop,
"triangularpoles", cookparms.
getCookTime(), 0);
752 if (!thissop)
return getRows();
754 OP_Utils::evalOpParm(result, thissop,
"rows", cookparms.
getCookTime(), 0);
762 if (!thissop)
return getCols();
764 OP_Utils::evalOpParm(result, thissop,
"cols", cookparms.
getCookTime(), 0);
782 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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
GLuint const GLfloat * val
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
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_Vector3D opRad(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() 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
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)
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)
void copyFrom(const SOP_NodeParms *src) override
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
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
bool getTriangularpoles() const
GLint GLenum GLsizei GLint GLsizei const void * data
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)
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
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)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, bool &v)
~SOP_SphereParms() override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
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)
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
GLdouble GLdouble GLdouble r
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.
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal getCookTime() const
const char * findChar(int c) const
void setAccurate(bool val)
void save(std::ostream &os) const
GLsizei const GLfloat * value
fpreal64 getScale() const
const OP_Context & context() 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
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)