1
0
Fork 0

Merge branch 'jmt/cleanup' into next

This commit is contained in:
Tim Moore 2009-09-18 21:56:38 +02:00
commit a9c47780a8
4 changed files with 21 additions and 25 deletions

View file

@ -12,7 +12,7 @@
#include <simgear/math/SGMath.hxx>
#include <Main/globals.hxx>
////////////////////////////////////////////////////////////////////////
// Property management.
////////////////////////////////////////////////////////////////////////

View file

@ -25,12 +25,7 @@
#ifndef _VIEWER_HXX
#define _VIEWER_HXX
#ifndef __cplusplus
# error This library requires C++
#endif
#define _VIEWER_HXX
namespace flightgear
{

View file

@ -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,7 +341,13 @@ FGViewMgr::copyToCurrent()
get_current_view()->getInternal());
}
void
FGViewMgr::add_view( FGViewer * v )
{
views.push_back(v);
v->init();
}
double
FGViewMgr::getViewHeadingOffset_deg () const
{

View file

@ -28,16 +28,13 @@
#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;
#include <Main/viewer.hxx> // FIXME - remove inlines here.
// forward decls
class FGViewer;
typedef SGSharedPtr<FGViewer> FGViewerPtr;
// Define a structure containing view information
class FGViewMgr : public SGSubsystem
@ -98,10 +95,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 +145,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;