#pragma once /* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer * * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. * * osgVisual requires for some proprietary modules a license from the correspondig manufacturer. * You have to aquire licenses for all used proprietary modules. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ #include #include #include #include // OSG eventhandler #include // OSG manipulator #include #include #include #include #include #include #include #include // Spacenavigator manipulator #ifdef USE_SPACENAVIGATOR #include #include #include #endif // Object mounted manipulator #include #ifdef USE_DISTORTION // Distortion #include #endif #ifdef USE_SKY_SILVERLINING // Sky #include #endif // DataIO #include #include // visual_object #include // visual_hud #include #include // visual_draw2D #include #include // visual util #include // visual_vista2D #ifdef USE_VISTA2D #include #endif // Test #include #include #include namespace osgVisual { class visual_core : public osg::Referenced { public: visual_core(osg::ArgumentParser& arguments_); void initialize(); void shutdown(); void addManipulators(); bool loadTerrain(osg::ArgumentParser& arguments_); bool checkCommandlineArgumentsForFinalErrors(); void setupScenery(); protected: virtual ~visual_core(void); private: void mainLoop(); /** * Argument object, with contains all commandline arguments, which where called during programm sstartup */ osg::ArgumentParser& arguments; /** * This CSN is at the top node on the complete scenery. Only the nodes for distortion are located above this node. */ osg::ref_ptr rootNode; /** * Reference pointer to the viewer instance. The viewer is the core of the graphical subsystem. */ osg::ref_ptr viewer; #ifdef USE_SPACENAVIGATOR /** * Spacemouse node tracker manipulator */ osg::ref_ptr mouseTrackerManip; /** * Space mouse hardware driver instance */ SpaceMouse* mouse; #endif /** * This Matrix manipulator is used for controlling Camera by Nodes. */ osg::ref_ptr objectMountedCameraManip; #ifdef USE_SKY_SILVERLINING /** * Silverlining Sky instance */ osg::ref_ptr sky; #endif #ifdef USE_DISTORTION /** * Distortion instance. */ osg::ref_ptr distortion; #endif osg::ref_ptr testObj; osg::ref_ptr nt; }; } // END NAMESPACE