Added a number of 'template' and 'typename' keyword to comply clang...
This commit is contained in:
parent
3f1b4519b5
commit
9a48f16579
|
@ -57,7 +57,7 @@ private:
|
|||
// Initialize the convex hull with the biggest tetraedron created using the vertices of the input mesh
|
||||
static void InitConvexHull(InputMesh& mesh, CHMesh& convexHull)
|
||||
{
|
||||
CMesh::PerVertexAttributeHandle<ScalarType> indexInputVertex = vcg::tri::Allocator<InputMesh>::GetPerVertexAttribute<ScalarType>(mesh, std::string("indexInput"));
|
||||
typename CHMesh:: template PerVertexAttributeHandle<int> indexInputVertex = Allocator<InputMesh>::template GetPerVertexAttribute<int>(mesh, std::string("indexInput"));
|
||||
InputVertexPointer v[3];
|
||||
//Find the 6 points with min/max coordinate values
|
||||
InputVertexIterator vi = mesh.vert.begin();
|
||||
|
@ -169,7 +169,7 @@ public:
|
|||
vcg::tri::RequireFFAdjacency(convexHull);
|
||||
vcg::tri::RequirePerFaceNormal(convexHull);
|
||||
vcg::tri::Allocator<InputMesh>::CompactVertexVector(mesh);
|
||||
CMesh::PerVertexAttributeHandle<ScalarType> indexInputVertex = vcg::tri::Allocator<InputMesh>::GetPerVertexAttribute<ScalarType>(mesh, std::string("indexInput"));
|
||||
typename CHMesh:: template PerVertexAttributeHandle<int> indexInputVertex = Allocator<InputMesh>::template GetPerVertexAttribute<int>(mesh, std::string("indexInput"));
|
||||
if (mesh.vert.size() < 4)
|
||||
return false;
|
||||
InitConvexHull(mesh, convexHull);
|
||||
|
@ -260,7 +260,7 @@ public:
|
|||
for (int ii = 0; ii < 2; ii++)
|
||||
{
|
||||
int indexE = ii * 2;
|
||||
std::unordered_map< CHVertexPointer, std::pair<int, char> >::iterator vIter = fanMap.find(vp[ii]);
|
||||
typename std::unordered_map< CHVertexPointer, std::pair<int, char> >::iterator vIter = fanMap.find(vp[ii]);
|
||||
if (vIter != fanMap.end())
|
||||
{
|
||||
CHFacePointer f2 = &convexHull.face[(*vIter).second.first];
|
||||
|
@ -277,9 +277,9 @@ public:
|
|||
}
|
||||
//Build the visibility list for the new face
|
||||
std::vector<InputVertexPointer> tempVect;
|
||||
int indices[] = { indexFace, vcg::tri::Index(convexHull, f->FFp(j)) };
|
||||
int indices[2] = { indexFace, int(vcg::tri::Index(convexHull, f->FFp(j)) )};
|
||||
std::vector<InputVertexPointer> vertexToTest(listVertexPerFace[indices[0]].size() + listVertexPerFace[indices[1]].size());
|
||||
std::vector<InputVertexPointer>::iterator tempIt = std::set_union(listVertexPerFace[indices[0]].begin(), listVertexPerFace[indices[0]].end(), listVertexPerFace[indices[1]].begin(), listVertexPerFace[indices[1]].end(), vertexToTest.begin());
|
||||
typename std::vector<InputVertexPointer>::iterator tempIt = std::set_union(listVertexPerFace[indices[0]].begin(), listVertexPerFace[indices[0]].end(), listVertexPerFace[indices[1]].begin(), listVertexPerFace[indices[1]].end(), vertexToTest.begin());
|
||||
vertexToTest.resize(tempIt - vertexToTest.begin());
|
||||
ScalarType maxDist = 0;
|
||||
Pair newInfo = std::make_pair((InputVertexPointer)NULL , 0.0f);
|
||||
|
@ -315,16 +315,18 @@ public:
|
|||
{
|
||||
if (!convexHull.face[visFace[j]].IsD())
|
||||
{
|
||||
std::vector<InputVertexPointer> emptyVec;
|
||||
vcg::tri::Allocator<CHMesh>::DeleteFace(convexHull, convexHull.face[visFace[j]]);
|
||||
listVertexPerFace[visFace[j]].swap(std::vector<InputVertexPointer>());
|
||||
listVertexPerFace[visFace[j]].swap(emptyVec);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tri::UpdateTopology<CHMesh>::ClearFaceFace(convexHull);
|
||||
vcg::tri::Allocator<CHMesh>::CompactFaceVector(convexHull);
|
||||
vcg::tri::Clean<CHMesh>::RemoveUnreferencedVertex(convexHull);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue