1
0
Fork 0

Move FOV property into View

This commit is contained in:
James Turner 2016-01-20 21:14:58 -05:00
parent daf8c79705
commit ae1d96cdfb
3 changed files with 6 additions and 22 deletions

View file

@ -249,6 +249,11 @@ View::bind ()
false /* do not set current property value */);
fgSetArchivable("/sim/current-view/goal-roll-offset-deg");
_tiedProperties.Tie("field-of-view", this,
&View::get_fov, &View::set_fov);
fgSetArchivable("/sim/current-view/field-of-view");
// expose various quaternions under the debug/ subtree
_tiedProperties.Tie("debug/orientation-w", this, &View::getOrientation_w);
_tiedProperties.Tie("debug/orientation-x", this, &View::getOrientation_x);

View file

@ -147,10 +147,6 @@ FGViewMgr::do_bind()
(double_getter)0, &FGViewMgr::setViewAxisLat);
fgSetArchivable("/sim/current-view/axes/lat");
_tiedProperties.Tie("field-of-view", this,
&FGViewMgr::getFOV_deg, &FGViewMgr::setFOV_deg);
fgSetArchivable("/sim/current-view/field-of-view");
_tiedProperties.Tie("aspect-ratio-multiplier", this,
&FGViewMgr::getARM_deg, &FGViewMgr::setARM_deg);
fgSetArchivable("/sim/current-view/field-of-view");
@ -446,22 +442,6 @@ FGViewMgr::setView (int newview)
update(0.0);
}
double
FGViewMgr::getFOV_deg () const
{
const flightgear::View * view = get_current_view();
return (view == 0 ? 0 : view->get_fov());
}
void
FGViewMgr::setFOV_deg (double fov)
{
flightgear::View * view = get_current_view();
if (view != 0)
view->set_fov(fov);
}
double
FGViewMgr::getARM_deg () const
{

View file

@ -102,8 +102,7 @@ private:
void setViewTargetYOffset_m (double y);
double getViewTargetZOffset_m () const;
void setViewTargetZOffset_m (double z);
double getFOV_deg () const;
void setFOV_deg (double fov);
double getARM_deg () const; // Aspect Ratio Multiplier
void setARM_deg (double fov);
double getNear_m () const;