&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);
}
void
fgUntie("/sim/current-view/axes/long");
fgUntie("/sim/current-view/axes/lat");
fgUntie("/sim/current-view/ground-level-nearplane-m");
+ fgUntie("/sim/current-view/viewer-x-m");
+ fgUntie("/sim/current-view/viewer-y-m");
+ fgUntie("/sim/current-view/viewer-z-m");
}
void
// Update the current view
do_axes();
view->update(dt);
+ abs_viewer_position = loop_view->getViewPosition();
}
void
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;
typedef vector<SGSharedPtr<FGViewer> > viewer_list;
viewer_list views;
+ SGVec3d abs_viewer_position;
int current;