Hi Enrico, Enrico Borrione wrote: > hi opensg users, > > i am trying to hold a w component in the texcoords field of a geo. > > right now my code looks like: > > osg::GeoTexCoords3fPtr coords = osg::GeoTexCoords3f::create(); > > osg::Vec3f coord; > > coord = osg::Vec3f(foo); > std::cout << "coord " << coord << std::endl; // outputs coord correct > > beginEditCP(coords, GeoIndicesUI32::GeoPropDataFieldMask); > coords->setValue (coord,k); > endEditCP(coords, GeoIndicesUI32::GeoPropDataFieldMask); > > // outputs just a vec2f. no sign of the 3rd component > std::cout << "coords " << coords->getValue(k) << std::endl; > > are there any special cares that i should take when i call > the setValue function?
Yup. setValue() uses the generic format for the Property type, which for TCs is Vec2f. If you want the Vec3f you need to go via the Field: coords->getFieldPtr()->setValue(coord,k); Hope it helps Dirk ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users