On 7/5/2011 10:10 AM, Glenn Waldron wrote:
I usually pull them from the CullVisitor/CullStack during the cull traversal.
Right -- During cull you can access these from the CullVisitor:
osg::RefMatrix* view = cv->getModelViewMatrix();
const osg::Camera* cam = cv->getCurrentCamera();
const osg::Matrix& proj = cam->getProjectionMatrix();
const osg::Viewport* vp = cam->getViewport();
If you're trying to get these during draw, you need to get them from osg::State:
const osg::State* state = renderInfo.getState();
const osg::Matrix& view = getModelViewMatrix();
const osg::Matrix& proj = getProjectionMatrix();
const Viewport* vp = getCurrentViewport();
-Paul
Glenn Waldron / Pelican Mapping / @glennwaldron
On Tue, Jul 5, 2011 at 12:01 PM, Jeremy Moles <[email protected]
<mailto:[email protected]>> wrote:
Hey guys, I have a really quick question. I'm trying to debug a piece of
code and what I need is access to the current MV/Proj matrices as
affected by the Viewer's active camera.
I see that they can both be queried from an osg::State object, though
I've never had to interface directly with this.
Does anyone have any quick tricks?
_______________________________________________
osg-users mailing list
[email protected]
<mailto:[email protected]>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org