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