11 #ifndef __GT_RefineParms__
12 #define __GT_RefineParms__
31 unsigned hash()
const;
39 {
return isEqual(src); }
41 {
return !isEqual(src); }
47 { myOptions.setOptionB(name, v); }
49 { myOptions.setOptionI(name, v); }
51 { myOptions.setOptionF(name, v); }
53 { myOptions.setOptionS(name, v); }
55 { myOptions.setOptionIArray(name, v); }
57 { myOptions.setOptionFArray(name, v); }
64 {
return importOption(
name,
v); }
66 {
return importOption(
name,
v); }
68 {
return importOption(
name,
v); }
70 {
return importOption(
name,
v); }
72 {
return importOption(
name,
v); }
74 {
return importOption(
name,
v); }
76 {
return importOption(
name,
v); }
78 {
return importOption(
name,
v); }
80 {
return importOption(
name,
v); }
88 return import(
name,
val) ? val : def;
93 return import(
name,
val) ? val : def;
98 return import(
name,
val) ? val : def;
113 return parms ? parms->
get(name, def) : def;
118 return parms ? parms->
get(name, def) : def;
123 return parms ? parms->
get(name, def) : def;
130 ? parms->
get(name, def, storage)
139 #define GT_GETSET(METHOD, NAME, TYPE, DEF) \
141 static inline const UT_StringHolder &get##METHOD##Name() \
143 static constexpr UT_StringLit theName(NAME); \
144 return theName.asHolder(); \
147 void set##METHOD(TYPE v) { set(get##METHOD##Name(), v); } \
148 TYPE get##METHOD() const { return get(get##METHOD##Name(), (TYPE)DEF); } \
149 static TYPE get##METHOD(const GT_RefineParms *parms) \
150 { return parms ? parms->get(get##METHOD##Name(),(TYPE)DEF) : (TYPE)DEF; }
153 #define GT_GETSET_STR(METHOD, NAME, DEF) \
154 void set##METHOD(const char *v) { set(NAME, v); } \
155 const char *get##METHOD(UT_String &storage) const \
156 { return get(NAME, DEF, storage); } \
157 static const char *get##METHOD(const GT_RefineParms *parms, \
158 UT_String &storage) \
159 { return parms ? parms->get(NAME,DEF,storage) : DEF; }
161 #define GT_GETSET_BIT(METHOD, MEMBER, DEF) \
162 void set##METHOD(bool v) { MEMBER = v; } \
163 bool get##METHOD() const { return MEMBER; } \
164 static bool get##METHOD(const GT_RefineParms *parms) \
165 { return parms ? parms->get##METHOD() : DEF; }
167 #define GT_GETSET_INT(METHOD, MEMBER, DEF) \
168 void set##METHOD(exint v) { MEMBER = v; } \
169 exint get##METHOD() const { return MEMBER; } \
170 static exint get##METHOD(const GT_RefineParms *parms) \
171 { return parms ? parms->get##METHOD() : DEF; }
174 GT_GETSET (GeoPointMesh,
"geo:pointmesh",
bool,
false)
177 GT_GETSET (ShowUnusedPoints, "geo:unusedpoints",
bool, true)
180 GT_GETSET (ShowAllPoints, "geo:allpoints",
bool, false)
183 GT_GETSET (GeoPolygonMesh, "geo:polygonmesh",
bool, true)
196 GT_GETSET (QuadricDivs, "quadricdivs", fpreal, 20.0)
200 GT_GETSET (MetaDensity, "metadensity", fpreal, 30.0)
203 GT_GETSET (URange0, "urange_min", fpreal, 0.0)
204 GT_GETSET (URange1, "urange_max", fpreal, 1.0)
205 GT_GETSET (VRange0, "vrange_min", fpreal, 0.0)
206 GT_GETSET (VRange1, "vrange_max", fpreal, 1.0)
214 GT_GETSET_INT(OverridePackedViewportLOD, myOverridePackedLOD, -1);
220 GT_GETSET (ViewportAgentPointLimit, "
agent:pointlimit", exint, 1000)
223 GT_GETSET (RefineAgentsForViewport, "
agent:refineviewport",
bool, false)
227 GT_GETSET (UseAgentCollisionLayer, "
agent:collisionlayer",
bool, false)
230 GT_GETSET (UseGPUCharacterDeformation, "character:gpudeform",
bool, false)
236 GT_GETSET_BIT(ViewportAlembicFaceSets, myAlembicFaceSets, false)
237 GT_GETSET_BIT(ViewportAlembicArbGeometry, myAlembicArbGeo, true)
239 GT_GETSET_BIT(AlembicHoudiniAttribs, myAlembicHoudiniAttribs, true)
242 GT_GETSET_BIT(PointInstanceEnable, myPointInstanceEnable, false)
247 GT_GETSET_BIT(AlembicSkipInvisible, myAlembicSkipInvisible, true)
250 GT_GETSET (ConvertIncludeIds, "gconvert:include_ids",
bool, false)
253 GT_GETSET (ConvertParticlePrim, "gconvert:particleprim",
bool, false)
256 GT_GETSET (ConvertPack, "gconvert:pack",
bool, false)
258 GT_GETSET (AllowPolySoup, "gconvert:allow_polysoup",
bool, true)
271 GT_GETSET (CoalesceFragments, "coalescefragments",
bool, true);
276 GT_GETSET (CoalesceVolumes, "coalescevolumes",
bool, true);
293 GT_GETSET (FastPolyCompacting, "fastpolycompacting",
bool, true);
298 GT_GETSET (AddVertexNormals, "addvertexnormals",
bool, false);
305 GT_GETSET (AddMikkT, "addmikkt",
bool, false);
313 GT_GETSET (MaxPolyMeshSize, "maxpolymeshsize", exint, -1)
317 GT_GETSET (MaxPolyCurveSize, "maxpolycurvesize", exint, -1)
323 GT_GETSET (SequenceSubsteps, "sequencesubsteps", exint, -1)
329 GT_GETSET (SeparateInstances, "separateinstance",
bool, false)
334 GT_GETSET (FullBezierSupport, "fullBezierSupport",
bool, true);
337 GT_GETSET (CubicBezierSupport, "cubicBezierSupport",
bool, true);
341 GT_GETSET (RefineCRegionsToCurves, "refinecregionstocurves",
bool, false)
349 GT_GETSET (HeightFieldConvert, "heightfieldconvert",
bool, false);
352 GT_GETSET (ForVulkan, "forvulkan",
bool, false);
354 #undef GT_IMPLEMENT_GETSET
355 #undef GT_IMPLEMENT_GETSET_STR
358 {
return myViewportMaterialAttrib; }
360 {
return myViewportMaterialRemapAttrib; }
363 { myViewportMaterialAttrib = mh;
364 myViewportMaterialRemapAttrib = rh; }
367 { myAttribFilter = af; }
369 {
return myAttribFilter; }
384 static void *
operator new(
size_t size);
385 static void *
operator new(
size_t size,
void *p);
386 static void operator delete(
void *p,
size_t size);
390 template <
typename T>
bool
393 return myOptions.importOption(name, value);
397 int myAlembicArbGeo : 1,
398 myAlembicFaceSets : 1,
399 myAlembicHoudiniAttribs : 1,
400 myAlembicInstancing : 1,
401 myAlembicGLOptimize : 1,
402 myAlembicSkipInvisible : 1,
405 myAllowSubdivPolys : 1,
406 myPointInstanceEnable : 1,
407 myOverridePackedLOD : 5,
void setViewportMaterialAttrib(const GT_DataArrayHandle &mh, const GT_DataArrayHandle &rh)
void set(const UT_StringHolder &name, UT_Int64Array &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
static fpreal getFloat(const GT_RefineParms *parms, const UT_StringRef &name, fpreal def)
#define GT_GETSET_BIT(METHOD, MEMBER, DEF)
GT_DataArrayHandle getViewportMaterialRemapAttrib() const
void set(const UT_StringHolder &name, const char *v)
#define GT_GETSET_INT(METHOD, MEMBER, DEF)
getFileOption("OpenEXR:storage") storage
SIM_API const UT_StringHolder agent
bool get(const UT_StringRef &name, bool def) const
void set(const UT_StringHolder &name, fpreal v)
Class to filter attributes when building GT_AttributeLists.
#define GT_GETSET(METHOD, NAME, TYPE, DEF)
void set(const UT_StringHolder &name, exint v)
#define GEO_DEFAULT_ADJUSTED_CUSP_ANGLE
bool operator!=(const GT_RefineParms &src) const
GT_DataArrayHandle getViewportMaterialAttrib() const
bool importOption(const UT_StringRef &name, T &value) const
GLuint const GLchar * name
#define GT_GETSET_STR(METHOD, NAME, DEF)
void set(const UT_StringHolder &name, bool v)
void setAttributeFilter(const GT_GEOAttributeFilter *af)
static const char * getString(const GT_RefineParms *parms, const UT_StringRef &name, const char *def, UT_String &storage)
const GT_GEOAttributeFilter * getAttributeFilter() const
A map of string to various well defined value types.
void set(const UT_StringHolder &name, UT_Fpreal64Array &v)
static bool getBool(const GT_RefineParms *parms, const UT_StringRef &name, bool def)
static exint getInt(const GT_RefineParms *parms, const UT_StringRef &name, exint def)
bool operator==(const GT_RefineParms &src) const