获取体的面
int getBodyFaces(tag_t tagBody, int iType, vector<tag_t> *vecFaces) { uf_list_p_t list1 = NULL; UF_MODL_create_list(&list1); double douFaceBox[6]; double douOFaceRadius; double douFaceRadData; int iFaceNormDir; int iFaceType; double douFacePoint[3]; double douFaceDir[3]; UF_MODL_ask_body_faces(tagBody, &list1); int count = 0; UF_MODL_ask_list_count(list1, &count); for (int i = 0; i < count; i++) { tag_t tagPlane = NULL_TAG; UF_MODL_ask_list_item(list1, i, &tagPlane); UF_MODL_ask_face_data(tagPlane, &iFaceType, douFacePoint, douFaceDir, douFaceBox, &douOFaceRadius, &douFaceRadData, &iFaceNormDir); if ((iType == -1) || (iFaceType == iType)) { (*vecFaces).push_back(tagPlane); } } UF_free(list1); list1 = NULL; return 0; }
iType:
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/268111.html