dialer_x = dialer_x + 170;
/* pitch */
- // HS1 = new FloatDial ( dialer_x, dialer_y, dialer_size, vec[1], Ytitle, 89.99f, -89.99f );
- HS1 = new FloatDial ( dialer_x, dialer_y, dialer_size, vec[1], Ytitle, 179.99f, -179.99f );
+ HS1 = new FloatDial ( dialer_x, dialer_y, dialer_size, vec[1], Ytitle, 89.99f, -89.99f );
/* radius */
HS2 = new FloatSlider ( slider_x, slider_y, slider_width, vec[2], Ztitle, 100.0f, 0.0f );
fgGetFloat("/sim/view[1]/default/pilot-offset/pitch-deg"),
fgGetFloat("/sim/view[1]/default/pilot-offset/radius-m")
);
+
PilotOffsetInit(v);
}
{
// Only one of these things for now
if( PO_vec == 0 ) {
- sgVec3Slider *PO = new sgVec3Slider ( 200, 200, vec, "Pilot Offset" );
+ /* make change so this gets done once for each vector */
+ fgSetFloat("/sim/view[1]/current/pilot-offset/heading-deg",fgGetFloat("/sim/view[1]/default/pilot-offset/heading-deg"));
+ fgSetFloat("/sim/view[1]/current/pilot-offset/pitch-deg",fgGetFloat("/sim/view[1]/default/pilot-offset/pitch-deg"));
+ fgSetFloat("/sim/view[1]/current/pilot-offset/radius-m",fgGetFloat("/sim/view[1]/default/pilot-offset/radius-m"));
+ sgVec3Slider *PO = new sgVec3Slider ( 200, 200, vec, "Pilot Offset" );
PO_vec = PO;
+ // Bindings for Pilot Offset
+ fgTie("/sim/view[1]/current/pilot-offset/heading-deg", getPilotOffsetHeadingDeg, setPilotOffsetHeadingDeg);
+ fgTie("/sim/view[1]/current/pilot-offset/pitch-deg", getPilotOffsetPitchDeg, setPilotOffsetPitchDeg);
+ fgTie("/sim/view[1]/current/pilot-offset/radius-m", getPilotOffsetRadiusM, setPilotOffsetRadiusM);
}
}
float PilotOffsetGetSetting( int opt );
#endif // _VEC3_SLIDER_H
+
+/* binding functions for chase view offset */
+
+static void
+setPilotOffsetHeadingDeg (float value)
+{
+ PilotOffsetSet(0, value);
+}
+
+static float
+getPilotOffsetHeadingDeg ()
+{
+ return( PilotOffsetGetSetting(0) );
+}
+
+
+static void
+setPilotOffsetPitchDeg (float value)
+{
+ PilotOffsetSet(1, value);
+}
+
+static float
+getPilotOffsetPitchDeg ()
+{
+ return( PilotOffsetGetSetting(1) );
+}
+
+
+static void
+setPilotOffsetRadiusM (float value)
+{
+ PilotOffsetSet(2, value);
+}
+
+static float
+getPilotOffsetRadiusM ()
+{
+ return( PilotOffsetGetSetting(2) );
+}
+