Moved SimpleViewer and GraphicsWindow into their own osgViewer library, updated simpleviewer examples to reflect this change

This commit is contained in:
Robert Osfield
2006-11-02 12:27:15 +00:00
parent f9fb99dc43
commit e0f395fd07
35 changed files with 470 additions and 117 deletions

View File

@@ -14,7 +14,6 @@ CXXFILES = \
GUIEventHandler.cpp\
KeySwitchMatrixManipulator.cpp\
StateSetManipulator.cpp\
SimpleViewer.cpp\
TerrainManipulator.cpp\
NodeTrackerManipulator.cpp\
TrackballManipulator.cpp\
@@ -22,7 +21,7 @@ CXXFILES = \
DEF += -DOSGGA_LIBRARY
LIBS += -losgDB -losgUtil -losg $(GL_LIBS) $(OTHER_LIBS)
LIBS += -losgUtil -losg $(GL_LIBS) $(OTHER_LIBS)
TARGET_BASENAME = osgGA
LIB = $(LIB_PREFIX)$(TARGET_BASENAME).$(LIB_EXT)

16
src/osgViewer/GNUmakefile Normal file
View File

@@ -0,0 +1,16 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES = \
SimpleViewer.cpp\
Version.cpp\
DEF += -DOSGVIEWER_LIBRARY
LIBS += -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(OTHER_LIBS)
TARGET_BASENAME = osgViewer
LIB = $(LIB_PREFIX)$(TARGET_BASENAME).$(LIB_EXT)
include $(TOPDIR)/Make/makerules

View File

@@ -11,10 +11,9 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgGA/SimpleViewer>
#include <osgGA/TrackballManipulator>
#include <osgViewer/SimpleViewer>
using namespace osgGA;
using namespace osgViewer;
SimpleViewer::SimpleViewer():
_firstFrame(true)
@@ -80,7 +79,7 @@ const osg::CameraNode* SimpleViewer::getCamera() const
return _sceneView->getCamera();
}
void SimpleViewer::setCameraManipulator(MatrixManipulator* manipulator)
void SimpleViewer::setCameraManipulator(osgGA::MatrixManipulator* manipulator)
{
if (_cameraManipulator == manipulator) return;
@@ -94,7 +93,7 @@ void SimpleViewer::setCameraManipulator(MatrixManipulator* manipulator)
}
}
void SimpleViewer::addEventHandler(GUIEventHandler* eventHandler)
void SimpleViewer::addEventHandler(osgGA::GUIEventHandler* eventHandler)
{
_eventHandlers.push_back(eventHandler);
}

12
src/osgViewer/Version.cpp Normal file
View File

@@ -0,0 +1,12 @@
#include <osgGA/Version>
const char* osgGAGetVersion()
{
return "1.2";
}
const char* osgGAGetLibraryName()
{
return "OpenSceneGraph Gui Adapter Library";
}