1
0
Fork 0

viewer position: tie variables directly, rather than getter functions

This commit is contained in:
mfranz 2008-12-20 12:49:37 +00:00
parent f382f053ff
commit 163e593331
2 changed files with 4 additions and 6 deletions

View file

@ -212,9 +212,10 @@ FGViewMgr::bind ()
&FGViewMgr::getNear_m, &FGViewMgr::setNear_m);
fgSetArchivable("/sim/current-view/ground-level-nearplane-m");
fgTie("/sim/current-view/viewer-x-m", this, &FGViewMgr::getViewerPositionX_m);
fgTie("/sim/current-view/viewer-y-m", this, &FGViewMgr::getViewerPositionY_m);
fgTie("/sim/current-view/viewer-z-m", this, &FGViewMgr::getViewerPositionZ_m);
SGPropertyNode *n = fgGetNode("/sim/current-view", true);
n->tie("viewer-x-m", SGRawValuePointer<double>(&abs_viewer_position[0]));
n->tie("viewer-y-m", SGRawValuePointer<double>(&abs_viewer_position[1]));
n->tie("viewer-z-m", SGRawValuePointer<double>(&abs_viewer_position[2]));
}
void

View file

@ -147,9 +147,6 @@ private:
void setViewAxisLat (double axis);
int getView () const;
void setView (int newview);
double getViewerPositionX_m () const { return abs_viewer_position[0]; }
double getViewerPositionY_m () const { return abs_viewer_position[1]; }
double getViewerPositionZ_m () const { return abs_viewer_position[2]; }
SGPropertyNode_ptr view_number;
vector<SGPropertyNode_ptr> config_list;