Header clean-ups in viewer/view-mgr.
This commit is contained in:
parent
949981a6d7
commit
8b649b06c4
4 changed files with 19 additions and 27 deletions
|
@ -10,8 +10,6 @@
|
|||
|
||||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
#include <simgear/math/SGMath.hxx>
|
||||
|
||||
#include <Main/globals.hxx>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Property management.
|
||||
|
|
|
@ -27,11 +27,6 @@
|
|||
#ifndef _VIEWER_HXX
|
||||
#define _VIEWER_HXX
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error This library requires C++
|
||||
#endif
|
||||
|
||||
namespace flightgear
|
||||
{
|
||||
class CameraGroup;
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "viewmgr.hxx"
|
||||
|
||||
#include <string.h> // strcmp
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include <Model/acmodel.hxx>
|
||||
|
||||
#include "viewmgr.hxx"
|
||||
|
||||
#include <Main/viewer.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
|
||||
// Constructor
|
||||
FGViewMgr::FGViewMgr( void ) :
|
||||
|
@ -341,6 +341,12 @@ FGViewMgr::copyToCurrent()
|
|||
get_current_view()->getInternal());
|
||||
}
|
||||
|
||||
void
|
||||
FGViewMgr::add_view( FGViewer * v )
|
||||
{
|
||||
views.push_back(v);
|
||||
v->init();
|
||||
}
|
||||
|
||||
double
|
||||
FGViewMgr::getViewHeadingOffset_deg () const
|
||||
|
|
|
@ -28,16 +28,11 @@
|
|||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
#include <simgear/math/SGMath.hxx>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "fg_props.hxx"
|
||||
#include "viewer.hxx"
|
||||
|
||||
using std::vector;
|
||||
|
||||
// forward decls
|
||||
class FGViewer;
|
||||
typedef SGSharedPtr<FGViewer> FGViewerPtr;
|
||||
|
||||
// Define a structure containing view information
|
||||
class FGViewMgr : public SGSubsystem
|
||||
|
@ -98,10 +93,8 @@ public:
|
|||
// setters
|
||||
inline void clear() { views.clear(); }
|
||||
inline void set_view( const int v ) { current = v; }
|
||||
inline void add_view( FGViewer * v ) {
|
||||
views.push_back(v);
|
||||
v->init();
|
||||
}
|
||||
void add_view( FGViewer * v );
|
||||
|
||||
// copies current offset settings to current-view path...
|
||||
void copyToCurrent ();
|
||||
|
||||
|
@ -150,7 +143,7 @@ private:
|
|||
|
||||
SGPropertyNode_ptr view_number;
|
||||
vector<SGPropertyNode_ptr> config_list;
|
||||
typedef vector<SGSharedPtr<FGViewer> > viewer_list;
|
||||
typedef std::vector<FGViewerPtr> viewer_list;
|
||||
viewer_list views;
|
||||
SGVec3d abs_viewer_position;
|
||||
|
||||
|
|
Loading…
Reference in a new issue