Hi Geo,

The camera callback will be called on each frame.  Or if you don't want to
use a callback you can simply roll your own frame loop and do the setting
there.

Robert.

On Wed, Sep 9, 2009 at 3:28 AM, Geo Xin <[email protected]> wrote:

> Hi,
> osg::Matrixd mt;
> mt->setUpdateCallback (New UpdateNode(camera));
>
> class UpdateNode::: public osg::NodeCallback
> {
> osg::camera* camera;
> UpdateNode(*camera)
> {camera=camera;}
> operate(osg::Node* node, osg::NodeVisitor* nv)
> {
> mt=camera->getMatrix();
> traverse(osg::Node* node, osg::NodeVisitor* nv);
> }
> }
>
> If can I use this way to get the camera in every Callback?
>
> If not,how can I get the camera in UpdateCallback Node everytime?
>
> Thank you!
>
> Cheers,
> GeoXY
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=17166#17166
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to