source: osgVisual/include/core/visual_core.h @ 57

Last change on this file since 57 was 57, checked in by Torben Dannhauer, 14 years ago

corrected cluster/dataIO_clusterUDP.h and extLink/dataIO_extLinkDummy.h and extLink/dataIO_extLinkVCL.h to be able to use it in any combination.h

File size: 3.9 KB
Line 
1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2010 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#include <osg/Referenced>
19#include <osg/notify>
20
21#include <osgViewer/Viewer>
22
23#include <osgDB/ReadFile>
24
25// OSG eventhandler
26#include <osgViewer/ViewerEventHandlers>
27
28// OSG manipulator
29#include <osgGA/TrackballManipulator>
30#include <osgGA/FlightManipulator>
31#include <osgGA/DriveManipulator>
32#include <osgGA/KeySwitchMatrixManipulator>
33#include <osgGA/StateSetManipulator>
34#include <osgGA/AnimationPathManipulator>
35#include <osgGA/TerrainManipulator>
36#include <osgGA/NodeTrackerManipulator>
37
38// Spacenavigator manipulator
39#ifdef USE_SPACENAVIGATOR
40#include <manip_spaceMouse.h>
41#include <manip_nodeTrackerSpaceMouse.h>
42#include <manip_freeSpaceMouse.h>
43#endif
44
45// Object mounted manipulator
46#include <manip_objectMounted.h>
47
48#ifdef USE_DISTORTION
49// Distortion
50#include <visual_distortion.h>
51#endif
52
53#ifdef USE_SKY_SILVERLINING
54// Sky
55#include <visual_skySilverlining.h>
56#endif
57
58// DataIO
59#include <visual_dataIO.h>
60#include <object_updater.h>
61
62// visual_object
63#include <visual_object.h>
64
65// visual_hud
66#include <visual_hud.h>
67#include <visual_debug_hud.h>
68
69// visual_draw2D
70#include <visual_draw2D.h>
71#include <visual_draw3D.h>
72
73// visual util
74#include <visual_util.h>
75
76// visual_vista2D
77#ifdef USE_VISTA2D
78#include <visual_vista2D.h>
79#endif
80
81// Test
82#include <dataIO_transportContainer.h>
83#include <osgDB/OutputStream>
84#include <iostream>
85
86
87
88
89namespace osgVisual
90{
91
92class visual_core : public osg::Referenced
93{
94public:
95        visual_core(osg::ArgumentParser& arguments_);
96        void initialize();
97        void shutdown();
98
99        void addManipulators();
100        void processCommandlineArguments();
101        bool loadTerrain(osg::ArgumentParser& arguments_);
102        bool checkCommandlineArgumentsForFinalErrors();
103
104        void setupScenery();
105       
106protected:
107        virtual ~visual_core(void);
108
109
110private:
111        void mainLoop();
112
113        /**
114         * Argument object, with contains all commandline arguments, which where called during programm sstartup
115         */ 
116        osg::ArgumentParser& arguments;
117
118        /**
119         * This CSN is at the top node on the complete scenery. Only the nodes for distortion are located above this node.
120         */ 
121        osg::ref_ptr<osg::CoordinateSystemNode> rootNode;
122
123        /**
124         * Reference pointer to the viewer instance. The viewer is the core of the graphical subsystem.
125         */ 
126        osg::ref_ptr<osgViewer::Viewer> viewer;
127
128#ifdef USE_SPACENAVIGATOR
129        /**
130         * Spacemouse node tracker manipulator
131         */ 
132        osg::ref_ptr<NodeTrackerSpaceMouse> mouseTrackerManip;
133
134        /**
135         * Space mouse hardware driver instance
136         */ 
137        SpaceMouse* mouse;
138#endif
139
140        /**
141         * This Matrix manipulator is used for controlling Camera by Nodes.
142         */ 
143        osg::ref_ptr<objectMountedManipulator> objectMountedCameraManip;
144
145
146#ifdef USE_SKY_SILVERLINING
147        /**
148         * Silverlining Sky instance
149         */ 
150        osg::ref_ptr<visual_skySilverLining> sky;
151#endif
152
153#ifdef USE_DISTORTION
154        /**
155         * Distortion instance.
156         */ 
157        osg::ref_ptr<visual_distortion> distortion;
158#endif
159
160        osg::ref_ptr<visual_object> testObj;
161
162        osg::ref_ptr<osgGA::NodeTrackerManipulator> nt;
163};
164
165}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.