]> git.mxchange.org Git - simgear.git/blob - simgear/scene/util/SGUpdateVisitor.hxx
Modified Files:
[simgear.git] / simgear / scene / util / SGUpdateVisitor.hxx
1 /* -*-c++-*-
2  *
3  * Copyright (C) 2006 Mathias Froehlich 
4  *
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.
9  *
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.
14  *
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,
18  * MA 02110-1301, USA.
19  *
20  */
21
22 #ifndef SG_SCENE_UPDATEVISITOR_HXX
23 #define SG_SCENE_UPDATEVISITOR_HXX
24
25 #include <osg/NodeVisitor>
26 #include <osgUtil/UpdateVisitor>
27
28 #include <osg/io_utils>
29
30 class SGUpdateVisitor : public osgUtil::UpdateVisitor {
31 public:
32   SGUpdateVisitor()
33   {
34 //     setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
35   }
36 //   virtual void apply(osg::Transform& transform)
37 //   {
38 //     osg::Matrix matrix = mModelViewMatrix;
39 //     transform.computeLocalToWorldMatrix(mModelViewMatrix, this);
40
41 //     handle_callbacks_and_traverse(transform);
42
43 //     mModelViewMatrix = matrix;
44 //   }
45
46 //   virtual osg::Vec3 getEyePoint() const
47 //   {
48 //     osg::Matrix matrix;
49 //     matrix.invert(mModelViewMatrix);
50 //     return matrix.preMult(osg::Vec3(0, 0, 0));
51 //   }
52
53 // protected:
54 //   osg::Matrix mModelViewMatrix;
55 };
56
57 // #include <osg/NodeCallback>
58
59 // class SGNodeCallback : public osg::NodeCallback {
60 // public:
61 //   virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
62 //   {
63 //   }
64 // };
65
66 #endif