mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-19 19:14:42 +00:00
resolved various bugs
This commit is contained in:
parent
2d22b66149
commit
b3fa939960
@ -403,6 +403,7 @@ bool FilterIsoParametrization::applyFilter(QAction *filter, MeshDocument& md, Ri
|
||||
m->updateDataMask(MeshModel::MM_WEDGTEXCOORD);
|
||||
m->updateDataMask(MeshModel::MM_VERTTEXCOORD);
|
||||
m->updateDataMask(MeshModel::MM_FACECOLOR);
|
||||
m->updateDataMask(MeshModel::MM_VERTQUALITY);
|
||||
//}
|
||||
if(!QFile(m->fullName()).exists())
|
||||
{
|
||||
@ -425,6 +426,7 @@ bool FilterIsoParametrization::applyFilter(QAction *filter, MeshDocument& md, Ri
|
||||
}
|
||||
case ISOP_SAVE :
|
||||
{
|
||||
m->updateDataMask(MeshModel::MM_VERTQUALITY);
|
||||
bool b=vcg::tri::Allocator<CMeshO>::IsValidHandle<IsoParametrization>(*mesh,isoPHandle);
|
||||
if (!b)
|
||||
{
|
||||
|
||||
@ -450,6 +450,7 @@ private:
|
||||
//CreateMeshVertexStar(starCenter,ordered_faces,*star_meshes[index].domain);
|
||||
///get faces referenced by vertices
|
||||
getSharedFace<AbstractMesh>(starCenter,ordered_faces);
|
||||
|
||||
CopyMeshFromFacesAbs<AbstractMesh>(ordered_faces,ordered_vert,*star_meshes[index].domain);
|
||||
|
||||
UpdateTopologies(star_meshes[index].domain);
|
||||
@ -1827,8 +1828,11 @@ public:
|
||||
|
||||
///quality copy to index of texture
|
||||
for (size_t i=0;i<param_mesh->vert.size();i++)
|
||||
{
|
||||
/*int val0=(int)param_mesh->vert[i].Q();
|
||||
int val1=param_mesh->vert[i].T().N();*/
|
||||
param_mesh->vert[i].T().N()=(int)param_mesh->vert[i].Q();
|
||||
|
||||
}
|
||||
/*if (AbsMesh()!=NULL)
|
||||
delete(AbsMesh());*/
|
||||
|
||||
|
||||
@ -170,12 +170,19 @@ public:
|
||||
{
|
||||
|
||||
ScalarType dist=100.0;
|
||||
vcg::Point2<ScalarType> UVTest=UV;
|
||||
|
||||
///then project to the bbox
|
||||
if (!bbox2.IsIn(UV))
|
||||
return false;
|
||||
{
|
||||
UVTest= ClosestPoint2Box2(UV,bbox2);
|
||||
///move toward to the center
|
||||
UVTest=UVTest+(bbox2.Center()-UVTest)*0.0001;
|
||||
bbox2.IsIn(UVTest);
|
||||
}
|
||||
|
||||
//const ScalarType _EPSILON = ScalarType(0.000000001);
|
||||
vcg::Point2i cell=Cell(UV);
|
||||
vcg::Point2i cell=Cell(UVTest);
|
||||
///test for each face
|
||||
for (unsigned int i=0;i<data.size();i++)
|
||||
for (unsigned int j=0;j<data[i].size();j++)
|
||||
@ -188,7 +195,7 @@ public:
|
||||
vcg::Triangle2<ScalarType> t2d=vcg::Triangle2<ScalarType>(tex0,tex1,tex2);
|
||||
vcg::Point2<ScalarType> closest;
|
||||
ScalarType dist_test;
|
||||
t2d.PointDistance(UV,dist_test,closest);
|
||||
t2d.PointDistance(UVTest,dist_test,closest);
|
||||
if (dist_test<dist)
|
||||
{
|
||||
dist=dist_test;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user