viewer position: tie variables directly, rather than getter functions
This commit is contained in:
parent
f382f053ff
commit
163e593331
2 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue