12 #ifndef __GEO_Detail_h__
13 #define __GEO_Detail_h__
70 template<
typename T,
bool B>
class GA_EdgeT;
80 #define GEO_STD_ATTRIB_POSITION "P"
81 #define GEO_STD_ATTRIB_NORMAL "N"
82 #define GEO_STD_ATTRIB_TEXTURE "uv"
83 #define GEO_STD_ATTRIB_VELOCITY "v"
84 #define GEO_STD_ATTRIB_ANGULAR_VELOCITY "w"
85 #define GEO_STD_ATTRIB_MATERIAL "shop_materialpath"
86 #define GEO_STD_ATTRIB_OGLSHOP "ogl_shop"
87 #define GEO_STD_ATTRIB_DIFFUSE "Cd"
88 #define GEO_STD_ATTRIB_ALPHA "Alpha"
89 #define GEO_STD_ATTRIB_COM "com"
90 #define GEO_STD_ATTRIB_DISTANCE "dist"
91 #define GEO_STD_ATTRIB_LOD "lod"
92 #define GEO_STD_ATTRIB_REST "rest"
93 #define GEO_STD_ATTRIB_MASS "mass"
94 #define GEO_STD_ATTRIB_DRAG "drag"
95 #define GEO_STD_ATTRIB_TENSION "tension"
96 #define GEO_STD_ATTRIB_SPRINGK "springk"
97 #define GEO_STD_ATTRIB_LIFE "life"
98 #define GEO_STD_ATTRIB_AGE "age"
99 #define GEO_STD_ATTRIB_DIST "dist"
100 #define GEO_STD_ATTRIB_UP "up"
101 #define GEO_STD_ATTRIB_ORIENT "orient"
102 #define GEO_STD_ATTRIB_ID "id"
103 #define GEO_STD_ATTRIB_PSCALE "pscale"
104 #define GEO_STD_ATTRIB_CREASE "creaseweight"
105 #define GEO_STD_ATTRIB_AREA "area"
106 #define GEO_STD_ATTRIB_PERIMETER "perimeter"
107 #define GEO_STD_ATTRIB_WIDTH "width"
108 #define GEO_STD_ATTRIB_LAYERMERGE "layermerge"
109 #define GEO_STD_ATTRIB_SEGS "segs"
110 #define GEO_STD_ATTRIB_DIV "div"
111 #define GEO_STD_ATTRIB_LAGE "lage"
112 #define GEO_STD_ATTRIB_ARC "arc"
113 #define GEO_STD_ATTRIB_GEN "gen"
114 #define GEO_STD_ATTRIB_TUBECAPTURE "tubeCapt"
115 #define GEO_STD_ATTRIB_PNT_CAPTURE_ALPHA "pCaptAlpha"
116 #define GEO_STD_ATTRIB_PNT_CAPTURE_PATH "pCaptPath"
117 #define GEO_STD_ATTRIB_PNT_CAPTURE_DATA "pCaptData"
118 #define GEO_STD_ATTRIB_CAPTUREFRAME "pCaptFrame"
119 #define GEO_STD_ATTRIB_CAPT_SKELROOT "pCaptSkelRoot"
120 #define GEO_STD_ATTRIB_CLOTH_CAPT "clothCapt"
121 #define GEO_STD_ATTRIB_WIRE_CAPT_U "wireCaptU"
122 #define GEO_STD_ATTRIB_WIRE_CAPT_V "wireCaptV"
123 #define GEO_STD_ATTRIB_WIRE_CAPT_PRIMU "wireCaptPrimU"
124 #define GEO_STD_ATTRIB_META_CAPT_FRAME "metaCaptFrame"
125 #define GEO_STD_ATTRIB_META_CAPT_GROUPS "metaCaptGroups"
126 #define GEO_STD_ATTRIB_META_CAPT_ROOT "metaCaptRoot"
127 #define GEO_STD_ATTRIB_META_CAPT_PATHS "metaCaptPaths"
128 #define GEO_STD_ATTRIB_META_CAPT_DATA "metaCaptData"
129 #define GEO_STD_ATTRIB_META_CAPT_GROUP_MAP "metaCaptGroupMap"
130 #define GEO_STD_ATTRIB_META_SLIDE "slideModifier"
131 #define GEO_STD_ATTRIB_INFLATE_MODIFIER "inflatemodifier"
132 #define GEO_STD_ATTRIB_MUSCLE_REST_ANCHOR "restAnchor"
133 #define GEO_STD_ATTRIB_MUSCLE_REST_XFORMS "restTransforms"
134 #define GEO_STD_ATTRIB_MUSCLE_INFLATE_NORM "muscleInflateNormal"
135 #define GEO_STD_ATTRIB_MUSCLE_POSITION_BIAS "positionbiasvalues"
136 #define GEO_STD_ATTRIB_MUSCLE_CAPT_NAMES "muscleCaptNames"
137 #define GEO_STD_ATTRIB_RIXLATE "rixlate"
138 #define GEO_STD_ATTRIB_DEFORM_SKIN_METHOD "deformSkinMethod"
139 #define GEO_STD_ATTRIB_DEFORM_DUAL_QUATERNION_BLEND_ATTRIB "deformDualQuaternionBlendAttrib"
140 #define GEO_STD_ATTRIB_DEFORM_TRANSFORMS_PATH "deformTransformsPath"
141 #define GEO_STD_ATTRIB_DEFORM_TRANSFORM_REGIONS_PATH "deformTransformRegionsPath"
142 #define GEO_STD_ATTRIB_DEFORM_TRANSFORM_TARGETS_PATH "deformTransformTargetsPath"
143 #define GEO_STD_ATTRIB_POSE_SHAPE_EXAMPLE_PATH "poseShapeExamplePath"
144 #define GEO_STD_ATTRIB_SHAPE_DIFF_METHOD "shapeDiffMethod"
145 #define GEO_STD_ATTRIB_SHAPE_DIFF_ORIENT_ATTRIB "shapeDiffOrientAttrib"
146 #define GEO_STD_ATTRIB_SHAPE_DIFF_TRANSFORM_ATTRIB "shapeDiffTransformAttrib"
147 #define GEO_STD_ATTRIB_STASH_POSE_PATH "stashPosePath"
238 bool full_topology=
true);
285 bool mergePrimGroup =
true,
286 bool insertPrimsAtHead=
false,
288 bool keep_internal_groups =
true,
301 bool merge_groups =
true,
302 bool keep_internal_groups =
true);
311 void merge(
const GEO_Primitive &sprim,
bool insertPrimAtHead=
false);
320 bool this_parameter_is_ignored =
true,
321 bool keep_internal_groups =
true,
324 void collapseIndexAttributes();
332 template<
typename FLOAT_T>
336 bool keep_vector_lengths =
true,
337 bool check_pasting =
true,
338 bool neg_determinant_flip_vector =
true,
339 bool update_ptnormals =
false,
341 bool updateaffectednormals =
false,
342 const char *attribpattern = NULL);
345 template<
typename FLOAT_T>
350 bool keep_vector_lengths =
true,
351 bool check_pasting =
true,
352 bool neg_determinant_flip_vector =
true,
353 bool update_ptnormals =
false,
355 bool updateaffectednormals =
false,
356 const char *attribpattern = NULL);
364 template<
typename FLOAT_T>
369 bool keep_vector_lengths =
true,
370 bool check_pasting =
true,
371 bool neg_determinant_flipvector =
true,
372 bool update_ptnormals =
false,
374 bool updateaffectednormals =
false,
375 const char *attribpattern = NULL);
379 template<
typename FLOAT_T>
384 bool keep_vector_lengths =
true,
385 bool check_pasting =
true,
386 bool neg_determinant_flipvector =
true,
387 bool update_ptnormals =
false,
389 bool updateaffectednormals =
false,
390 const char *attribpattern = NULL);
393 template<
typename FLOAT_T>
397 bool check_pasting =
true,
398 bool update_ptnormals =
false,
400 bool updateaffectednormals =
false,
401 const char *attribpattern = NULL);
405 template<
typename FLOAT_T>
409 bool keep_vector_lengths =
true,
410 bool check_pasting =
true,
411 bool neg_determinant_flipvector =
true,
412 bool update_ptnormals =
false,
414 bool updateaffectednormals =
false,
415 const char *attribpattern = NULL);
418 template<
typename FLOAT_T>
423 bool keep_vector_lengths =
true,
424 bool check_pasting =
true,
425 bool neg_determinant_flipvector =
true,
426 bool update_ptnormals =
false,
428 bool updateaffectednormals =
false,
429 const char *attribpattern = NULL);
433 template <
typename FLOAT_T,
bool INVERT=false>
434 void transformPointsByAttribute(
437 bool keep_vector_lengths =
true,
438 bool updateaffectednormals =
true,
439 const char *attribpattern = NULL);
443 template <
typename FLOAT_T,
bool INVERT=false>
444 void transformPointsByAttribute(
447 bool keep_vector_lengths =
true,
448 bool updateaffectednormals =
true,
449 const char *attribpattern = NULL);
453 template <
typename FLOAT_T,
bool INVERT=false>
454 void transformPointsByAttribute(
457 bool keep_vector_lengths =
true,
458 bool updateaffectednormals =
true,
459 const char *attribpattern = NULL);
463 template <
typename FLOAT_T,
bool INVERT=false>
464 void translatePointsByAttribute(
467 bool keep_vector_lengths =
true,
468 bool updateaffectednormals =
true,
469 const char *attribpattern = NULL);
472 template<
typename FLOAT_T>
475 bool check_pasting =
true,
476 bool update_ptnormals =
false,
478 bool updateaffectednormals =
false,
479 const char *attribpattern = NULL);
484 template<
typename FLOAT_T>
489 bool keep_vector_lengths =
true,
490 bool check_pasting =
true,
491 bool neg_determinant_flipvector =
true,
492 bool update_ptnormals =
false,
494 bool updateaffectednormals =
false,
495 const char *attribpattern = NULL);
498 template<
typename FLOAT_T>
501 bool check_pasting =
true,
502 bool update_ptnormals =
false,
504 bool updateaffectednormals =
false,
505 const char *attribpattern = NULL);
509 template<
typename FLOAT_T>
513 bool update_ptnormals =
false,
515 bool updateaffectednormals =
false,
516 const char *attribpattern = NULL);
519 template<
typename FLOAT_T>
522 bool update_ptnormals =
false,
524 bool updateaffectednormals =
false,
525 const char *attribpattern = NULL);
530 template<
typename FLOAT_T>
534 bool keep_vector_lengths =
true,
535 bool check_pasting =
true,
536 bool neg_determinant_flipvector =
true,
539 bool update_ptnormals =
false,
541 bool updateaffectednormals =
false,
542 const char *attribpattern = NULL);
545 template<
typename FLOAT_T>
548 bool check_pasting =
true,
550 bool update_ptnormals =
false,
552 bool updateaffectednormals =
false,
553 const char *attribpattern = NULL);
555 void visualizeSoftPoints(
const GEO_Rolloff &rolloff,
568 && myTol == other.
myTol;
573 return !(*
this == other);
587 void computeSoftPointFalloff(
const bool connected,
641 void normalTranslatePoints(
float length = 1.0F,
642 int check_pasting = 1,
644 int update_ptnormals = 0,
646 bool updateaffectednormals =
false);
647 void normalTranslatePrimitives(
float length = 1.0F,
648 int check_pasting = 1,
650 int update_ptnormals = 0,
652 bool updateaffectednormals =
false);
654 float length = 1.0F,
int check_pasting = 1,
655 int update_ptnormals = 0,
657 bool updateaffectednormals =
false);
659 float length = 1.0F,
int check_pasting = 1,
660 int update_ptnormals = 0,
662 bool updateaffectednormals =
false);
664 float length = 1.0F,
int check_pasting = 1,
665 int update_ptnormals = 0,
667 bool updateaffectednormals =
false);
669 float length = 1.0F,
int check_pasting = 1,
670 int update_ptnormals = 0,
672 bool updateaffectednormals =
false);
673 void normalTranslateGroup(
const GA_Group &grp,
674 float length = 1.0F,
int check_pasting = 1,
675 int update_ptnormals = 0,
677 bool updateaffectednormals =
false);
684 void updateAffectedNormals(
const GA_Range &ptrange,
686 bool allsametransform =
false);
691 template<
typename FLOAT_T>
696 bool keep_vector_lengths =
true,
697 bool check_pasting =
true,
698 bool neg_determinant_flipvector =
true,
699 bool update_ptnormals =
false,
701 bool updateaffectednormals =
false);
705 template<
typename FLOAT_T>
710 bool keep_vector_lengths =
true,
711 bool check_pasting =
true,
712 bool neg_determinant_flipvector =
true,
713 bool update_ptnormals =
false,
715 bool updateaffectednormals =
false,
721 template<
typename FLOAT_T>
726 bool keep_vector_lengths =
true,
727 bool check_pasting =
true,
728 bool neg_determinant_flipvector =
true,
729 bool update_ptnormals =
false,
731 bool updateaffectednormals =
false,
738 template<
typename FLOAT_T>
742 bool keep_vector_lengths =
true,
743 bool check_pasting =
true,
744 bool neg_determinant_flipvector =
true,
747 bool update_ptnormals =
false,
749 bool updateaffectednormals =
false,
755 template <
typename FLOAT_T>
772 : myFwdVector(forward), myUpVector(up), myType(
Type::LOOKAT),
773 myPivotSpace(pivot_space) {}
781 : myOrient(orient), myOrigin(origin), myType(
Type::ORIENT),
782 myPivotSpace(pivot_space) {}
801 template<
typename FLT>
806 FLT tx, FLT ty, FLT tz,
807 FLT rx, FLT ry, FLT rz,
808 FLT sx, FLT sy, FLT sz,
809 FLT s_xy, FLT s_xz, FLT s_yz,
810 FLT px, FLT
py, FLT pz,
811 FLT prx, FLT pry, FLT prz);
824 float tx,
float ty,
float tz,
825 float rx,
float ry,
float rz,
826 float sx,
float sy,
float sz,
827 float s_xy,
float s_xz,
float s_yz,
828 float px,
float py,
float pz,
829 float prx,
float pry,
float prz,
834 int keep_vector_lengths = 1,
835 int check_pasting = 1,
836 int neg_determinant_flipvector = 1,
837 int update_ptnormals = 0,
839 bool updateaffectednormals =
false,
840 const char *attribpattern = NULL,
842 bool *falloff_written = NULL);
844 float tx,
float ty,
float tz,
845 float rx,
float ry,
float rz,
846 float sx,
float sy,
float sz,
847 float s_xy,
float s_xz,
float s_yz,
848 float px,
float py,
float pz,
849 float prx,
float pry,
float prz,
854 int keep_vector_lengths = 1,
855 int check_pasting = 1,
856 int neg_determinant_flipvector = 1,
857 int update_ptnormals = 0,
859 bool updateaffectednormals =
false,
860 const char *attribpattern = NULL,
862 bool *falloff_written = NULL);
866 float tx,
float ty,
float tz,
867 float rx,
float ry,
float rz,
868 float sx,
float sy,
float sz,
869 float s_xy,
float s_xz,
float s_yz,
870 float px,
float py,
float pz,
871 float prx,
float pry,
float prz,
876 int keep_vector_lengths = 1,
877 int check_pasting = 1,
878 int neg_determinant_flipvector = 1,
879 int update_ptnormals = 0,
881 bool updateaffectednormals =
false,
882 const char *attribpattern = NULL,
884 bool *falloff_written = NULL);
887 float tx,
float ty,
float tz,
888 float rx,
float ry,
float rz,
889 float sx,
float sy,
float sz,
890 float s_xy,
float s_xz,
float s_yz,
891 float px,
float py,
float pz,
892 float prx,
float pry,
float prz,
897 int keep_vector_lengths = 1,
898 int check_pasting = 1,
899 int neg_determinant_flipvector = 1,
900 int update_ptnormals = 0,
902 bool updateaffectednormals =
false,
903 const char *attribpattern = NULL,
905 bool *falloff_written = NULL);
917 void softTranslatePoints(
const UT_Vector3 &delta,
921 int check_pasting = 1,
922 int update_ptnormals = 0,
924 bool updateaffectednormals =
false,
925 const char *attribpattern = NULL,
927 bool *falloff_written = NULL);
928 void softTranslateEdges(
const UT_Vector3 &delta,
932 int check_pasting = 1,
933 int update_ptnormals = 0,
935 bool updateaffectednormals =
false,
936 const char *attribpattern = NULL,
938 bool *falloff_written = NULL);
950 void softNormalTranslatePoints(
float distance,
955 int along_lead_normal = 1,
956 int check_pasting = 1,
957 int update_ptnormals = 0,
959 bool updateaffectednormals =
false,
962 bool *falloff_written = NULL);
995 &getPointCaptureAttribName(CaptureType
type);
1000 static const char *getPointCaptureIndexPropertyName(CaptureType
type);
1005 &getPointCaptureFrameAttribName(CaptureType
type);
1010 &getPointCaptureRootAttribName(CaptureType
type);
1015 static const char *getPointCaptureDataPropertyName(CaptureType
type);
1019 bool getCaptureRegionRootPath(
UT_String &root_path,
1020 CaptureType
t = CAPTURE_BONE)
const;
1021 bool setCaptureRegionRootPath(
const UT_String &root_path,
1022 CaptureType
t = CAPTURE_BONE);
1026 int getCaptureRegionIndex(
const UT_String &cregion_name,
1027 CaptureType
t = CAPTURE_BONE);
1032 int addCaptureRegion(
const UT_String &cregion_name,
1035 int addCaptureRegion(
const UT_String &cregion_name,
1036 const UT_Matrix4 &xform,
float tcap,
float bcap,
1037 float taperx,
float taperz);
1041 int addCaptureRegion(
const UT_String &cregion_name,
1046 int removeCaptureRegion(
const UT_String &cregion_name,
1047 CaptureType
t = CAPTURE_BONE);
1050 void setCaptureWeight(
int cregion_index,
float weight,
1053 bool add_weight =
false,
1054 bool clamp_negative =
false,
1055 bool normalizeweight =
false,
1056 CaptureType
t = CAPTURE_BONE);
1059 void setCaptureWeight(
int cregion_index,
float weight,
1062 bool add_weight =
false,
1063 bool clamp_negative =
false,
1064 bool normalizeweight =
false,
1065 CaptureType
t = CAPTURE_BONE);
1068 float getCaptureWeight(
int cregion_index,
GA_Offset ptoff,
1069 CaptureType
t = CAPTURE_BONE)
const;
1078 CaptureType
t = CAPTURE_BONE)
const;
1079 void clearCaptureWeights(
GA_Offset ptoff,
1080 CaptureType
t = CAPTURE_BONE);
1089 void colorPointsByCaptureWeight(
1092 CaptureType
t = CAPTURE_BONE,
1093 VisualizationType vistype = VISTYPE_MULTIPLE,
1098 void colorPointsByCaptureWeight(
1102 VisualizationType vistype,
1106 void normalizeCaptureWeights(
const GA_PointGroup *ptgroup =
nullptr,
1107 CaptureType
t = CAPTURE_BONE,
1114 void clampCaptureWeights(
const GA_PointGroup *ptgroup = NULL,
1115 bool clamp_low_flag =
true,
1116 float low_threshold = 0.0
f,
float low_val = 0.0
f,
1117 bool clamp_hi_flag =
false,
1118 float hi_threshold = 1.0
f,
float hi_val = 1.0
f,
1122 void normalizeRelativeCaptureWeights(
int idx,
GA_Offset ptoff,
1146 {
return insertPointCopy(src, wrangler); }
1150 {
return insertPointCopy(src); }
1170 getPrimitive(primoff));
1189 getPrimitiveByIndex(idx));
1196 getPrimitiveByIndex(idx));
1206 {
return destroyPoints(range,
mode); }
1208 {
return destroyPrimitives(range, and_points); }
1210 {
return destroyPrimitive(prim, and_points); }
1231 bool and_points =
false);
1234 bool and_points =
false);
1254 bool accurate_bounds =
false)
const;
1265 bool getPointBSphere(
1268 bool accurate_bounds =
false)
const;
1283 bool getEdgeBSphere(
1286 bool accurate_bounds =
false)
const;
1287 bool getBreakpointBBox(
1290 bool getBreakpointBBox(
1294 bool getBreakpointBSphere(
1297 bool accurate_bounds =
false)
const;
1305 bool getGroupBSphere(
1308 bool accurate_bounds)
const;
1312 bool getPointAttribBBox(
1316 bool getPointAttribBBox(
1320 bool getPointAttribBBox(
1324 bool getPointAttribBBox(
1333 template <
typename T>
1334 bool getPointAttribCentroid(
1339 bool getPointAttribGroupBBox(
1344 bool getVertexAttribBBox(
1348 bool getVertexAttribBBox(
1352 bool getVertexAttribBBox(
1356 bool getVertexAttribBBox(
1360 bool getVertexAttribGroupBBox(
1373 void copyPointVertexAttributes(
GEO_Vertex dest,
1375 bool copy_point_P = true) const;
1376 void copyPointVertexAttributes(
1380 void copyPointVertexAttributes(
1386 copyVertex(dest_vtx, src_vtx, vertex_wrangler,
1387 point_wrangler, copy_point_P);
1398 copyVertex(dest_vtx, src_vtx, vertex_wrangler,
1415 int shallow = 0)
const;
1449 void fixSplineWeights();
1485 GA_Attribute *addCaptureFrameAttribute(CaptureType
t = CAPTURE_BONE,
1513 GA_Attribute *addPointCaptureAttribute(geo_NPairs n_pairs,
1514 CaptureType
t = CAPTURE_BONE,
1519 GA_Attribute *addPointCaptureAlphaAttribute(
float dflt,
1549 const GA_Attribute *findInternalNormalAttribute()
const;
1555 CaptureType
t = CAPTURE_BONE)
const;
1557 CaptureType
t = CAPTURE_BONE);
1560 const GA_Attribute *findCaptureSkelRootAttribute(CaptureType
t
1561 = CAPTURE_BONE)
const;
1568 CaptureType
t = CAPTURE_BONE)
const;
1570 CaptureType
t = CAPTURE_BONE);
1572 const GA_Attribute *findPointCaptureAlphaAttribute()
const;
1580 void destroyInternalNormalAttribute();
1589 void destroyTubeCaptureAttribute();
1592 void destroyCaptureFrameAttribute(CaptureType
t
1596 void destroyCaptureSkelRootAttribute(CaptureType
t
1601 void destroyPointCaptureAttribute(CaptureType
t =
1605 void destroyPointCaptureAlphaAttribute();
1612 bool getMetaRestAnchorPath(
UT_String &anchorPath)
const;
1629 int layer = -1)
const;
1630 int getAttributeLayer(
const char* attr_name)
const;
1632 static GA_TypeInfo getStdAttributeTypeInfo(
const char *
name,
int floattuplesize);
1635 int getCurrentLayer()
const;
1636 void setCurrentLayer(
int layer);
1637 void setNumLayers(
int numlayer);
1638 int getNumLayers()
const;
1640 void setLayerMerge(
int preclear,
int mask,
int srcblend,
1642 void getLayerMerge(
int &preclear,
int &
mask,
int &srcblend,
1643 int &dstblend)
const;
1645 void addVariableName(
const char *attr,
const char *varname);
1647 { addVariableName(0, varname); }
1653 void traverseVariableNames(
int (*
function)(
const char *attr,
1654 const char *varname,
void *
data),
1658 GA_Attribute *growPointCaptureAttribute(geo_NPairs num_added_pairs,
1659 CaptureType
t = CAPTURE_BONE);
1664 return getAttributes().cloneAttribute(
1676 creation_args, attribute_options,attribtype);
1685 creation_args, attribute_options,attribtype);
1693 {
return findPointAttribute(src.
getScope(),
1697 {
return findPointAttribute(src.
getScope(),
1735 return getAttributes().cloneAttribute(
1746 creation_args, attribute_options,attribtype);
1755 creation_args, attribute_options,attribtype);
1763 {
return findVertexAttribute(src.
getScope(),
1767 {
return findVertexAttribute(src.
getScope(),
1805 return getAttributes().cloneAttribute(
1816 n, creation_args, attribute_options,attribtype);
1825 creation_args, attribute_options,attribtype);
1833 {
return findPrimitiveAttribute(src.
getScope(),
1837 {
return findPrimitiveAttribute(src.
getScope(),
1860 return getAttributes().cloneAttribute(
1872 creation_args, attribute_options,attribtype);
1881 creation_args, attribute_options,attribtype);
1886 {
return findGlobalAttribute(src.
getScope(),
1890 {
return findGlobalAttribute(src.
getScope(),
1918 {
return getAttributes().getDict(
1922 {
return getAttributes().getDict(
1926 {
return getAttributes().getDict(
1930 {
return getAttributes().getDict(
1936 bool hasMetaPrimitives()
const;
1937 bool hasPastedPrimitives()
const;
1938 bool hasQuadricPrimitives()
const;
1939 bool hasParticlePrimitives()
const;
1940 bool hasVolumePrimitives()
const;
1941 bool hasTransformingPrimitives()
const;
1945 bool hasCustomPrimitives()
const;
1948 GA_Size getPastedCount()
const;
1949 GA_Size getQuadricCount()
const;
1950 GA_Size getParticleCount()
const;
1951 GA_Size getVolumeCount()
const;
1958 bool mergeCaptureProperties(
1984 const
char *attrib_name) const;
1987 const
char *attrib_name);
2029 GA_Size getPointGroupAdjacentToPrimitiveGroup(
2032 GA_Size getPointGroupAdjacentToPrimitiveRange(
2035 GA_Size getVertexGroupAdjacentToPrimitiveGroup(
2038 GA_Size getVertexGroupAdjacentToPrimitiveRange(
2044 struct AdjacentPolygonData
2049 {
return myAdjacentPolygon == pad.myAdjacentPolygon; }
2051 {
return myAdjacentPolygon < pad.myAdjacentPolygon; }
2100 const GEO_Primitive *findPrimitiveByName(
const char *nametomatch,
2103 const char *nameattrib=
"name",
2104 int matchnumber = 0)
const;
2108 const char *nameattrib=
"name",
2109 int matchnumber = 0);
2112 void findAllPrimitivesByName(
2114 const char *nametomatch,
2117 const char *nameattrib=
"name")
const;
2118 void findAllPrimitivesByName(
2120 const char *nametomatch,
2123 const char *nameattrib=
"name");
2132 { destroyElementGroup(g); }
2134 { destroyElementGroup(g); }
2136 { destroyElementGroup(g); }
2159 bool override =
true);
2162 bool override =
true);
2166 bool override =
true);
2169 bool override =
true);
2175 GA_Size localIntrinsicTupleSize(
2191 const char *
value)
override;
2217 bool convertIndexPairDataFromH9();
2218 bool convertIndexPairDataToH9();
2220 template<
typename FLOAT_T>
2225 bool keep_vector_lengths,
2227 bool neg_determinant_flipvector,
2228 bool update_ptnormals,
2230 bool updateaffectednormals,
2231 const char *attribpattern);
2236 bool override =
true);
2277 int min_size=1,
int max_size=-1)
const;
2281 int min_size=1,
int max_size=-1)
const
2284 min_size, max_size);
2289 int min_size=1,
int max_size=-1);
2293 int min_size=1,
int max_size=-1)
2296 min_size, max_size);
2301 int min_size=1,
int max_size=-1)
const;
2305 int min_size=1,
int max_size=-1)
const
2308 min_size, max_size);
2313 int min_size=1,
int max_size=-1);
2317 int min_size=1,
int max_size=-1)
2320 min_size, max_size);
2326 int min_size=1,
int max_size=-1)
const;
2330 int min_size=1,
int max_size=-1)
const
2333 name, min_size, max_size);
2339 int min_size=1,
int max_size=-1);
2343 int min_size=1,
int max_size=-1)
2346 name, min_size, max_size);
2351 int min_size=1,
int max_size=-1)
const;
2355 int min_size=1,
int max_size=-1)
const
2358 name, min_size, max_size);
2363 int min_size=1,
int max_size=-1);
2367 int min_size=1,
int max_size=-1)
2370 name, min_size, max_size);
2393 int min_size=1,
int max_size=-1)
const;
2397 int min_size=1,
int max_size=-1)
const
2400 min_size, max_size);
2405 int min_size=1,
int max_size=-1);
2409 int min_size=1,
int max_size=-1)
2412 min_size, max_size);
2417 int min_size=1,
int max_size=-1)
const;
2421 int min_size=1,
int max_size=-1)
const
2424 min_size, max_size);
2429 int min_size=1,
int max_size=-1);
2433 int min_size=1,
int max_size=-1)
2436 min_size, max_size);
2441 int min_size=1,
int max_size=-1)
const;
2445 int min_size=1,
int max_size=-1)
const
2448 min_size, max_size);
2453 int min_size=1,
int max_size=-1);
2457 int min_size=1,
int max_size=-1)
2460 min_size, max_size);
2465 int min_size=1,
int max_size=-1)
const;
2469 int min_size=1,
int max_size=-1)
const
2472 min_size, max_size);
2477 int min_size=1,
int max_size=-1);
2481 int min_size=1,
int max_size=-1)
2484 min_size, max_size);
2489 int min_size=1,
int max_size=-1)
const;
2493 int min_size=1,
int max_size=-1)
const
2496 min_size, max_size);
2501 int min_size=1,
int max_size=-1);
2505 int min_size=1,
int max_size=-1)
2508 min_size, max_size);
2550 return addTuple(storage,
2592 tuple_size, defaults,
2619 tuple_size, defaults,
2643 name, tuple_size, creation_args,
2644 attribute_options, reuse);
2665 name, tuple_size, creation_args,
2666 attribute_options, reuse);
2779 return ((
'P'<<24) + (
'G'<<16) + (
'E'<<8) +
'O');
2784 return ((
'B'<<24) + (
'g'<<16) + (
'e'<<8) +
'o');
2790 bool savePointsH9(std::ostream &os,
bool binary,
2794 bool saveExtraH9(std::ostream &os,
bool binary,
2804 os,
false,
nullptr);
2809 friend class GU_IOClassic;
2815 void privateComputeNormal(
2818 const float cuspangledegrees,
2819 const int method)
const override;
UT_ValArray< EdgeAdjacencyData > GEO_EdgeAdjArray
void destroyPrimitiveGroup(GA_PrimitiveGroup *g)
virtual void clearCaches()
SYS_FORCE_INLINE GA_Attribute * addIntArray(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size=1, const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, GA_Storage storage=GA_STORE_INT32, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
SYS_FORCE_INLINE const GA_Attribute * findStringTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
Definition of a geometry attribute.
SYS_FORCE_INLINE GA_Attribute * addPointAttrib(const GA_Attribute *src)
SYS_FORCE_INLINE const GA_Attribute * findNumericArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
void incrementMetaCacheCount()
Specify when and how to reuse an existing attribute.
SYS_FORCE_INLINE const GA_Attribute * findPointVectorAttrib(GA_AttributeScope s, const UT_StringRef &n) const
Looks for a 3-float point attribute.
GLuint GLdouble GLdouble GLint GLint order
SYS_FORCE_INLINE GA_Attribute * findNumericTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
GLenum GLuint GLint GLint layer
Axis-aligned bounding box (AABB).
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
SYS_FORCE_INLINE GA_Attribute * findIntTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
GEO_Capture_Bone_Property
Class which stores the default values for a GA_Attribute.
GEO_Capture_Cloth_Property
SYS_FORCE_INLINE GA_Attribute * addDictArray(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size=1, const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, GA_Storage storage=GA_STORE_STRING, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
SYS_FORCE_INLINE GA_Attribute * addPrimAttrib(const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
bool GAisValid(GA_Size v)
void clearAndDestroy()
Clear all the points/primitives out of this detail.
const GLuint GLenum const void * binary
SYS_FORCE_INLINE GA_Attribute * addTuple(GA_Storage storage, GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size, const GA_Defaults &defaults=GA_Defaults(0.0), const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
SYS_FORCE_INLINE GA_Attribute * addVertexAttrib(GA_AttributeScope scope, const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
bool deletePrimitive(GA_Primitive &prim, bool and_points=false)
UT_ValArray< PointAdjacencyData > GEO_PointAdjArray
SYS_FORCE_INLINE GA_Attribute * findGlobalAttrib(const GA_Attribute &src)
SYS_FORCE_INLINE GA_Attribute * findIndexPair(GA_AttributeOwner owner, const UT_StringRef &name)
SYS_FORCE_INLINE GA_Attribute * findStringTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
void destroyVertexGroup(GA_VertexGroup *g)
SYS_FORCE_INLINE void destroyVertexAttrib(GA_AttributeScope scope, const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)
IOStatus saveClassic(const char *, const GA_SaveOptions *) const
GLuint const GLchar * name
SYS_FORCE_INLINE const GA_Attribute * findFloatTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
Standard user attribute level.
GA_Size deletePoints(const GA_Range &range, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES)
static int binaryMagicH9()
Magic number for binary geometry files.
UT_Vector3T< FLOAT_T > myUpVector
const UT_StringHolder & getName() const
exint GA_Size
Defines the bit width for index and offset types in GA.
GA_Size deletePrimitives(const GA_Range &range, bool and_points=false)
virtual int64 getMemoryUsage(bool inclusive) const
Compute memory usage (includes all shared memory)
GEO_Capture_Wire_Property
GA_Offset appendPointCopy(GA_Offset src)
GLuint GLuint GLfloat weight
void removeVariableName(const char *varname)
A range of elements in an index-map.
SYS_FORCE_INLINE const GA_Attribute * findVertexAttrib(const GA_Attribute &src) const
SYS_FORCE_INLINE GA_Attribute * findDictArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
A string map of attributes to ease backward compatibility In the GB/GEO/GU library code would often p...
SYS_FORCE_INLINE GEO_Primitive * getGEOPrimitive(GA_Offset primoff)
SYS_FORCE_INLINE GA_Attribute * addPrimAttrib(GA_AttributeScope scope, const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
SYS_FORCE_INLINE GA_Attribute * findPrimAttrib(const GA_Attribute &src)
GLuint GLenum GLenum transform
SYS_FORCE_INLINE GA_Attribute * addVertexAttrib(const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
SYS_FORCE_INLINE const GEO_Primitive * getGEOPrimitive(GA_Offset off) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Class used to create a map of source points during merging.
SYS_FORCE_INLINE const GA_Attribute * findPointAttrib(const GA_Attribute &src) const
bool operator!=(const SoftSymmetryParms &other) const
UT_Matrix3T< FLOAT_T > myOrient
SYS_FORCE_INLINE GA_Attribute * addPrimAttrib(const GA_Attribute *src)
CaptureType
Methods for manipulating capture weights (GEO_CaptureWeight.C)
SYS_FORCE_INLINE GA_Attribute * findVertexAttrib(const GA_Attribute &src)
SYS_FORCE_INLINE const GA_Attribute * findGlobalAttrib(const GA_Attribute &src) const
Class used to keep track of inheritance of intrinsic attribute evaluation.
SYS_FORCE_INLINE GA_Attribute * addIntTuple(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size, const GA_Defaults &defaults=GA_Defaults(0), const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, GA_Storage storage=GA_STORE_INT32, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
GLfloat GLfloat GLfloat v2
friend std::ostream & operator<<(std::ostream &os, const GEO_Detail &d)
SYS_FORCE_INLINE bool promotePointAttrib(const UT_StringRef &name)
SYS_FORCE_INLINE GA_Attribute * addFloatArray(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size=1, const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, GA_Storage storage=GA_STORE_REAL32, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
SYS_FORCE_INLINE GA_Attribute * addGlobalAttrib(GA_AttributeScope scope, const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
GLsizei GLsizei GLfloat distance
UT_BoundingBoxT< float > UT_BoundingBox
SYS_FORCE_INLINE void destroyAttribute(GA_AttributeOwner owner, const UT_StringRef &name, const GA_AttributeFilter *filter=0)
SYS_FORCE_INLINE void destroyPrimAttrib(const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)
SYS_FORCE_INLINE const GA_Attribute * findNumericTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
GLboolean GLboolean GLboolean GLboolean a
SYS_FORCE_INLINE GA_Offset appendPoint()
Append a new point, returning its new data offset.
SYS_FORCE_INLINE const GA_Attribute * findDictArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
SYS_FORCE_INLINE const GA_Attribute * findFloatArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
bool operator<(const GU_TetrahedronFacet &a, const GU_TetrahedronFacet &b)
GA_Offset myStartEdgePoint
A handle to simplify manipulation of multiple attributes.
SYS_FORCE_INLINE GA_Attribute * findFloatTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
SYS_FORCE_INLINE const GA_Attribute * findVertexVectorAttrib(GA_AttributeScope s, const UT_StringRef &n) const
Looks for a 3-float vertex attribute.
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
HUSD_API bool eval(VtValue &val, T &ret_val)
const GEO_Primitive * getGEOPrimitiveByIndex(GA_Index idx) const
#define SYS_DEPRECATED_HDK(__V__)
SYS_FORCE_INLINE GA_Attribute * addPointAttrib(const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
GEO_Primitive GB_MACRO_PRIM_TYPE
SYS_FORCE_INLINE const GA_Attribute * findIndexPair(GA_AttributeOwner owner, const UT_StringRef &name) const
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
GA_AttributeScope getScope() const
UT_Vector3T< FLOAT_T > myFwdVector
GA_API const UT_StringHolder orient
SYS_FORCE_INLINE GA_Attribute * growTuple(GA_AttributeOwner owner, const UT_StringRef &name, int added_size)
Read-only handle for string attribute data.
SYS_FORCE_INLINE GA_Attribute * findPointAttrib(const GA_Attribute &src)
SYS_FORCE_INLINE void destroyPointAttrib(const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)
SYS_FORCE_INLINE const GA_AttributeDict & attribs() const
bool destroyPointGroup(const char *name)
LocalXformContextT(const UT_Matrix3T< FLOAT_T > &orient, const UT_Vector3T< FLOAT_T > &origin, PivotSpace pivot_space)
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
SYS_FORCE_INLINE GA_Attribute * findFloatArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
GEO_Primitive * getGEOPrimitiveByIndex(GA_Index idx)
Contains transitional objects to provide some backward compatibility for code that references old GEO...
GLuint GLsizei GLsizei * length
GEO_API const TypeMask GEOPRIMALL
SYS_FORCE_INLINE GA_Offset appendPointOffset()
A map of string to various well defined value types.
Class to return information about a GA_Detail.
SYS_FORCE_INLINE const GA_Attribute * findPrimAttrib(const GA_Attribute &src) const
SYS_FORCE_INLINE GA_Attribute * findStringArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
SYS_FORCE_INLINE GA_Attribute * findPointVectorAttrib(GA_AttributeScope s, const UT_StringRef &n)
SYS_FORCE_INLINE GA_Attribute * addGlobalAttrib(const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
SYS_FORCE_INLINE GA_Attribute * addDictTuple(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size, const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
SYS_FORCE_INLINE bool demoteVertexAttrib(const UT_StringRef &name)
SYS_FORCE_INLINE const GA_Attribute * findPointVectorAttrib(const UT_StringRef &n) const
GA_Primitive * appendPrimitive(const GA_PrimitiveTypeId &type)
Append a primitive by GA_PrimitiveTypeId.
virtual void countMemory(UT_MemoryCounter &counter, bool inclusive) const
SYS_FORCE_INLINE GA_Attribute * findIntArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
GA_API const UT_StringHolder up
static int asciiMagicH9()
Magic number for ASCII geometry files.
SYS_FORCE_INLINE const GA_Attribute * findIntArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
SYS_FORCE_INLINE GEO_Primitive * appendPrimitive(const GA_PrimitiveTypeId &type)
SYS_FORCE_INLINE GA_Attribute * addGlobalAttrib(const GA_Attribute *src)
SYS_FORCE_INLINE const GA_AttributeDict & primitiveAttribs() const
Utility class for containing a color ramp.
void destroyPointGroup(GA_PointGroup *g)
GEO_Capture_Muscle_Property
SYS_FORCE_INLINE GA_Attribute * findNumericArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1)
SYS_FORCE_INLINE GA_Size deletePoints(const GA_PointGroup &point_group, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES)
SYS_FORCE_INLINE GA_Attribute * addFloatTuple(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size, const GA_Defaults &defaults=GA_Defaults(0.0), const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, GA_Storage storage=GA_STORE_REAL32, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
bool destroyPrimitiveGroup(const char *name)
SYS_FORCE_INLINE GA_Attribute * addStringArray(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size=1, const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, GA_Storage storage=GA_STORE_STRING, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
SYS_FORCE_INLINE GA_Attribute * addPointAttrib(GA_AttributeScope scope, const UT_StringHolder &n, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
SYS_FORCE_INLINE GA_Attribute * findVertexVectorAttrib(const UT_StringRef &n)
SYS_FORCE_INLINE GA_Attribute * findPointVectorAttrib(const UT_StringRef &n)
getOption("OpenEXR.storage") storage
Container class for all geometry.
SYS_FORCE_INLINE const GA_Attribute * findIntTuple(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
UT_Vector3T< FLOAT_T > myOrigin
GA_Offset appendPointCopy(GA_Offset src, GA_PointWrangler &wrangler)
Append a point, copying data from the source point.
SYS_FORCE_INLINE void destroyVertexAttrib(const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)
PUGI__FN char_t * translate(char_t *buffer, const char_t *from, const char_t *to, size_t to_length)
SYS_FORCE_INLINE GA_Attribute * addVertexAttrib(const GA_Attribute *src)
GEO_Capture_Meta_Property
SYS_FORCE_INLINE GA_Attribute * addStringTuple(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size, const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
SYS_FORCE_INLINE const GA_Attribute * findStringArray(GA_AttributeOwner owner, const UT_StringRef &name, int min_size=1, int max_size=-1) const
SYS_FORCE_INLINE void destroyGlobalAttrib(GA_AttributeScope scope, const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)
bool operator==(const SoftSymmetryParms &other) const
SYS_FORCE_INLINE void destroyPointAttrib(GA_AttributeScope scope, const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)
Class to specify options for loading geometry.
SYS_FORCE_INLINE GA_Attribute * findVertexVectorAttrib(GA_AttributeScope s, const UT_StringRef &n)
SYS_FORCE_INLINE void destroyGlobalAttrib(const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)
LocalXformContextT(const UT_Vector3T< FLOAT_T > &forward, const UT_Vector3T< FLOAT_T > &up, PivotSpace pivot_space)
Coordinate frame defined by lookat(zero, forward, up).
GEO_CopyMethod
An enum for GEO_Detail::copy's method parameter.
constexpr T normalize(UT_FixedVector< T, D > &a) noexcept
bool destroyVertexGroup(const char *name)
SYS_FORCE_INLINE const GA_Attribute * findVertexVectorAttrib(const UT_StringRef &n) const
SYS_FORCE_INLINE const GA_AttributeDict & vertexAttribs() const
SYS_FORCE_INLINE void destroyPrimAttrib(GA_AttributeScope scope, const UT_StringRef &n, const GA_AttributeFilter *filter=NULL)