diff --git a/include/osgViewer/CompositeViewer b/include/osgViewer/CompositeViewer index 44d2373d8..6c8725762 100644 --- a/include/osgViewer/CompositeViewer +++ b/include/osgViewer/CompositeViewer @@ -29,10 +29,12 @@ class OSGVIEWER_EXPORT CompositeViewer : public osg::Referenced CompositeViewer(); virtual ~CompositeViewer(); - void addView(osgViewer* view); - osgViewer* getView(unsigned i) { return _views[i].get(); } - const osgViewer* getView(unsigned i) const { return _views[i].get(); } - void getNumViews() const { return _views.size(); } + void addView(osgViewer::View* view); + + osgViewer::View* getView(unsigned i) { return _views[i].get(); } + const osgViewer::View* getView(unsigned i) const { return _views[i].get(); } + + unsigned int getNumViews() const { return _views.size(); } /** Render a complete new frame. * Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameCullTraversal() and frameDrawTraversal(). @@ -57,7 +59,7 @@ class OSGVIEWER_EXPORT CompositeViewer : public osg::Referenced protected: - typedef std::vector< osg::ref_ptr > Views; + typedef std::vector< osg::ref_ptr > Views; Views _views; }; diff --git a/include/osgViewer/GraphicsWindow b/include/osgViewer/GraphicsWindow index 92c55b339..906a884b3 100644 --- a/include/osgViewer/GraphicsWindow +++ b/include/osgViewer/GraphicsWindow @@ -18,6 +18,7 @@ #include #include +#include #include diff --git a/include/osgViewer/View b/include/osgViewer/View index 3eff188b1..16cd5a6e9 100644 --- a/include/osgViewer/View +++ b/include/osgViewer/View @@ -18,13 +18,14 @@ #include #include +namespace osgViewer { + /** View holds a single view on a scene, this view may be composed of one or more slave cameras.*/ -class OSGVIEWER_EXPORT View : public virtual osg::View, public osgViewer::Scene +class OSGVIEWER_EXPORT View : public virtual osg::View, public virtual osgViewer::Scene { public: View(); - virtual ~View(); void setSceneData(osg::Node* node); osg::Node* getSceneData(); @@ -46,6 +47,7 @@ class OSGVIEWER_EXPORT View : public virtual osg::View, public osgViewer::Scene protected: + virtual ~View(); osg::ref_ptr _scene; @@ -55,4 +57,6 @@ class OSGVIEWER_EXPORT View : public virtual osg::View, public osgViewer::Scene }; +} + #endif diff --git a/include/osgViewer/Viewer b/include/osgViewer/Viewer index 4889a680f..fc5b6a05e 100644 --- a/include/osgViewer/Viewer +++ b/include/osgViewer/Viewer @@ -17,7 +17,7 @@ #include #include -namespace osgViewer{ +namespace osgViewer { // WARNING ** Under development do not use, yet :-) diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index 4626fe5b6..e41959456 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -15,7 +15,7 @@ using namespace osgViewer; -CompositeViewer::CompositeViewer(): +CompositeViewer::CompositeViewer() { } diff --git a/src/osgViewer/GNUmakefile b/src/osgViewer/GNUmakefile index 81e2f3cbb..301d9c0e0 100644 --- a/src/osgViewer/GNUmakefile +++ b/src/osgViewer/GNUmakefile @@ -4,8 +4,10 @@ include $(TOPDIR)/Make/makedefs CXXFILES = \ SimpleViewer.cpp\ - Scene.cpp\ View.cpp\ + Scene.cpp\ + Viewer.cpp\ + CompositeViewer.cpp\ Version.cpp\ DEF += -DOSGVIEWER_LIBRARY diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index bd38139b8..88a7a3842 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -15,7 +15,7 @@ using namespace osgViewer; -Viewer::Viewer(): +Viewer::Viewer() { }