Hi David, The viewer has the masster Camera, to get the view martrix it's simple a case of:
viewer.getCamera()->getViewMatrix(); As for your seg fault, there isn't anyone can tell you exactly what wrong with no code in front of them, there are lots different mistakes you could have made. It would probably be best to go read the Quick Start Guide, you can download it as a pdf, just follow the links from the download page on openscenegraph.org. Robert. On Thu, Sep 17, 2009 at 9:05 PM, David Goering <[email protected]> wrote: > Hey, > I am trying to get the Cam Matrix and use it in calculations I do in an > update Callback. > One problem I am currently having is that I can't access the cam, and if I > define the Cam as a global variable I get segmentation fualts... most likely > because it hasn't been fully initialized yet ? > Anyway, I cant access the cams Matrix directly in the first place, I used > "asTransformMatrix()" and then on that I used .getMatrix() > What I really want to get is the inverse Camera Matrix. > But once I try and access the Matrix I get seg fault. > What is the best way to access the cams Matrix and any hints on finding seg > fault errors -.- > Sorry both a C++ and an OSG newb asking |-) > David > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=17471#17471 > > > > > > _______________________________________________ > osg-users mailing list > [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

