9 #ifndef __HOM_Geometry_h__
10 #define __HOM_Geometry_h__
51 class HOMF_GeometryHandle;
80 virtual int sopNodeOutputIndex() = 0;
82 virtual bool isValid() = 0;
86 bool clone_data_ids=
false) = 0;
89 virtual HOM_IterableList<HOM_Point> *iterPoints() = 0;
91 virtual std::vector<HOM_ElemPtr<HOM_Point> >
points() = 0;
97 virtual HOM_IterableList<HOM_Prim> *iterPrims() = 0;
99 virtual std::vector<HOM_ElemPtr<HOM_Prim> > prims() = 0;
104 virtual bool containsPrimType(
const char *
type_name) = 0;
108 virtual int64 countUnusedPoints() = 0;
110 virtual std::vector<HOM_ElemPtr<HOM_Prim> > primsOfType(
HOM_EnumValue &prim_type) = 0;
112 SWIGOUT(%newobject iterPrimsOfType;)
113 virtual HOM_IterableList<HOM_Prim> *iterPrimsOfType(
HOM_EnumValue &prim_type) = 0;
115 virtual int64 preferredPrecision() = 0;
116 virtual void setPreferredPrecision(
int64 prec) = 0;
118 virtual double averageMinDistance(
123 virtual double averageEdgeLength() = 0;
125 virtual std::vector<HOM_ElemPtr<HOM_Point> > globPoints(
const char *
pattern,
bool ordered =
false) = 0;
127 virtual std::vector<HOM_ElemPtr<HOM_Prim> > globPrims(
const char *
pattern) = 0;
129 virtual std::vector<HOM_ElemPtr<HOM_Vertex> > globVertices(
132 virtual std::vector<HOM_ElemPtr<HOM_Edge> > globEdges(
const char *
pattern) = 0;
135 virtual std::vector<HOM_ElemPtr<HOM_Attrib> > _pointAttribs(
139 virtual std::vector<HOM_ElemPtr<HOM_Attrib> > _primAttribs(
143 virtual std::vector<HOM_ElemPtr<HOM_Attrib> > _vertexAttribs(
147 virtual std::vector<HOM_ElemPtr<HOM_Attrib> > _globalAttribs(
151 SWIGOUT(%newobject findPointAttrib;)
155 SWIGOUT(%newobject findPrimAttrib;)
159 SWIGOUT(%newobject findVertexAttrib;)
163 SWIGOUT(%newobject findGlobalAttrib;)
171 virtual double floatAttribValue(
const char *
name) = 0;
173 virtual double floatAttribValue(
HOM_Attrib &attrib) = 0;
175 virtual std::vector<double> floatListAttribValue(
const char *
name) = 0;
177 virtual std::vector<double> floatListAttribValue(
HOM_Attrib &attrib) = 0;
179 virtual int64 intAttribValue(
const char *
name) = 0;
183 virtual std::vector<int64> intListAttribValue(
const char *
name) = 0;
185 virtual std::vector<int64> intListAttribValue(
HOM_Attrib &attrib) = 0;
191 virtual std::vector<std::string> stringListAttribValue(
const char *
name) = 0;
193 virtual std::vector<std::string> stringListAttribValue(
HOM_Attrib &attrib) = 0;
194 virtual std::map<std::string,hboost::any> dictAttribValue(
const char *
name) = 0;
195 virtual std::map<std::string,hboost::any> dictAttribValue(
HOM_Attrib &
name) = 0;
196 virtual std::vector<std::map<std::string,hboost::any> > dictListAttribValue(
const char *
name) = 0;
197 virtual std::vector<std::map<std::string,hboost::any> > dictListAttribValue(
HOM_Attrib &
name) = 0;
201 virtual std::vector<double> pointFloatAttribValues(
const char *
name) = 0;
202 SWIGOUT(%kwargs pointFloatAttribValuesAsString;)
205 virtual std::vector<double> primFloatAttribValues(
const char *
name) = 0;
206 SWIGOUT(%kwargs primFloatAttribValuesAsString;)
209 virtual std::vector<double> vertexFloatAttribValues(
const char *
name) = 0;
210 SWIGOUT(%kwargs vertexFloatAttribValuesAsString;)
214 virtual std::vector<int64> pointIntAttribValues(
const char *
name) = 0;
215 SWIGOUT(%kwargs pointIntAttribValuesAsString;)
218 virtual std::vector<int64> primIntAttribValues(
const char *
name) = 0;
219 SWIGOUT(%kwargs primIntAttribValuesAsString;)
222 virtual std::vector<int64> vertexIntAttribValues(
const char *
name) = 0;
223 SWIGOUT(%kwargs vertexIntAttribValuesAsString;)
227 virtual std::vector<std::string> pointStringAttribValues(
const char *
name) = 0;
228 virtual std::vector<std::string> primStringAttribValues(
const char *
name) = 0;
229 virtual std::vector<std::string> vertexStringAttribValues(
const char *
name) = 0;
231 virtual void setPointFloatAttribValues(
232 const char *
name,
const std::vector<double> &
values) = 0;
233 virtual void setPrimFloatAttribValues(
234 const char *
name,
const std::vector<double> &
values) = 0;
235 virtual void setVertexFloatAttribValues(
236 const char *
name,
const std::vector<double> &
values) = 0;
239 virtual void opaqueSetPointFloatAttribValuesFromString(
243 virtual void opaqueSetPrimFloatAttribValuesFromString(
247 virtual void opaqueSetVertexFloatAttribValuesFromString(
254 %kwargs setPointFloatAttribValuesFromString;
255 void setPointFloatAttribValuesFromString(
259 HOM_PyBuffer
buffer(values);
260 self->opaqueSetPointFloatAttribValuesFromString(
264 %kwargs setPrimFloatAttribValuesFromString;
265 void setPrimFloatAttribValuesFromString(
266 const char *name, InterpreterObject values,
269 HOM_PyBuffer
buffer(values);
270 self->opaqueSetPrimFloatAttribValuesFromString(
274 %kwargs setVertexFloatAttribValuesFromString;
275 void setVertexFloatAttribValuesFromString(
276 const char *name, InterpreterObject values,
279 HOM_PyBuffer
buffer(values);
280 self->opaqueSetVertexFloatAttribValuesFromString(
286 virtual void setPointIntAttribValues(
287 const char *name,
const std::vector<int64> &values) = 0;
288 virtual void setPrimIntAttribValues(
289 const char *name,
const std::vector<int64> &values) = 0;
290 virtual void setVertexIntAttribValues(
291 const char *name,
const std::vector<int64> &values) = 0;
294 virtual void opaqueSetPointIntAttribValuesFromString(
295 const char *name,
const char *values,
int64 length,
298 virtual void opaqueSetPrimIntAttribValuesFromString(
299 const char *name,
const char *values,
int64 length,
302 virtual void opaqueSetVertexIntAttribValuesFromString(
303 const char *name,
const char *values,
int64 length,
309 %kwargs setPointIntAttribValuesFromString;
310 void setPointIntAttribValuesFromString(
311 const char *name, InterpreterObject values,
314 HOM_PyBuffer
buffer(values);
315 self->opaqueSetPointIntAttribValuesFromString(
319 %kwargs setPrimIntAttribValuesFromString;
320 void setPrimIntAttribValuesFromString(
321 const char *name, InterpreterObject values,
324 HOM_PyBuffer
buffer(values);
325 self->opaqueSetPrimIntAttribValuesFromString(
329 %kwargs setVertexIntAttribValuesFromString;
330 void setVertexIntAttribValuesFromString(
331 const char *name, InterpreterObject values,
334 HOM_PyBuffer
buffer(values);
335 self->opaqueSetVertexIntAttribValuesFromString(
341 virtual void setPointStringAttribValues(
342 const char *name,
const std::vector<std::string> &values) = 0;
343 virtual void setPrimStringAttribValues(
344 const char *name,
const std::vector<std::string> &values) = 0;
345 virtual void setVertexStringAttribValues(
346 const char *name,
const std::vector<std::string> &values) = 0;
348 virtual void renamePointAttrib(
const char *old_name,
const char *new_name) = 0;
349 virtual void renamePrimAttrib(
const char *old_name,
const char *new_name) = 0;
350 virtual void renameVertexAttrib(
const char *old_name,
const char *new_name) = 0;
351 virtual void renameGlobalAttrib(
const char *old_name,
const char *new_name) = 0;
353 SWIGOUT(%newobject createPoint;)
355 virtual std::vector<HOM_ElemPtr<HOM_Point> >createPoints(
356 const std::vector<std::vector<double> > &point_positions) = 0;
357 virtual std::vector<HOM_ElemPtr<HOM_Point> >createPoints(
358 const std::vector<HOM_Vector3 *> &point_positions) = 0;
360 SWIGOUT(%newobject createPolygon;)
361 virtual HOM_Polygon *createPolygon(
bool is_closed=
true) = 0;
362 virtual std::vector<HOM_ElemPtr<HOM_Polygon> >createPolygons(
363 const std::vector<std::vector<HOM_Point *> > &
points,
364 bool is_closed=
true) = 0;
365 virtual std::vector<HOM_ElemPtr<HOM_Polygon> >createPolygons(
366 const std::vector<std::vector<int> > &point_numbers,
367 bool is_closed=
true) = 0;
369 SWIGOUT(%newobject createPacked;)
371 const char *packed_type,
374 SWIGOUT(%newobject createTetrahedron;)
375 virtual HOM_Prim *createTetrahedron() = 0;
377 SWIGOUT(%newobject createTetrahedronInPlace;)
381 SWIGOUT(%newobject createHexahedron;)
382 virtual HOM_Prim *createHexahedron() = 0;
384 SWIGOUT(%newobject createHexahedronInPlace;)
391 SWIGOUT(%newobject createNURBSCurve;)
392 SWIGOUT(%kwargs createNURBSCurve;)
393 virtual HOM_Face *createNURBSCurve(
int num_points=4,
bool is_closed=
false,
396 SWIGOUT(%newobject createBezierCurve;)
397 SWIGOUT(%kwargs createBezierCurve;)
398 virtual HOM_Face *createBezierCurve(
int num_points=4,
bool is_closed=
false,
401 SWIGOUT(%newobject createNURBSSurface;)
402 SWIGOUT(%kwargs createNURBSSurface;)
405 bool is_closed_in_u=
false,
bool is_closed_in_v=
false,
406 int order_u=4,
int order_v=4) = 0;
408 SWIGOUT(%newobject createBezierSurface;)
409 SWIGOUT(%kwargs createBezierSurface;)
412 bool is_closed_in_u=
false,
bool is_closed_in_v=
false,
413 int order_u=4,
int order_v=4) = 0;
415 SWIGOUT(%newobject createMeshSurface;)
416 SWIGOUT(%kwargs createMeshSurface;)
419 bool is_closed_in_u=
false,
bool is_closed_in_v=
false) = 0;
421 SWIGOUT(%newobject createVolume;)
426 SWIGOUT(%newobject createChannelPrim;)
427 SWIGOUT(%kwargs createChannelPrim;)
433 virtual void transformPrims(
434 const std::vector<HOM_Prim *> &prims,
const HOM_Matrix4 &matrix) = 0;
435 virtual void transformPrims(
442 virtual void deletePrims(
443 const std::vector<HOM_Prim *> &prims,
bool keep_points =
false) = 0;
444 virtual void deletePrims(
447 SWIGOUT(%kwargs deletePrimsOutsideBoundingBox;)
448 virtual void deletePrimsOutsideBoundingBox(
451 virtual void deletePoints(
const std::vector<HOM_Point *> &
points) = 0;
463 bool transform_as_normal,
464 bool create_local_variable) = 0;
468 double default_value,
469 bool transform_as_normal,
470 bool create_local_variable) = 0;
474 const char *default_value,
475 bool transform_as_normal,
476 bool create_local_variable) = 0;
481 const std::vector<int64> &default_value,
482 bool transform_as_normal,
483 bool create_local_variable) = 0;
488 const std::vector<double> &default_value,
489 bool transform_as_normal,
490 bool create_local_variable) = 0;
495 const std::vector<std::string> &default_value,
496 bool transform_as_normal,
497 bool create_local_variable) = 0;
502 const std::map<std::string, hboost::any> &default_value,
503 bool transform_as_normal,
504 bool create_local_variable) = 0;
506 SWIGOUT(%kwargs addArrayAttrib;)
507 SWIGOUT(%newobject addArrayAttrib;)
511 int64 tuple_size = 1) = 0;
514 virtual void setGlobalAttribValue(
516 virtual void setGlobalAttribValue(
518 virtual void setGlobalAttribValue(
519 HOM_Attrib &attrib,
const char *attrib_value) = 0;
520 virtual void setGlobalAttribValue(
521 HOM_Attrib &attrib,
const std::vector<int64> &attrib_value) = 0;
522 virtual void setGlobalAttribValue(
523 HOM_Attrib &attrib,
const std::vector<double> &attrib_value) = 0;
524 virtual void setGlobalAttribValue(
525 HOM_Attrib &attrib,
const std::vector<std::string> &attrib_value) = 0;
526 virtual void setGlobalAttribValue(
527 HOM_Attrib &attrib,
const std::map<std::string, hboost::any> &attrib_value) = 0;
528 virtual void setGlobalAttribValue(
529 HOM_Attrib &attrib,
const std::vector<std::map<std::string,hboost::any> > &attrib_value) = 0;
531 virtual void setGlobalAttribValue(
532 const char *attrib_name,
int64 attrib_value) = 0;
533 virtual void setGlobalAttribValue(
534 const char *attrib_name,
double attrib_value) = 0;
535 virtual void setGlobalAttribValue(
536 const char *attrib_name,
const char *attrib_value) = 0;
544 virtual void setGlobalAttribValue(
545 const char *attrib_name,
const std::vector<int64> &attrib_value) = 0;
546 virtual void setGlobalAttribValue(
547 const char *attrib_name,
const std::vector<double> &attrib_value) = 0;
548 virtual void setGlobalAttribValue(
549 const char *attrib_name,
550 const std::vector<std::string> &attrib_value) = 0;
551 virtual void setGlobalAttribValue(
552 const char *attrib_name,
553 const std::map<std::string, hboost::any> &attrib_value) = 0;
554 virtual void setGlobalAttribValue(
555 const char *attrib_name,
556 const std::vector<std::map<std::string,hboost::any> > &attrib_value) = 0;
558 virtual void copyAttrib(
HOM_Attrib *attrib) = 0;
559 virtual void copyAttribs(
const std::vector<HOM_Attrib *> &attribs) = 0;
570 virtual int _copyPrimsForDrawable(
HOM_Geometry &src_geo,
const std::vector<HOM_Prim*> &prims) = 0;
571 virtual int _copyClearForDrawable(
bool keep) = 0;
573 virtual int _copyCacheTopology(
HOM_Geometry &src_geo) = 0;
575 virtual std::vector<HOM_ElemPtr<HOM_Point> > _getPointChildren(
HOM_Point *pt) = 0;
579 InterpreterObject attribValue(
const char *name)
580 {
return HOMattribValue(*
self, name); }
582 InterpreterObject attribValue(
HOM_Attrib &attrib)
583 {
return HOMattribValue(*
self, attrib); }
587 virtual std::vector<std::string> attributeCaptureRegions() = 0;
588 virtual std::vector<std::string> attributeCaptureObjectPaths() = 0;
591 virtual std::vector<std::string> intrinsicNames() = 0;
594 const char *intrinsic_name) = 0;
595 virtual size_t intrinsicSize(
const char *intrinsic_name) = 0;
596 virtual bool intrinsicReadOnly(
const char *intrinsic_name) = 0;
598 virtual void setIntrinsicValue(
const char *intrinsic_name,
double value) = 0;
599 virtual void setIntrinsicValue(
const char *intrinsic_name,
int value) = 0;
600 virtual void setIntrinsicValue(
const char *intrinsic_name,
int64 value) = 0;
601 virtual void setIntrinsicValue(
602 const char *intrinsic_name,
const char *
value) = 0;
603 virtual void setIntrinsicValue(
604 const char *intrinsic_name,
const std::vector<double> &
value) = 0;
605 virtual void setIntrinsicValue(
606 const char *intrinsic_name,
const std::vector<int> &
value) = 0;
607 virtual void setIntrinsicValue(
608 const char *intrinsic_name,
const std::vector<int64> &
value) = 0;
609 virtual void setIntrinsicValue(
610 const char *intrinsic_name,
const std::vector<std::string> &
value) = 0;
615 virtual void saveToFile(
const char *file_name) = 0;
617 virtual void loadFromFile(
const char *file_name) = 0;
620 virtual void merge(
HOM_Geometry &geometry,
bool clone_data_ids =
false,
627 virtual void clear() = 0;
633 const char *
pattern =
nullptr,
float min_hit=1e-2
f,
float max_hit=1e18f,
634 float tolerance=1e-2F) = 0;
636 virtual std::vector<int> _orderedPoints(
637 const char *groupname,
638 const char *corner_groupname,
641 virtual std::vector<HOM_ElemPtr<HOM_PointGroup> > pointGroups(
644 SWIGOUT(%newobject findPointGroup;)
646 const char *name,
HOM_EnumValue &scope = HOM_groupScope::Public) = 0;
648 SWIGOUT(%newobject createPointGroup;)
649 SWIGOUT(%kwargs createPointGroup;)
652 bool is_ordered =
false,
653 bool unique_name =
false) = 0;
655 virtual std::vector<HOM_ElemPtr<HOM_PrimGroup> > primGroups(
658 SWIGOUT(%newobject findPrimGroup;)
660 const char *name,
HOM_EnumValue &scope = HOM_groupScope::Public) = 0;
662 SWIGOUT(%newobject createPrimGroup;)
663 SWIGOUT(%kwargs createPrimGroup;)
666 bool is_ordered =
false,
667 bool unique_name =
false) = 0;
669 virtual std::vector<HOM_ElemPtr<HOM_EdgeGroup> > edgeGroups(
672 SWIGOUT(%newobject findEdgeGroup;)
674 const char *name,
HOM_EnumValue &scope = HOM_groupScope::Public) = 0;
676 SWIGOUT(%newobject createEdgeGroup;)
678 const char *name) = 0;
680 virtual std::vector<HOM_ElemPtr<HOM_VertexGroup> > vertexGroups(
683 SWIGOUT(%newobject findVertexGroup;)
685 const char *name,
HOM_EnumValue &scope = HOM_groupScope::Public) = 0;
687 SWIGOUT(%newobject createVertexGroup;)
689 const char *name,
bool is_ordered=
false) = 0;
703 nearestPrim(
const std::vector<double> &
position) = 0;
705 SWIGOUT(%newobject nearestPoint;)
708 nearestPoint(
const std::vector<double> &
position,
709 const char *ptgroup =
nullptr,
710 double max_radius = 1e+18
f) = 0;
712 SWIGOUT(%kwargs nearestPoints;)
714 nearestPoints(
const std::vector<double> &
position,
716 const char *ptgroup =
nullptr,
717 double max_radius = 1e+18
f) = 0;
721 primLoop(
const std::vector<HOM_Prim *> &prims,
722 HOM_EnumValue &loop_type = HOM_componentLoopType::Partial) = 0;
725 pointLoop(
const std::vector<HOM_Point *> &
points,
726 HOM_EnumValue &loop_type = HOM_componentLoopType::Partial) = 0;
729 edgeLoop(
const std::vector<HOM_Edge *> &edges,
731 bool full_loop_per_edge =
true,
732 bool force_ring =
false,
733 bool allow_ring =
true) = 0;
735 virtual std::vector<HOM_Vector3>
736 pointNormals(
const std::vector<HOM_Point *> &
points) = 0;
737 virtual std::vector<HOM_Vector3>
746 const char *purpose = NULL,
747 const char *traversal = NULL,
748 const char *path_attrib_name = NULL,
749 const char *name_attrib_name = NULL,
750 bool strip_layers =
false,
754 virtual void importUsdStageOpaque(
757 const char *purpose = NULL,
758 const char *traversal = NULL,
759 const char *path_attrib_name = NULL,
760 const char *name_attrib_name = NULL,
766 %kwargs importUsdStage;
768 InterpreterObject stage,
770 const char *purpose = NULL,
771 const char *traversal = NULL,
772 const char *path_attrib_name = NULL,
773 const char *name_attrib_name = NULL,
776 return self->importUsdStageOpaque(
777 stage, selection_rule, purpose, traversal,
778 path_attrib_name, name_attrib_name, frame);
788 SWIGOUT(%newobject _guDetailHandle;)
793 virtual HOMF_GeometryHandle& _geometryHandle() = 0;
795 virtual std::vector<int> vexAttribDataId() = 0;
797 virtual int64 modificationCounter() = 0;
798 virtual void incrementModificationCounter() = 0;
800 virtual void incrementAllDataIds() = 0;
802 SWIGOUT(%kwargs incrementDataIdsForAddOrRemove;)
803 virtual void incrementDataIdsForAddOrRemove(
804 bool for_points=
true,
bool for_prims=
true) = 0;
806 SWIGOUT(%newobject primitiveIntrinsicsDataId;)
808 virtual void incrementPrimitiveIntrinsicsDataId() = 0;
810 SWIGOUT(%newobject topologyDataId;)
812 virtual void incrementTopologyDataId() = 0;
814 SWIGOUT(%kwargs generateAttribMenu;)
815 virtual std::vector<std::string> generateAttribMenu(
820 bool array_type =
true,
821 bool scalar_type =
true,
822 bool case_sensitive =
true,
824 bool decode_tokens =
false) = 0;
827 virtual std::vector<std::string> _generateGroupMenu(
828 const std::vector<HOM_EnumValue *> &group_types,
829 bool include_selection,
830 bool include_name_attrib,
836 virtual bool isReadOnly() = 0;
838 virtual void _attribInfo(
const char *name,
int &attr_data_type,
int &attr_size,
bool &is_array_type) = 0;
840 virtual std::vector<std::string> extractPackedPaths(
const char *
pattern) = 0;
841 SWIGOUT(%newobject unpackFromFolder;)
843 SWIGOUT(%newobject unpackPropertiesFromFolder;)
844 virtual std::map<std::string, hboost::any> packedFolderProperties(
const char *
path) = 0;
846 virtual bool packToFolder(
849 bool is_folder =
false) = 0;
GT_API const UT_StringHolder selection
#define HOM_DESTRUCT_OBJECT(pointer)
GLdouble GLdouble GLint GLint const GLdouble * points
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
GLsizei const GLchar *const * string
GLsizei const GLchar *const * path
GLuint GLsizei GLsizei * length
string __repr__(VtArray< T > const &self)
std::tuple< Types...> UT_Tuple
virtual HOM_Geometry * newGeometry(HOM_Geometry *geo=nullptr, bool clone_data_ids=false)=0
bool any(const vbool4 &v)
HOM_Geometry(const HOM_Geometry &)
void ignore(T const &) VULKAN_HPP_NOEXCEPT
constexpr std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size(){return subtype_count< typename std::tuple_element< I, T >::type >::value+tuple_type_size< T, I+1 >);}template< typename T > struct type_count< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size< T, 0 >)};};template< typename T > struct subtype_count{static constexpr int value{is_mutable_container< T >::value?expected_max_vector_size:type_count< T >::value};};template< typename T, typename Enable=void > struct type_count_min{static const int value{0};};template< typename T >struct type_count_min< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_tuple_like< T >::value &&!is_wrapper< T >::value &&!is_complex< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{type_count< T >::value};};template< typename T > struct type_count_min< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr int value{1};};template< typename T >struct type_count_min< T, typename std::enable_if< is_wrapper< T >::value &&!is_complex< T >::value &&!is_tuple_like< T >::value >::type >{static constexpr int value{subtype_count_min< typename T::value_type >::value};};template< typename T, std::size_t I >constexpr typename std::enable_if< I==type_count_base< T >::value, int >::type tuple_type_size_min(){return 0;}template< typename T, std::size_t I > constexpr typename std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size_min(){return subtype_count_min< typename std::tuple_element< I, T >::type >::value+tuple_type_size_min< T, I+1 >);}template< typename T > struct type_count_min< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size_min< T, 0 >)};};template< typename T > struct subtype_count_min{static constexpr int value{is_mutable_container< T >::value?((type_count< T >::value< expected_max_vector_size)?type_count< T >::value:0):type_count_min< T >::value};};template< typename T, typename Enable=void > struct expected_count{static const int value{0};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_wrapper< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{1};};template< typename T > struct expected_count< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr int value{expected_max_vector_size};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&is_wrapper< T >::value >::type >{static constexpr int value{expected_count< typename T::value_type >::value};};enum class object_category:int{char_value=1, integral_value=2, unsigned_integral=4, enumeration=6, boolean_value=8, floating_point=10, number_constructible=12, double_constructible=14, integer_constructible=16, string_assignable=23, string_constructible=24, other=45, wrapper_value=50, complex_number=60, tuple_value=70, container_value=80,};template< typename T, typename Enable=void > struct classify_object{static constexpr object_category value{object_category::other};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, char >::value &&std::is_signed< T >::value &&!is_bool< T >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::integral_value};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value &&!std::is_same< T, char >::value &&!is_bool< T >::value >::type >{static constexpr object_category value{object_category::unsigned_integral};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_same< T, char >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::char_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_bool< T >::value >::type >{static constexpr object_category value{object_category::boolean_value};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_floating_point< T >::value >::type >{static constexpr object_category value{object_category::floating_point};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&std::is_assignable< T &, std::string >::value >::type >{static constexpr object_category value{object_category::string_assignable};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&(type_count< T >::value==1)&&std::is_constructible< T, std::string >::value >::type >{static constexpr object_category value{object_category::string_constructible};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::enumeration};};template< typename T > struct classify_object< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr object_category value{object_category::complex_number};};template< typename T > struct uncommon_type{using type=typename std::conditional<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&!std::is_constructible< T, std::string >::value &&!is_complex< T >::value &&!is_mutable_container< T >::value &&!std::is_enum< T >::value, std::true_type, std::false_type >::type;static constexpr bool value=type::value;};template< typename T >struct classify_object< T, typename std::enable_if<(!is_mutable_container< T >::value &&is_wrapper< T >::value &&!is_tuple_like< T >::value &&uncommon_type< T >::value)>::type >{static constexpr object_category value{object_category::wrapper_value};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::number_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&!is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::integer_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::double_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< is_tuple_like< T >::value &&((type_count< T >::value >=2 &&!is_wrapper< T >::value)||(uncommon_type< T >::value &&!is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value)||(uncommon_type< T >::value &&type_count< T >::value >=2))>::type >{static constexpr object_category value{object_category::tuple_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr object_category value{object_category::container_value};};template< typename T, enable_if_t< classify_object< T >::value==object_category::char_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"CHAR";}template< typename T, enable_if_t< classify_object< T >::value==object_category::integral_value||classify_object< T >::value==object_category::integer_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"INT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::unsigned_integral, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"UINT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::floating_point||classify_object< T >::value==object_category::number_constructible||classify_object< T >::value==object_category::double_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"FLOAT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::enumeration, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"ENUM";}template< typename T, enable_if_t< classify_object< T >::value==object_category::boolean_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"BOOLEAN";}template< typename T, enable_if_t< classify_object< T >::value==object_category::complex_number, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"COMPLEX";}template< typename T, enable_if_t< classify_object< T >::value >=object_category::string_assignable &&classify_object< T >::value<=object_category::other, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"TEXT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::container_value||classify_object< T >::value==object_category::wrapper_value, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value==1, detail::enabler >=detail::dummy >inline std::string type_name(){return type_name< typename std::decay< typename std::tuple_element< 0, T >::type >::type >);}template< typename T, std::size_t I >inline typename std::enable_if< I==type_count_base< T >::value, std::string >::type tuple_name(){return std::string{};}template< typename T, std::size_t I >inline typename std::enable_if<(I< type_count_base< T >::value), std::string >::type tuple_name(){auto str=std::string{type_name< typename std::decay< typename std::tuple_element< I, T >::type >::type >)}+ ','+tuple_name< T, I+1 >);if(str.back()== ',') str.pop_back();return str;}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler > > std::string type_name()
Recursively generate the tuple type name.
#define HOM_CONSTRUCT_OBJECT(pointer)
GLdouble GLdouble GLint GLint order
GLuint const GLchar * name
GA_API const UT_StringHolder transform
GLenum GLsizei GLsizei GLint * values
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
SIM_API const UT_StringHolder position
IMATH_CONSTEXPR14 bool intersect(const Line3< T > &line, const Vec3< T > &v0, const Vec3< T > &v1, const Vec3< T > &v2, Vec3< T > &pt, Vec3< T > &barycentric, bool &front) IMATH_NOEXCEPT
UT_Optional< double > HOM_OptionalDouble
HOM_API HOM_Module & HOM()