added VertexBorder sampling algorithm that simply collect all the vertexes on the boundary.
This commit is contained in:
parent
2acd02f102
commit
d1a5d53a89
|
@ -435,7 +435,7 @@ static void VertexUniform(MetroMesh & m, VertexSampler &ps, int sampleNum)
|
|||
|
||||
/// \brief Sample all the border corner vertices
|
||||
///
|
||||
/// It assumes that the border flag have been set over the mesh.
|
||||
/// It assumes that the border flag have been set over the mesh both for vertex and for faces.
|
||||
/// All the vertices on the border where the surface forms an angle smaller than the given threshold are sampled.
|
||||
///
|
||||
static void VertexBorderCorner(MetroMesh & m, VertexSampler &ps, float angleRad)
|
||||
|
@ -455,13 +455,23 @@ static void VertexBorderCorner(MetroMesh & m, VertexSampler &ps, float angleRad)
|
|||
|
||||
for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||
{
|
||||
if(angleSumH[vi]<angleRad)
|
||||
if(angleSumH[vi]<angleRad && vi->IsB())
|
||||
ps.AddVert(*vi);
|
||||
}
|
||||
|
||||
tri::Allocator<MetroMesh>:: template DeletePerVertexAttribute<float> (m,angleSumH);
|
||||
}
|
||||
|
||||
/// \brief Sample all the border vertices
|
||||
///
|
||||
/// It assumes that the border flag have been set over the mesh.
|
||||
/// All the vertices on the border are sampled.
|
||||
///
|
||||
static void VertexBorder(MetroMesh & m, VertexSampler &ps)
|
||||
{
|
||||
VertexBorderCorner(m,ps,std::numeric_limits<ScalarType>::max());
|
||||
}
|
||||
|
||||
/// Sample all the crease vertices.
|
||||
/// It assumes that the crease edges had been marked as non-faux edges
|
||||
/// for example by using
|
||||
|
|
Loading…
Reference in New Issue