3 * Copyright (C) 2006 Mathias Froehlich
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 #ifndef SG_SCENE_UPDATEVISITOR_HXX
23 #define SG_SCENE_UPDATEVISITOR_HXX
25 #include <osg/NodeVisitor>
26 #include <osgUtil/UpdateVisitor>
28 #include <osg/io_utils>
30 class SGUpdateVisitor : public osgUtil::UpdateVisitor {
34 // setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
36 // virtual void apply(osg::Transform& transform)
38 // osg::Matrix matrix = mModelViewMatrix;
39 // transform.computeLocalToWorldMatrix(mModelViewMatrix, this);
41 // handle_callbacks_and_traverse(transform);
43 // mModelViewMatrix = matrix;
46 // virtual osg::Vec3 getEyePoint() const
48 // osg::Matrix matrix;
49 // matrix.invert(mModelViewMatrix);
50 // return matrix.preMult(osg::Vec3(0, 0, 0));
54 // osg::Matrix mModelViewMatrix;
57 // #include <osg/NodeCallback>
59 // class SGNodeCallback : public osg::NodeCallback {
61 // virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)