Hi!
I am new to OSG, so excuse my rather basic question. I have an update
callback for an object in the scene. In this callback I need to have
the list of the object's vertices in the world coordinates. The
problem is that I receive them in local coordinates system. Can anyone
tell me ho I can obtain the world coordinates of the vertices? Here is
the "apply" function definition of the update callback:
virtual void apply(osg::Drawable::AttributeType type,unsigned int
count,osg::Vec3* begin)
{
if (type == osg::Drawable::VERTICES)
{
osg::Vec3* end = begin+count;
for (osg::Vec3* itr=begin;itr<end;++itr)
{
addStartPoint((itr)->x() + tr, //this is a function
(itr)->y() + tr, //of mine that uses the
(itr)->z() + tr); //vertex coords
}
}
}
The points that I give as parameter to the addStartPoint() function
should be in the world's coordinate system. Does anybody know how to
do that in OSG?
Lucian Horga.
OSG user.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/