优化bug
This commit is contained in:
1 parent
3159aa8b5e
commit
68cb2ea1fc
1 file changed
+13
-6
@@ -5714,7 +5714,7 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
}
|
||||
|
||||
// 如果夹角小于45度(cos(45°) ≈ 0.7071),则计入覆盖
|
||||
float fAngleThreshold = 0.8571; // 0.7071f
|
||||
float fAngleThreshold = 0.7071; // 0.7071f
|
||||
|
||||
// 初始化数据结构
|
||||
std::vector<bool> processedFaces(faces.size(), false);
|
||||
@@ -5726,7 +5726,8 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
Util::Progress progress1(_T("计算视图覆盖"), images.size());
|
||||
for (IIndex idxView = 0; idxView < images.size(); ++idxView) {
|
||||
|
||||
if (mapViewCoverageData.find(idxView) == mapViewCoverageData.end()) {
|
||||
if (mapViewCoverageData.find(idxView) == mapViewCoverageData.end())
|
||||
{
|
||||
// 插入新对象
|
||||
mapViewCoverageData.emplace(idxView, ViewCoverageData(idxView));
|
||||
}
|
||||
@@ -6005,10 +6006,14 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
|
||||
IIndexArr filteredCams;
|
||||
|
||||
int nHitCount = 0;
|
||||
int nMaxHit = 400;
|
||||
int nMaxViewCoverage = 0;
|
||||
for (const auto& [viewIdx, coverageCount] : viewCoverage) {
|
||||
if (nMaxViewCoverage>6)
|
||||
break;
|
||||
if (nMaxViewCoverage>12)
|
||||
if (nHitCount>nMaxHit)
|
||||
break;
|
||||
|
||||
auto it_view = mapViewCoverageData.find(viewIdx);
|
||||
if (it_view == mapViewCoverageData.end()) {
|
||||
continue;
|
||||
@@ -6042,9 +6047,11 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
if (!scene.is_face_delete_edge2(strName, virtualFaceCenterFaceID))
|
||||
{
|
||||
filteredCams.push_back(viewIdx);
|
||||
}
|
||||
++nHitCount;
|
||||
|
||||
break;
|
||||
if (nHitCount>nMaxHit)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
++nMaxViewCoverage;
|
||||
|
||||
Reference in new issue
Block a user