Hello!
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 coorinates. The problem
is that I receive them in local coordinates. 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)
{
const float TwoPI=2.0f*osg::PI;
const float phase = -_time/_period;
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
}
}
}
My question is how do I get the world coorinates of the points that I
ngive as parameter to the addStartPoint() function. Thank you!
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/