20 using namespace UT::Literal;
32 myCullPerPoint =
true;
46 if (myGroup != src.myGroup)
return false;
47 if (myCullPerPoint != src.myCullPerPoint)
return false;
48 if (myUseBBox != src.myUseBBox)
return false;
49 if (mySize != src.mySize)
return false;
50 if (myCenter != src.myCenter)
return false;
51 if (myScale != src.myScale)
return false;
66 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
67 myCullPerPoint =
true;
69 graph->
evalOpParm(myCullPerPoint, nodeidx,
"fineculling", time, 0);
72 graph->
evalOpParm(myUseBBox, nodeidx,
"usebbox", time, 0);
74 if (
true && ( (getUseBBox()) ) )
75 graph->
evalOpParm(mySize, nodeidx,
"size", time, 0);
77 if (
true && ( (getUseBBox()) ) )
78 graph->
evalOpParm(myCenter, nodeidx,
"t", time, 0);
80 if (
true && ( (getUseBBox()) ) )
81 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
104 if (idx.
size() != instance.
size()+1)
109 coerceValue(value, myGroup);
112 coerceValue(value, myCullPerPoint);
115 coerceValue(value, myUseBBox);
118 coerceValue(value, mySize);
121 coerceValue(value, myCenter);
124 coerceValue(value, myScale);
131 { doGetParmValue(idx, instance, value); }
133 { doGetParmValue(idx, instance, value); }
135 { doGetParmValue(idx, instance, value); }
137 { doGetParmValue(idx, instance, value); }
139 { doGetParmValue(idx, instance, value); }
141 { doGetParmValue(idx, instance, value); }
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 { doGetParmValue(idx, instance, value); }
149 { doGetParmValue(idx, instance, value); }
151 { doGetParmValue(idx, instance, value); }
153 template <
typename T>
160 if (idx.
size() != instance.
size()+1)
165 coerceValue(myGroup, value);
168 coerceValue(myCullPerPoint, value);
171 coerceValue(myUseBBox, value);
174 coerceValue(mySize, value);
177 coerceValue(myCenter, value);
180 coerceValue(myScale, value);
187 { doSetParmValue(idx, instance, value); }
189 { doSetParmValue(idx, instance, value); }
191 { doSetParmValue(idx, instance, value); }
193 { doSetParmValue(idx, instance, value); }
195 { doSetParmValue(idx, instance, value); }
197 { doSetParmValue(idx, instance, value); }
199 { doSetParmValue(idx, instance, value); }
201 { doSetParmValue(idx, instance, value); }
203 { doSetParmValue(idx, instance, value); }
205 { doSetParmValue(idx, instance, value); }
207 { doSetParmValue(idx, instance, value); }
223 if (fieldnum.
size() < 1)
230 return "fineculling";
246 if (fieldnum.
size() < 1)
247 return PARM_UNSUPPORTED;
264 return PARM_UNSUPPORTED;
300 loadData(is, rampdata);
318 int typelen = colon - data.
buffer();
332 {
int64 iv =
v; UTwrite(os, &iv); }
334 { UTwrite<fpreal64>(os, &
v); }
336 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
338 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
339 UTwrite<fpreal64>(os, &v.
z()); }
341 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
342 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
354 if (s) s->save(ostr);
356 saveData(os, result);
363 ostr << s->getDataTypeToken();
368 saveData(os, result);
372 void save(std::ostream &os)
const
376 saveData(os, myGroup);
377 saveData(os, myCullPerPoint);
378 saveData(os, myUseBBox);
379 saveData(os, mySize);
380 saveData(os, myCenter);
381 saveData(os, myScale);
394 loadData(is, myGroup);
395 loadData(is, myCullPerPoint);
396 loadData(is, myUseBBox);
397 loadData(is, mySize);
398 loadData(is, myCenter);
399 loadData(is, myScale);
409 if (!thissop)
return getGroup();
411 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
419 if (!thissop)
return getCullPerPoint();
421 OP_Utils::evalOpParm(result, thissop,
"fineculling", cookparms.
getCookTime(), 0);
429 if (!thissop)
return getUseBBox();
431 OP_Utils::evalOpParm(result, thissop,
"usebbox", cookparms.
getCookTime(), 0);
439 if (!thissop)
return getSize();
441 OP_Utils::evalOpParm(result, thissop,
"size", cookparms.
getCookTime(), 0);
449 if (!thissop)
return getCenter();
451 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
461 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool opUseBBox(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
SOP_Node * getNode() const
ParmType getNestParmType(TempIndex fieldnum) const override
bool operator==(const SOP_UnpackPointsParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLuint const GLfloat * val
bool opCullPerPoint(const SOP_NodeVerb::CookParms &cookparms) const
bool getCullPerPoint() const
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
An output stream object that owns its own string buffer storage.
UT_Vector3D opCenter(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, bool v)
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_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
bool load(UT_IStream &is)
const UT_StringHolder & getGroup() const
void copyFrom(const SOP_NodeParms *src) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GLint GLenum GLsizei GLint GLsizei const void * data
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setSize(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
UT_Vector3D getCenter() const
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 getScale() const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
UT_Vector3D getSize() const
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void setScale(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, int64 v)
void setCullPerPoint(bool val)
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
Utility class for containing a color ramp.
GLdouble GLdouble GLdouble r
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
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 setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setGroup(const UT_StringHolder &val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
void save(std::ostream &os) const
static void loadData(UT_IStream &is, bool &v)
const char * findChar(int c) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setUseBBox(bool val)
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
void setCenter(UT_Vector3D val)
bool operator!=(const SOP_UnpackPointsParms &src) const
GLsizei const GLfloat * value
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const OP_Context & context() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
~SOP_UnpackPointsParms() override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SYS_FORCE_INLINE bool isstring() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)