Hello First off I'm using OSG 1.0.
I am deriving a class from osg::Drawable::CullCallback. I'm overloading the cull function [virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::State*) const]. I am trying to get the eye location in World Coordinates. It seems as though CullVisitor::getEyePoint() returns the eye location in Local Coords. I've tried tried multiplying by osg::computeLocalToWorld(nv->getNodePath()) and osg::computeWorldToLocal(nv->getNodePath()), but I've had no success. In some cases, I already know that my drawable has one MatrixTransform above it so I calculate the following: osg::Matrixd::inverse(xfrom->getMatrix()) * osg::Vec4d(nv->getEyePoint(), 1). This works. But it won't work for cases when there's more than 1 Transfrom on the nodepath. That's why I was trying osg::computeLocalToWorld. The best thing would be to get the eye point in world coordinates directly without having to calculate it repeatedly from local coordinates in each drawable's CullCallback. Any suggestions? Also I want to reply to some response made to other questions I have submitted. How do I do that? Thank you, Jeff Computer Sciences Corporation Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA Registered in USA No: C-489-59 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org