updated to the new temporary data structure
This commit is contained in:
parent
634b5c4f63
commit
25dd36a704
|
@ -23,6 +23,9 @@
|
|||
/****************************************************************************
|
||||
History
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.8 2008/05/14 10:03:29 ganovelli
|
||||
Point3f->Coordtype
|
||||
|
||||
Revision 1.7 2008/04/23 16:37:15 onnis
|
||||
VertexCurvature method added.
|
||||
|
||||
|
@ -292,8 +295,8 @@ Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer
|
|||
VertexIterator vi;
|
||||
typename MeshType::CoordType e01v ,e12v ,e20v;
|
||||
|
||||
SimpleTempData<VertContainer, AreaData> TDAreaPtr(m.vert); TDAreaPtr.Start();
|
||||
SimpleTempData<VertContainer, typename MeshType::CoordType> TDContr(m.vert); TDContr.Start();
|
||||
SimpleTempData<VertContainer, AreaData> TDAreaPtr(m.vert); //TDAreaPtr.Start();
|
||||
SimpleTempData<VertContainer, typename MeshType::CoordType> TDContr(m.vert); //TDContr.Start();
|
||||
|
||||
vcg::tri::UpdateNormals<MeshType>::PerVertexNormalized(m);
|
||||
//Compute AreaMix in H (vale anche per K)
|
||||
|
@ -386,8 +389,8 @@ Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer
|
|||
}
|
||||
}
|
||||
|
||||
TDAreaPtr.Stop();
|
||||
TDContr.Stop();
|
||||
// TDAreaPtr.Stop();
|
||||
// TDContr.Stop();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.30 2008/04/29 11:51:28 corsini
|
||||
set defaut callback (in save) to null
|
||||
|
||||
Revision 1.29 2008/01/24 11:54:23 cignoni
|
||||
passed the callback in the save
|
||||
|
||||
|
@ -419,14 +422,9 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p
|
|||
VertexPointer vp;
|
||||
VertexIterator vi;
|
||||
SimpleTempData<typename SaveMeshType::VertContainer,int> indices(m.vert);
|
||||
if(!m.HasPerVertexFlags())
|
||||
indices.Start();
|
||||
|
||||
for(j=0,vi=m.vert.begin();vi!=m.vert.end();++vi){
|
||||
vp=&(*vi);
|
||||
if(m.HasPerVertexFlags())
|
||||
FlagV.push_back(vp->UberFlags()); // Salva in ogni caso flag del vertice
|
||||
else
|
||||
indices[j] = j;
|
||||
|
||||
if( !m.HasPerVertexFlags() || !vp->IsD() )
|
||||
|
@ -504,8 +502,6 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p
|
|||
|
||||
fprintf(fpout,"\n");
|
||||
}
|
||||
if(m.HasPerVertexFlags())
|
||||
vp->UberFlags()=j; // Trucco! Nascondi nei flags l'indice del vertice non deletato!
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
@ -525,19 +521,10 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p
|
|||
if( ! fp->IsD() )
|
||||
{ fcnt++;
|
||||
if(binary)
|
||||
{
|
||||
|
||||
if(m.HasPerVertexFlags()){
|
||||
vv[0]=fp->cV(0)->UberFlags();
|
||||
vv[1]=fp->cV(1)->UberFlags();
|
||||
vv[2]=fp->cV(2)->UberFlags();
|
||||
}
|
||||
else
|
||||
{
|
||||
vv[0]=indices[fp->cV(0)];
|
||||
vv[1]=indices[fp->cV(1)];
|
||||
vv[2]=indices[fp->cV(2)];
|
||||
}
|
||||
fwrite(&c,1,1,fpout);
|
||||
fwrite(vv,sizeof(int),3,fpout);
|
||||
|
||||
|
@ -610,10 +597,6 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p
|
|||
}
|
||||
else // ***** ASCII *****
|
||||
{
|
||||
if(m.HasPerVertexFlags())
|
||||
fprintf(fpout,"3 %d %d %d ",
|
||||
fp->cV(0)->UberFlags(), fp->cV(1)->UberFlags(), fp->cV(2)->UberFlags() );
|
||||
else
|
||||
fprintf(fpout,"3 %d %d %d ",
|
||||
indices[fp->cV(0)], indices[fp->cV(1)], indices[fp->cV(2)] );
|
||||
|
||||
|
@ -691,14 +674,6 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p
|
|||
}
|
||||
assert(fcnt==m.fn);
|
||||
fclose(fpout);
|
||||
|
||||
// Recupera i flag originali
|
||||
if(m.HasPerVertexFlags())
|
||||
for(j=0,vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||
(*vi).UberFlags()=FlagV[j++];
|
||||
else
|
||||
indices.Stop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue