Fixed parameter order on method compute_fitmap;
Added parameter to set number of smoothing iterations;
This commit is contained in:
parent
326fa280ce
commit
59e89dfc73
|
@ -153,7 +153,7 @@ namespace vcg{
|
||||||
float w0;
|
float w0;
|
||||||
float w1;
|
float w1;
|
||||||
float w2;
|
float w2;
|
||||||
vcg::InterpolationParameters(*T, C, N, w0, w1, w2);
|
vcg::InterpolationParameters(*T, N, C, w0, w1, w2);
|
||||||
|
|
||||||
float s0 = attr[T->V(0)];
|
float s0 = attr[T->V(0)];
|
||||||
float s1 = attr[T->V(1)];
|
float s1 = attr[T->V(1)];
|
||||||
|
@ -292,6 +292,13 @@ namespace vcg{
|
||||||
return grid;
|
return grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Number of smoothing iterations to be performed
|
||||||
|
static unsigned int &smoothing_iterations()
|
||||||
|
{
|
||||||
|
static unsigned int iterations = 5;
|
||||||
|
return iterations;
|
||||||
|
}
|
||||||
|
|
||||||
/// Default Constructor
|
/// Default Constructor
|
||||||
QuadDiagonalCollapseBase(){}
|
QuadDiagonalCollapseBase(){}
|
||||||
|
|
||||||
|
@ -384,7 +391,7 @@ namespace vcg{
|
||||||
|
|
||||||
|
|
||||||
// Smoothing
|
// Smoothing
|
||||||
for(int i = 0; i < 5; i++)
|
for(unsigned int i = 0; i < smoothing_iterations(); i++)
|
||||||
{
|
{
|
||||||
for(typename set<VertexPointer>::iterator vi = vertices.begin(); vi!= vertices.end(); ++vi)
|
for(typename set<VertexPointer>::iterator vi = vertices.begin(); vi!= vertices.end(); ++vi)
|
||||||
if(!HalfEdgeTopology<MeshType>::isBorderVertex(*vi))
|
if(!HalfEdgeTopology<MeshType>::isBorderVertex(*vi))
|
||||||
|
|
Loading…
Reference in New Issue