18 using namespace UT::Literal;
43 if (myGroup != src.myGroup)
return false;
44 if (myIso != src.myIso)
return false;
45 if (myInvert != src.myInvert)
return false;
46 if (myUsemaxdist != src.myUsemaxdist)
return false;
47 if (myMaxdist != src.myMaxdist)
return false;
57 OP_Utils::evalOpParm(myGroup, node,
"group", time, 0);
60 OP_Utils::evalOpParm(myIso, node,
"iso", time, 0);
63 OP_Utils::evalOpParm(myInvert, node,
"invert", time, 0);
64 else myInvert =
false;
66 OP_Utils::evalOpParm(myUsemaxdist, node,
"usemaxdist", time, 0);
67 else myUsemaxdist =
false;
68 if (
true && ( (!(((getUsemaxdist()==0)))) ) )
69 OP_Utils::evalOpParm(myMaxdist, node,
"maxdist", time, 0);
93 coerceValue(value, myGroup);
96 coerceValue(value, myIso);
99 coerceValue(value, myInvert);
102 coerceValue(value, myUsemaxdist);
105 coerceValue(value, myMaxdist);
112 { doGetParmValue(idx, value); }
114 { doGetParmValue(idx, value); }
116 { doGetParmValue(idx, value); }
118 { doGetParmValue(idx, value); }
120 { doGetParmValue(idx, value); }
122 { doGetParmValue(idx, value); }
124 { doGetParmValue(idx, value); }
126 { doGetParmValue(idx, value); }
128 { doGetParmValue(idx, value); }
130 { doGetParmValue(idx, value); }
132 { doGetParmValue(idx, value); }
134 template <
typename T>
141 coerceValue(myGroup, value);
144 coerceValue(myIso, value);
147 coerceValue(myInvert, value);
150 coerceValue(myUsemaxdist, value);
153 coerceValue(myMaxdist, value);
160 { doSetParmValue(idx, value); }
162 { doSetParmValue(idx, value); }
164 { doSetParmValue(idx, value); }
166 { doSetParmValue(idx, value); }
168 { doSetParmValue(idx, value); }
170 { doSetParmValue(idx, value); }
172 { doSetParmValue(idx, value); }
174 { doSetParmValue(idx, value); }
176 { doSetParmValue(idx, value); }
178 { doSetParmValue(idx, value); }
180 { doSetParmValue(idx, value); }
222 return PARM_UNSUPPORTED;
241 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
243 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
245 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
258 loadData(is, rampdata);
276 int typelen = colon - data.
buffer();
290 {
int64 iv =
v; UTwrite(os, &iv); }
292 { UTwrite<fpreal64>(os, &
v); }
294 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
296 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
297 UTwrite<fpreal64>(os, &v.
z()); }
299 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
300 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
312 if (s) s->save(ostr);
314 saveData(os, result);
321 ostr << s->getDataTypeToken();
326 saveData(os, result);
330 void save(std::ostream &os)
const
334 saveData(os, myGroup);
336 saveData(os, myInvert);
337 saveData(os, myUsemaxdist);
338 saveData(os, myMaxdist);
351 loadData(is, myGroup);
353 loadData(is, myInvert);
354 loadData(is, myUsemaxdist);
355 loadData(is, myMaxdist);
365 if (!thissop)
return getGroup();
367 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
375 if (!thissop)
return getIso();
377 OP_Utils::evalOpParm(result, thissop,
"iso", cookparms.
getCookTime(), 0);
385 if (!thissop)
return getInvert();
387 OP_Utils::evalOpParm(result, thissop,
"invert", cookparms.
getCookTime(), 0);
395 if (!thissop)
return getUsemaxdist();
397 OP_Utils::evalOpParm(result, thissop,
"usemaxdist", cookparms.
getCookTime(), 0);
405 if (!thissop)
return getMaxdist();
407 OP_Utils::evalOpParm(result, thissop,
"maxdist", cookparms.
getCookTime(), 0);
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setMaxdist(fpreal64 val)
exint bread(int32 *buffer, exint asize=1)
void save(std::ostream &os) const
bool operator==(const SOP_VolumeSDFParms &src) const
void getParmValue(exint idx, UT_Vector4D &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 getMaxdist() const
static void saveData(std::ostream &os, UT_Vector3D v)
An output stream object that owns its own string buffer storage.
virtual const char * getParmName(exint fieldnum) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void getParmValue(exint idx, UT_Matrix2D &value) const
SYS_FORCE_INLINE T & x(void)
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal64 opMaxdist(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setParmValue(exint idx, const UT_StringHolder &value)
void setParmValue(exint idx, const exint &value)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void setIso(fpreal64 val)
void setParmValue(exint idx, const UT_Vector4D &value)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE T & z(void)
virtual exint getNumParms() const
void setParmValue(exint idx, const UT_Matrix3D &value)
void setParmValue(exint idx, const UT_Vector3D &value)
void getParmValue(exint idx, UT_StringHolder &value) const
void getParmValue(exint idx, fpreal &value) const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
void setParmValue(exint idx, const PRM_DataItemHandle &value)
const UT_StringHolder & getGroup() const
SYS_FORCE_INLINE const char * buffer() const
const OP_Node * node() const
void setUsemaxdist(bool val)
static void loadData(UT_IStream &is, int64 &v)
virtual ParmType getParmType(exint fieldnum) const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 opIso(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, bool v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setParmValue(exint idx, const UT_Vector2D &value)
void setParmValue(exint idx, const UT_Matrix2D &value)
DEP_MicroNode * depnode() const
void setGroup(const UT_StringHolder &val)
void setParmValue(exint idx, const UT_Matrix4D &value)
SYS_FORCE_INLINE T & y(void)
GLsizei const GLfloat * value
static void loadData(UT_IStream &is, UT_StringHolder &v)
void strncpy(const char *src, exint maxlen)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, int64 v)
bool opInvert(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector2D &value) const
static void saveData(std::ostream &os, UT_StringHolder s)
Utility class for containing a color ramp.
void getParmValue(exint idx, UT_Matrix4D &value) const
const char * buffer() const
void getParmValue(exint idx, UT_Vector3D &value) const
GLint GLint GLsizei GLint GLenum GLenum type
fpreal getCookTime() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void doSetParmValue(exint idx, const T &value)
virtual ~SOP_VolumeSDFParms()
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void setParmValue(exint idx, const fpreal &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opUsemaxdist(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
virtual void copyFrom(const SOP_NodeParms *src)
void getParmValue(exint idx, UT_Matrix3D &value) const
const OP_Context & context() const
void doGetParmValue(exint idx, T &value) const
void getParmValue(exint idx, exint &value) const
SYS_FORCE_INLINE bool isstring() const
bool getUsemaxdist() const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void getParmValue(exint idx, PRM_DataItemHandle &value) const