thanks Paolo,
the tip worked like a charm!
imran
On Mon, Mar 17, 2008 at 11:18 PM, Paolo Cignoni <pao...@is...>
wrote:
> If you want to save the texture coords of a meshlab mesh compacted in a
> per-vertex form (and therefore unifying the duplicate tex coords)
> look at the obj exporter (at line 270 ) ; it does exactly the same job.
>
> it simply use a std::map<vcg::TexCoord2<float>,int> CoordIndexTexture;
> to transform each tex coord into a index.
>
> Much simpler than using topology.
>
> p.
>
>
>
> skunkwerk wrote:
>
> is there any way to get the position (index) of a face in the m.facesvector without an iterator?
> I am asking because the way i'm testing for repeated uv coords relies on
> testing adjacent faces, with the adjacent face declared like:
> CFaceO* adj = fit->FFp(y); //where fit is an iterator for the current face
>
> and if the test for identical uv coords between the current face and an
> adjacent face is true, i'd like to know what the position of that adjacent
> face is in the m.faces vector so I can copy it's uv coord index that i've
> stored in a temporary data structure.
>
> thanks,
> imran
>
> On Wed, Mar 5, 2008 at 1:46 PM, skunkwerk <sku...@gm...> wrote:
>
> > i was looking at the saved collada file from meshlab and noticed that
> > texture coords were being repeated (as there are two coords per vertex, and
> > the save function is generating them by iterating through faces-which may
> > have the same vertices). so i wanted to change the floatarraytag in
> > colladaformat.h to generate the tex coords per vertex (thus maintaining
> > uniqueness) rather than by face, but i couldn't figure out how to do it:
> >
> > there is 'vit' which is a vertex vector iterator, so i thought i could
> > do QString::number(vit->T().U()) or something but that didn't work.
> > the face vector iterator currently does:
> > QString::number(fit->cWT(ii).U())
> >
> > how should i do this?
> >
> > thanks,
> > imran
> >
>
> ------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
> ------------------------------
>
> _______________________________________________
> Meshlab-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/meshlab-devel
>
>
>
> --
> Paolo Cignoni -- Senior Researcher
> Visual Computing Laboratory - ISTI - CNR http://vcg.isti.cnr.it/~cignoni <http://vcg.isti.cnr.it/%7Ecignoni>
>
> ISTI - CNR
> Via Moruzzi 1,
> 56124 Pisa
> ITALY
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Meshlab-devel mailing list
> Mes...@li...
> https://lists.sourceforge.net/lists/listinfo/meshlab-devel
>
>
|