|
|
|
|
@ -800,6 +800,8 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
@@ -800,6 +800,8 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
|
|
|
|
|
// scene.mesh.invalidFaces.clear();
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::vector<int> faceViewCount(faces.size(), 0); |
|
|
|
|
|
|
|
|
|
// extract array of faces viewed by each image
|
|
|
|
|
IIndexArr views(_views); |
|
|
|
|
if (views.empty()) { |
|
|
|
|
@ -1105,11 +1107,24 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
@@ -1105,11 +1107,24 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
|
|
|
|
|
const Face& facet = faces[idxFace]; |
|
|
|
|
rasterer.idxFace = idxFace; |
|
|
|
|
|
|
|
|
|
if (scene.is_face_visible(strName.c_str(), idxFace)) |
|
|
|
|
bool skipVisibilityCheck = false; |
|
|
|
|
|
|
|
|
|
int coverage = faceViewCount[idxFace]; |
|
|
|
|
|
|
|
|
|
if (coverage < 5) { |
|
|
|
|
skipVisibilityCheck = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (skipVisibilityCheck || scene.is_face_visible(strName.c_str(), idxFace)) |
|
|
|
|
{ |
|
|
|
|
rasterer.Project(facet, triangleRasterizer); |
|
|
|
|
if (!rasterer.validFace) |
|
|
|
|
rasterer.Project(facet, triangleRasterizer); |
|
|
|
|
|
|
|
|
|
// 如果投影成功,增加面片覆盖率计数
|
|
|
|
|
if (rasterer.validFace) { |
|
|
|
|
faceViewCount[idxFace]++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|