[417] | 1 | #pragma once |
---|
| 2 | /* -*-c++-*- osgVisual - Copyright (C) 2009-2011 Torben Dannhauer |
---|
| 3 | * |
---|
| 4 | * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under |
---|
| 5 | * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or |
---|
| 6 | * (at your option) any later version. The full license is in LICENSE file |
---|
| 7 | * included with this distribution, and on the openscenegraph.org website. |
---|
| 8 | * |
---|
| 9 | * osgVisual requires for some proprietary modules a license from the correspondig manufacturer. |
---|
| 10 | * You have to aquire licenses for all used proprietary modules. |
---|
| 11 | * |
---|
| 12 | * This library is distributed in the hope that it will be useful, |
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 15 | * OpenSceneGraph Public License for more details. |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #include <osg/Referenced> |
---|
| 20 | #include <osg/Notify> |
---|
| 21 | #include <osgViewer/Viewer> |
---|
| 22 | #include <osgDB/ReadFile> |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | namespace osgVisual |
---|
| 27 | { |
---|
| 28 | |
---|
| 29 | class visual_core : public osg::Referenced |
---|
| 30 | { |
---|
| 31 | |
---|
| 32 | public: |
---|
| 33 | visual_core(osg::ArgumentParser& arguments_); |
---|
| 34 | void initialize(); |
---|
| 35 | void shutdown(); |
---|
| 36 | |
---|
| 37 | bool loadTerrain(osg::ArgumentParser& arguments_); |
---|
| 38 | bool checkCommandlineArgumentsForFinalErrors(); |
---|
| 39 | |
---|
| 40 | void setupScenery(); |
---|
| 41 | |
---|
| 42 | protected: |
---|
| 43 | /** |
---|
| 44 | * \brief Destrcutor |
---|
| 45 | * |
---|
| 46 | */ |
---|
| 47 | virtual ~visual_core(void); |
---|
| 48 | |
---|
| 49 | private: |
---|
| 50 | /** |
---|
| 51 | * \brief This function starts the main rendering loop |
---|
| 52 | * |
---|
| 53 | */ |
---|
| 54 | void mainLoop(); |
---|
| 55 | |
---|
| 56 | /** |
---|
| 57 | * Argument object, with contains all commandline arguments, which where called during programm sstartup |
---|
| 58 | */ |
---|
| 59 | osg::ArgumentParser& arguments; |
---|
| 60 | |
---|
| 61 | /** |
---|
| 62 | * This CSN is at the top node on the complete scenery. Only the nodes for distortion are located above this node. |
---|
| 63 | */ |
---|
| 64 | osg::ref_ptr<osg::CoordinateSystemNode> rootNode; |
---|
| 65 | |
---|
| 66 | /** |
---|
| 67 | * Reference pointer to the viewer instance. The viewer is the core of the graphical subsystem. |
---|
| 68 | */ |
---|
| 69 | osg::ref_ptr<osgViewer::Viewer> viewer; |
---|
| 70 | |
---|
| 71 | }; |
---|
| 72 | |
---|
| 73 | } // END NAMESPACE |
---|