Hi Terry,

On Fri, 2005-05-13 at 11:11 -0500, Terry Welsh wrote:
> I have found a couple examples of editing vertex positions in existing
> Geometry cores.  But extending this method to let me edit texcoords
> isn't working.  Here's my code:
...
>       for(UInt32 i=0; i<texcoords->getSize(); ++i)
>       {
>          Pnt3f p;
>          positions->getValue(p, i);
>          Pnt2f tc;
>          tc[0] = p[0];
>          tc[1] = p[1];
>          texcoords->setValue(tc, i);
>       }
>    endEditCP(texcoords);
...
> I'm afraid digging through the source code isn't getting me anywhere. 
> Does anyone know the proper way to do this?

Texture coordinates are Vectors, not Points. Replace your Pnt2f with a
Vec2f and things should be fine.

HIH

        Dirk

-- 
-- Dirk Reiners               OpenSG Forum             [EMAIL PROTECTED] 
-- The OpenSG Open Source Scenegraph:            http://www.opensg.org
-- Join the list at    http://lists.sf.net/lists/listinfo/opensg-users



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to