41 if (binddata != src.
binddata)
return false;
42 if (bindparm != src.
bindparm)
return false;
58 for (
int i = 0; i < list.
entries(); i++)
90 if (binddata != src.
binddata)
return false;
91 if (bindparm != src.
bindparm)
return false;
107 for (
int i = 0; i < list.
entries(); i++)
139 if (binddata != src.
binddata)
return false;
140 if (bindparm != src.
bindparm)
return false;
156 for (
int i = 0; i < list.
entries(); i++)
188 if (inputnum != src.
inputnum)
return false;
189 if (inputtype != src.
inputtype)
return false;
205 for (
int i = 0; i < list.
entries(); i++)
225 myVexScript =
""_UTsh;
227 myVexOutputMask =
""_UTsh;
229 myGroupAutobind =
false;
230 myGeometryName =
""_UTsh;
234 myUseTimeStep =
false;
237 myMultiThread =
false;
238 myUpdateNormals =
false;
241 myVexPrecision =
""_UTsh;
254 if (myVexScript != src.myVexScript)
return false;
255 if (myVexCWD != src.myVexCWD)
return false;
256 if (myVexOutputMask != src.myVexOutputMask)
return false;
257 if (myBindings != src.myBindings)
return false;
258 if (myFieldBindings != src.myFieldBindings)
return false;
259 if (myGroupBindings != src.myGroupBindings)
return false;
260 if (myInputBindings != src.myInputBindings)
return false;
261 if (myAutobind != src.myAutobind)
return false;
262 if (myGroupAutobind != src.myGroupAutobind)
return false;
263 if (myGeometryName != src.myGeometryName)
return false;
264 if (myAttribClass != src.myAttribClass)
return false;
265 if (myGroup != src.myGroup)
return false;
266 if (myGroupType != src.myGroupType)
return false;
267 if (myUseTimeStep != src.myUseTimeStep)
return false;
268 if (myTimeScale != src.myTimeScale)
return false;
269 if (myActivate != src.myActivate)
return false;
270 if (myMultiThread != src.myMultiThread)
return false;
271 if (myUpdateNormals != src.myUpdateNormals)
return false;
272 if (myNumCount != src.myNumCount)
return false;
273 if (myThreadJobSize != src.myThreadJobSize)
return false;
274 if (myVexPrecision != src.myVexPrecision)
return false;
295 {
return !strcmp(recordtype,
"Params"); }
300 if (recordtypenum == 0)
return "Params";
305 if (isMyRecord(recordtype))
return 1;
310 if (isMyRecord(recordtype))
316 int fieldnum)
const override
318 if (!isMyRecord(recordtype))
326 return "vex_cwdpath";
328 return "vex_outputmask";
332 return "fieldbindings";
334 return "groupbindings";
336 return "inputbindings";
340 return "groupautobind";
344 return "attribclass";
350 return "usetimestep";
356 return "vex_multithread";
358 return "vex_updatenmls";
360 return "vex_numcount";
362 return "vex_threadjobsize";
364 return "vex_precision";
370 int fieldnum)
const override
372 if (!isMyRecord(recordtype))
426 const char *fieldname,
429 if (!isMyRecord(recordtype))
435 if (!strcmp(fieldname,
"vexscript"))
437 result = UTmakeUnique<UT_OptionString>(myParms.myVexScript);
440 if (!strcmp(fieldname,
"vex_cwdpath"))
442 result = UTmakeUnique<UT_OptionString>(myParms.myVexCWD);
445 if (!strcmp(fieldname,
"vex_outputmask"))
447 result = UTmakeUnique<UT_OptionString>(myParms.myVexOutputMask);
450 if (!strcmp(fieldname,
"bindings"))
452 result = UTmakeUnique<UT_OptionString>(myParms.createString(myParms.myBindings));
455 if (!strcmp(fieldname,
"fieldbindings"))
457 result = UTmakeUnique<UT_OptionString>(myParms.createString(myParms.myFieldBindings));
460 if (!strcmp(fieldname,
"groupbindings"))
462 result = UTmakeUnique<UT_OptionString>(myParms.createString(myParms.myGroupBindings));
465 if (!strcmp(fieldname,
"inputbindings"))
467 result = UTmakeUnique<UT_OptionString>(myParms.createString(myParms.myInputBindings));
470 if (!strcmp(fieldname,
"autobind"))
472 result = UTmakeUnique<UT_OptionBool>(myParms.myAutobind);
475 if (!strcmp(fieldname,
"groupautobind"))
477 result = UTmakeUnique<UT_OptionBool>(myParms.myGroupAutobind);
480 if (!strcmp(fieldname,
"geometry"))
482 result = UTmakeUnique<UT_OptionString>(myParms.myGeometryName);
485 if (!strcmp(fieldname,
"attribclass"))
487 result = UTmakeUnique<UT_OptionInt>(myParms.myAttribClass);
490 if (!strcmp(fieldname,
"group"))
492 result = UTmakeUnique<UT_OptionString>(myParms.myGroup);
495 if (!strcmp(fieldname,
"grouptype"))
497 result = UTmakeUnique<UT_OptionInt>(myParms.myGroupType);
500 if (!strcmp(fieldname,
"usetimestep"))
502 result = UTmakeUnique<UT_OptionBool>(myParms.myUseTimeStep);
505 if (!strcmp(fieldname,
"timescale"))
507 result = UTmakeUnique<UT_OptionFpreal>(myParms.myTimeScale);
510 if (!strcmp(fieldname,
"activate"))
512 result = UTmakeUnique<UT_OptionBool>(myParms.myActivate);
515 if (!strcmp(fieldname,
"vex_multithread"))
517 result = UTmakeUnique<UT_OptionBool>(myParms.myMultiThread);
520 if (!strcmp(fieldname,
"vex_updatenmls"))
522 result = UTmakeUnique<UT_OptionBool>(myParms.myUpdateNormals);
525 if (!strcmp(fieldname,
"vex_numcount"))
527 result = UTmakeUnique<UT_OptionInt>(myParms.myNumCount);
530 if (!strcmp(fieldname,
"vex_threadjobsize"))
532 result = UTmakeUnique<UT_OptionInt>(myParms.myThreadJobSize);
535 if (!strcmp(fieldname,
"vex_precision"))
537 result = UTmakeUnique<UT_OptionString>(myParms.myVexPrecision);
549 {
return new Query(owner, *
this); }
587 loadData(is, rampdata);
605 int typelen = colon - data.
buffer();
619 {
int64 iv =
v; UTwrite(os, &iv); }
621 { UTwrite<fpreal64>(os, &
v); }
623 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
625 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
626 UTwrite<fpreal64>(os, &v.
z()); }
628 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
629 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
641 if (s) s->save(ostr);
643 saveData(os, result);
650 ostr << s->getDataTypeToken();
655 saveData(os, result);
659 void save(std::ostream &os)
const
663 saveData(os, myVexScript);
664 saveData(os, myVexCWD);
665 saveData(os, myVexOutputMask);
668 UTwrite(os, &length);
671 auto && _curentry = myBindings(i);
673 saveData(os, _curentry.binddata);
674 saveData(os, _curentry.bindparm);
680 UTwrite(os, &length);
683 auto && _curentry = myFieldBindings(i);
685 saveData(os, _curentry.binddata);
686 saveData(os, _curentry.bindparm);
692 UTwrite(os, &length);
695 auto && _curentry = myGroupBindings(i);
697 saveData(os, _curentry.binddata);
698 saveData(os, _curentry.bindparm);
704 UTwrite(os, &length);
707 auto && _curentry = myInputBindings(i);
709 saveData(os, _curentry.inputnum);
710 saveData(os, _curentry.inputtype);
714 saveData(os, myAutobind);
715 saveData(os, myGroupAutobind);
716 saveData(os, myGeometryName);
717 saveData(os, myAttribClass);
718 saveData(os, myGroup);
719 saveData(os, myGroupType);
720 saveData(os, myUseTimeStep);
721 saveData(os, myTimeScale);
722 saveData(os, myActivate);
723 saveData(os, myMultiThread);
724 saveData(os, myUpdateNormals);
725 saveData(os, myNumCount);
726 saveData(os, myThreadJobSize);
727 saveData(os, myVexPrecision);
740 loadData(is, myVexScript);
741 loadData(is, myVexCWD);
742 loadData(is, myVexOutputMask);
746 myBindings.setSize(length);
749 auto && _curentry = myBindings(i);
751 loadData(is, _curentry.binddata);
752 loadData(is, _curentry.bindparm);
759 myFieldBindings.setSize(length);
762 auto && _curentry = myFieldBindings(i);
764 loadData(is, _curentry.binddata);
765 loadData(is, _curentry.bindparm);
772 myGroupBindings.setSize(length);
775 auto && _curentry = myGroupBindings(i);
777 loadData(is, _curentry.binddata);
778 loadData(is, _curentry.bindparm);
785 myInputBindings.setSize(length);
788 auto && _curentry = myInputBindings(i);
790 loadData(is, _curentry.inputnum);
791 loadData(is, _curentry.inputtype);
795 loadData(is, myAutobind);
796 loadData(is, myGroupAutobind);
797 loadData(is, myGeometryName);
798 loadData(is, myAttribClass);
799 loadData(is, myGroup);
800 loadData(is, myGroupType);
801 loadData(is, myUseTimeStep);
802 loadData(is, myTimeScale);
803 loadData(is, myActivate);
804 loadData(is, myMultiThread);
805 loadData(is, myUpdateNormals);
806 loadData(is, myNumCount);
807 loadData(is, myThreadJobSize);
808 loadData(is, myVexPrecision);
865 bool myGroupAutobind;
874 bool myUpdateNormals;
876 int64 myThreadJobSize;
const UT_StringHolder & getVexScript() const
void setMultiThread(bool val)
void setVexScript(const UT_StringHolder &val)
const UT_Array< Bindings > & getBindings() const
int64 getThreadJobSize() const
const UT_Array< FieldBindings > & getFieldBindings() const
Query(const SIM_Data *owner, const GAS_GeometryVexParms &parms)
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
const UT_StringHolder & getGeometryName() const
const UT_StringHolder & getGroup() const
int64 getAttribClass() const
bool load(UT_IStream &is)
const char * getFieldNameSubclass(const char *recordtype, int fieldnum) const override
bool operator!=(const GroupBindings &src) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint bread(int32 *buffer, exint asize=1)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setActivate(bool val)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setAttribClass(int64 val)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool operator!=(const GAS_GeometryVexParms &src) const
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNumCount(int64 val)
GLuint GLsizei GLsizei * length
UT_StringHolder createString(const UT_Array< FieldBindings > &list) const
UT_StringHolder createString(const UT_Array< Bindings > &list) const
bool operator==(const GroupBindings &src) const
An output stream object that owns its own string buffer storage.
void setVexCWD(const UT_StringHolder &val)
const UT_StringHolder & getVexCWD() const
static void saveData(std::ostream &os, UT_Matrix2D v)
**But if you need a result
void setGroupBindings(const UT_Array< GroupBindings > &val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool operator==(const GAS_GeometryVexParms &src) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setBindings(const UT_Array< Bindings > &val)
const GAS_GeometryVexParms & myParms
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_OptionType getFieldTypeSubclass(const char *recordtype, int fieldnum) const override
const char * getRecordTypeNameSubclass(int recordtypenum) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
int64 getGroupType() const
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setThreadJobSize(int64 val)
void setVexOutputMask(const UT_StringHolder &val)
SIM_Query * createQueryObject(const SIM_Data *owner) const
void setAutobind(bool val)
void setGeometryName(const UT_StringHolder &val)
const UT_Array< InputBindings > & getInputBindings() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
const UT_StringHolder & getVexOutputMask() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, fpreal64 v)
bool operator==(const FieldBindings &src) const
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_Array< GroupBindings > & getGroupBindings() const
exint read(bool *array, exint sz=1)
void setFieldBindings(const UT_Array< FieldBindings > &val)
void setGroupType(int64 val)
void setVexPrecision(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
bool operator!=(const Bindings &src) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool operator==(const Bindings &src) const
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setUseTimeStep(bool val)
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_StringHolder createString(const UT_Array< GroupBindings > &list) const
exint entries() const
Alias of size(). size() is preferred.
int getNumFieldsSubclass(const char *recordtype) const override
int64 getNumCount() const
UT_StringHolder createString(const UT_Array< InputBindings > &list) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void setGroupAutobind(bool val)
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, int64 v)
bool getMultiThread() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
bool getFieldRawSubclass(const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntryPtr &result) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
SYS_FORCE_INLINE void append(char character)
bool getUpdateNormals() const
bool getGroupAutobind() const
void setUpdateNormals(bool val)
int getNumRecordTypesSubclass() const override
void setInputBindings(const UT_Array< InputBindings > &val)
int getNumRecordsSubclass(const char *recordtype) const override
void setTimeScale(fpreal64 val)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Vector2D v)
bool isMyRecord(const char *recordtype) const
const UT_StringHolder & getVexPrecision() const
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool getUseTimeStep() const
void save(std::ostream &os) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
fpreal64 getTimeScale() const
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr
SYS_FORCE_INLINE bool isstring() const
bool operator!=(const FieldBindings &src) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, bool &v)
constexpr SYS_FORCE_INLINE T & x() noexcept