osg for android 学习之九:相机

来源:互联网 发布:erp软件是什么 编辑:程序博客网 时间:2024/04/20 00:57

Camera设置viewMatrix和projectionMatrix,使用setViewMatrix和setProjectionMatrix不管用,原因可能是:

If you are setting your own view matrix then do not register a camera manipulator with the viewer, and avoid calling viewer.run() as it’ll attach one automatically, so just use an expanded frame loop. i.e.

                viewer.realize();

                while(!viewer.done())

                {

        Viewer.getCamera->setViewMatrix(viewMatrix);

        Viewer.getCamera->setProjectionMatrix(projectionMatrix);

        Viewer.frame();

}

原创粉丝点击