Hi friends, I have an osg::Drawable::DrawCallback, and therein I am calculating the distance from the camera to the Drawable's centroid. Like so:
osg::BoundingBox bbox = drawable->getBoundingBox(); osg::Vec3f centerInView = bbox.center() * ri.getState()->getModelViewMatrix(); float distanceToCenter = -centerInView.z(); This works great! ...until I try to use it with an RTT camera that uses ABSOLUTE_RF_INHERIT_VIEWPOINT. Then, the State's modelview matrix is that of the RTT camera, not the reference camera. Is there any way to get to the reference camera's MV matrix in this scenario? Glenn Waldron / Pelican Mapping / @glennwaldron
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org