Ignore:
Timestamp:
Feb 13, 2011, 6:08:42 PM (13 years ago)
Author:
Torben Dannhauer
Message:

Reloaced eventhandler and manipulator in a dedicated manipulator and tracking class (preparation for automatic tracking by extLink)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/trunk/include/core/visual_core.h

    r228 r231  
    2424#include <osg/Referenced>
    2525#include <osg/Notify>
    26 
    2726#include <osgViewer/Viewer>
    28 
    2927#include <osgDB/ReadFile>
    3028
    31 // OSG eventhandler
    32 #include <osgViewer/ViewerEventHandlers>
     29// Manipulator and eventhandler
     30#include <core_manipulator.h>
    3331
    34 // OSG manipulator
    35 #include <osgGA/TrackballManipulator>
    36 #include <osgGA/FlightManipulator>
    37 #include <osgGA/DriveManipulator>
    38 #include <osgGA/KeySwitchMatrixManipulator>
    39 #include <osgGA/StateSetManipulator>
    40 #include <osgGA/AnimationPathManipulator>
    41 #include <osgGA/TerrainManipulator>
    42 #include <osgGA/NodeTrackerManipulator>
    43 
    44 // Spacenavigator manipulator
    45 #ifdef USE_SPACENAVIGATOR
    46 #include <manip_spaceMouse.h>
    47 #include <manip_nodeTrackerSpaceMouse.h>
    48 #include <manip_freeSpaceMouse.h>
    49 #endif
    50 
    51 // Object mounted manipulator
    52 #include <manip_objectMounted.h>
    5332
    5433#ifdef USE_DISTORTION
     
    8564#endif
    8665
     66
     67
    8768// Test
    8869#include <dataIO_transportContainer.h>
     
    10586        void shutdown();
    10687
    107         void addManipulators();
    10888        void parseScenery(xmlNode * a_node);
    10989        bool loadTerrain(osg::ArgumentParser& arguments_);
     
    11191
    11292        void setupScenery();
    113         void trackNode( osg::Node* node_ );
    114         void trackNode( int trackingID );
    115         int getCurrentTrackingID(){return currentTrackingID;};
    11693
    11794protected:
     95        /**
     96         * \brief Destrcutor
     97         *
     98         */
    11899        virtual ~visual_core(void);
    119100
    120 
    121101private:
     102        /**
     103         * \brief This function starts the main rendering loop
     104         *
     105         */
    122106        void mainLoop();
    123107
     
    143127
    144128
    145 #ifdef USE_SPACENAVIGATOR
    146         /**
    147          * Spacemouse node tracker manipulator
    148          */
    149         osg::ref_ptr<NodeTrackerSpaceMouse> mouseTrackerManip;
    150 
    151         /**
    152          * Space mouse hardware driver instance
    153          */
    154         SpaceMouse* mouse;
    155 #endif
    156 
    157         /**
    158          * This Matrix manipulator is used for controlling Camera by Nodes.
    159          */
    160         osg::ref_ptr<objectMountedManipulator> objectMountedCameraManip;
    161 
    162129
    163130#ifdef USE_SKY_SILVERLINING
     
    181148        osg::ref_ptr<visual_object> testObj;
    182149
    183         osg::ref_ptr<osgGA::NodeTrackerManipulator> nt;
    184 
    185150        osg::ref_ptr<visual_debug_hud> hud;
    186151
    187         int currentTrackingID;
     152        osg::ref_ptr<core_manipulator> manipulators;
    188153};
    189154
Note: See TracChangeset for help on using the changeset viewer.