&FGViewMgr::getNear_m, &FGViewMgr::setNear_m);
fgSetArchivable("/sim/current-view/ground-level-nearplane-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
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
FGViewMgr::copyToCurrent()
{
SGPropertyNode *n = config_list[current];
+ fgSetString("/sim/current-view/name", n->getStringValue("name"));
+ fgSetString("/sim/current-view/type", n->getStringValue("type"));
// copy certain view config data for default values
fgSetDouble("/sim/current-view/config/heading-offset-deg",