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:
GeoPropertyArrayInterface* pnts =
terrain_geo->getProperty(Geometry::MapPosition);
GeoPositions3fPtr positions =
GeoPositions3fPtr::dcast(terrain_geo->getPositions());
GeoTexCoords2fPtr texcoords =
GeoTexCoords2fPtr::dcast(terrain_geo->getTexCoords());
beginEditCP(texcoords);
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);
texcoords->setValue(tc, i) is not compiling with the error:
error: no matching function for call to `
osg::GeoProperty<osg::GeoTexCoords2fPropertyDesc>::setValue(osg::Pnt2f&,
UInt32&)'
/usr/local/include/OpenSG/OSGGeoPropertyBase.inl:362: error: candidates are:
void osg::GeoProperty<GeoPropertyDesc>::setValue(typename
GeoPropertyDesc::GenericType&, unsigned int) [with GeoPropertyDesc =
osg::GeoTexCoords2fPropertyDesc]
I'm afraid digging through the source code isn't getting me anywhere.
Does anyone know the proper way to do this?
--
Terry Welsh - mogumbo 'at' gmail.com
www.reallyslick.com | www.infiscape.com | www.vrsource.org
-------------------------------------------------------
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_ids93&alloc_id281&opÿick
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users