indent and spelling fix

This commit is contained in:
Luigi Malomo 2018-05-07 20:24:39 +02:00
parent ad5183e567
commit 70a141db69
2 changed files with 42 additions and 39 deletions

View File

@ -184,47 +184,50 @@ public:
*
*/
bool TagFaceEdgeSelWithPolyLine(MeshType &poly,bool markFlag=true)
{
if(markFlag) tri::UpdateFlags<MeshType>::FaceClearFaceEdgeS(base);
tri::UpdateTopology<MeshType>::VertexFace(base);
tri::UpdateTopology<MeshType>::FaceFace(base);
for(EdgeIterator ei=poly.edge.begin(); ei!=poly.edge.end();++ei)
{
CoordType ip0,ip1;
FaceType *f0 = GetClosestFaceIP(ei->cP(0),ip0);
FaceType *f1 = GetClosestFaceIP(ei->cP(1),ip1);
if(BarycentricSnap(ip0) && BarycentricSnap(ip1))
{
VertexPointer v0 = FindVertexSnap(f0,ip0);
VertexPointer v1 = FindVertexSnap(f1,ip1);
bool TagFaceEdgeSelWithPolyLine(MeshType &poly,bool markFlag=true)
{
if (markFlag)
tri::UpdateFlags<MeshType>::FaceClearFaceEdgeS(base);
if(v0==0 || v1==0) return false;
if(v0==v1) return false;
tri::UpdateTopology<MeshType>::VertexFace(base);
tri::UpdateTopology<MeshType>::FaceFace(base);
FacePointer ff0,ff1;
int e0,e1;
bool ret=face::FindSharedFaces<FaceType>(v0,v1,ff0,ff1,e0,e1);
if(ret){
assert(ret);
assert(ff0->V(e0)==v0 || ff0->V(e0)==v1);
ff0->SetFaceEdgeS(e0);
ff1->SetFaceEdgeS(e1);
}
else {
return false;
}
}
else {
return false;
}
}
return true;
}
for(EdgeIterator ei=poly.edge.begin(); ei!=poly.edge.end();++ei)
{
CoordType ip0,ip1;
FaceType *f0 = GetClosestFaceIP(ei->cP(0),ip0);
FaceType *f1 = GetClosestFaceIP(ei->cP(1),ip1);
if(BarycentricSnap(ip0) && BarycentricSnap(ip1))
{
VertexPointer v0 = FindVertexSnap(f0,ip0);
VertexPointer v1 = FindVertexSnap(f1,ip1);
if(v0==0 || v1==0)
return false;
if(v0==v1)
return false;
FacePointer ff0,ff1;
int e0,e1;
bool ret=face::FindSharedFaces<FaceType>(v0,v1,ff0,ff1,e0,e1);
if(ret)
{
assert(ret);
assert(ff0->V(e0)==v0 || ff0->V(e0)==v1);
ff0->SetFaceEdgeS(e0);
ff1->SetFaceEdgeS(e1);
} else {
return false;
}
}
else {
return false;
}
}
return true;
}
ScalarType MinDistOnEdge(CoordType samplePnt, EdgeGrid &edgeGrid, MeshType &poly, CoordType &closestPoint)
{
ScalarType polyDist;

View File

@ -759,7 +759,7 @@ static void VertexUniform(MeshType & m, VertexSampler &ps, int sampleNum)
///
/// It assumes that the mesh is 1-manifold.
/// each connected component is sampled in a independent way.
/// For each component of lenght <L> we place on it floor(L/radius)+1 samples.
/// For each component of length <L> we place on it floor(L/radius)+1 samples.
/// (if conservative argument is false we place ceil(L/radius)+1 samples)
///
static void EdgeMeshUniform(MeshType &m, VertexSampler &ps, float radius, bool conservative = true)