20 using namespace UT::Literal;
23 namespace SOP_RevolveEnums
71 if (myGroup != src.myGroup)
return false;
72 if (mySurftype != src.mySurftype)
return false;
73 if (myOrigin != src.myOrigin)
return false;
74 if (myDir != src.myDir)
return false;
75 if (myPolys != src.myPolys)
return false;
76 if (myImperfect != src.myImperfect)
return false;
77 if (myType != src.myType)
return false;
78 if (myAngle != src.myAngle)
return false;
79 if (myDivs != src.myDivs)
return false;
80 if (
myOrder != src.myOrder)
return false;
81 if (myCap != src.myCap)
return false;
98 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
101 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, 0);
104 graph->
evalOpParm(myOrigin, nodeidx,
"origin", time, 0);
107 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
110 graph->
evalOpParm(myPolys, nodeidx,
"polys", time, 0);
113 graph->
evalOpParm(myImperfect, nodeidx,
"imperfect", time, 0);
116 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
119 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
122 graph->
evalOpParm(myDivs, nodeidx,
"divs", time, 0);
128 graph->
evalOpParm(myCap, nodeidx,
"cap", time, 0);
144 template <
typename T>
151 if (idx.
size() != instance.
size()+1)
156 coerceValue(value, myGroup);
159 coerceValue(value, mySurftype);
162 coerceValue(value, myOrigin);
165 coerceValue(value, myDir);
168 coerceValue(value, myPolys);
171 coerceValue(value, myImperfect);
174 coerceValue(value, myType);
177 coerceValue(value, myAngle);
180 coerceValue(value, myDivs);
186 coerceValue(value, myCap);
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 template <
typename T>
222 if (idx.
size() != instance.
size()+1)
227 coerceValue(myGroup, value);
230 coerceValue(mySurftype, value);
233 coerceValue(myOrigin, value);
236 coerceValue(myDir, value);
239 coerceValue(myPolys, value);
242 coerceValue(myImperfect, value);
245 coerceValue(myType, value);
248 coerceValue(myAngle, value);
251 coerceValue(myDivs, value);
257 coerceValue(myCap, value);
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
276 { doSetParmValue(idx, instance, value); }
278 { doSetParmValue(idx, instance, value); }
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
300 if (fieldnum.
size() < 1)
333 if (fieldnum.
size() < 1)
334 return PARM_UNSUPPORTED;
361 return PARM_UNSUPPORTED;
397 loadData(is, rampdata);
415 int typelen = colon - data.
buffer();
429 {
int64 iv =
v; UTwrite(os, &iv); }
431 { UTwrite<fpreal64>(os, &
v); }
433 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
435 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
436 UTwrite<fpreal64>(os, &v.
z()); }
438 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
439 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
451 if (s) s->save(ostr);
453 saveData(os, result);
460 ostr << s->getDataTypeToken();
465 saveData(os, result);
469 void save(std::ostream &os)
const
473 saveData(os, myGroup);
474 saveData(os, mySurftype);
475 saveData(os, myOrigin);
477 saveData(os, myPolys);
478 saveData(os, myImperfect);
479 saveData(os, myType);
480 saveData(os, myAngle);
481 saveData(os, myDivs);
496 loadData(is, myGroup);
497 loadData(is, mySurftype);
498 loadData(is, myOrigin);
500 loadData(is, myPolys);
501 loadData(is, myImperfect);
502 loadData(is, myType);
503 loadData(is, myAngle);
504 loadData(is, myDivs);
516 if (!thissop)
return getGroup();
518 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
526 if (!thissop)
return getSurftype();
528 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
536 if (!thissop)
return getOrigin();
538 OP_Utils::evalOpParm(result, thissop,
"origin", cookparms.
getCookTime(), 0);
546 if (!thissop)
return getDir();
548 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
556 if (!thissop)
return getPolys();
558 OP_Utils::evalOpParm(result, thissop,
"polys", cookparms.
getCookTime(), 0);
566 if (!thissop)
return getImperfect();
568 OP_Utils::evalOpParm(result, thissop,
"imperfect", cookparms.
getCookTime(), 0);
576 if (!thissop)
return getType();
578 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
586 if (!thissop)
return getAngle();
588 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
596 if (!thissop)
return getDivs();
598 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getOrder();
608 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getCap();
618 OP_Utils::evalOpParm(result, thissop,
"cap", cookparms.
getCookTime(), 0);
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
bool operator!=(const SOP_RevolveParms &src) const
bool load(UT_IStream &is)
UT_Vector3D getOrigin() const
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setAngle(UT_Vector2D val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
bool opCap(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector2T< fpreal64 > UT_Vector2D
GLuint const GLfloat * val
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator==(const SOP_RevolveParms &src) const
An output stream object that owns its own string buffer storage.
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setDir(UT_Vector3D val)
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool getImperfect() const
static void loadData(UT_IStream &is, bool &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
GLint GLenum GLsizei GLint GLsizei const void * data
~SOP_RevolveParms() override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void copyFrom(const SOP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Matrix4D v)
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Vector3D getDir() const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
UT_StringHolder opGroup(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 fpreal &value) override
void setOrigin(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, bool v)
Utility class for containing a color ramp.
void setSurftype(Surftype val)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
GLdouble GLdouble GLdouble r
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal getCookTime() const
const char * findChar(int c) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setGroup(const UT_StringHolder &val)
Surftype getSurftype() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setImperfect(bool val)
UT_Vector2D getAngle() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void save(std::ostream &os) const
GLsizei const GLfloat * value
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override