+ //////////////////////////////////////////////////////////////////////
+ // setter functions
+ //////////////////////////////////////////////////////////////////////
+ inline void set_fov( double amount ) { fov = amount; }
+ inline void set_win_ratio( double r ) { win_ratio = r; }
+ inline void set_view_offset( double a ) {
+ set_dirty();
+ view_offset = a;
+ }
+ inline void inc_view_offset( double amt ) {
+ set_dirty();
+ view_offset += amt;
+ }
+ inline void set_goal_view_offset( double a) {
+ set_dirty();
+ goal_view_offset = a;
+ while ( goal_view_offset < 0 ) {
+ goal_view_offset += 360.0;
+ }
+ while ( goal_view_offset > 360.0 ) {
+ goal_view_offset -= 360.0;
+ }
+ }
+ inline void set_reverse_view_offset( bool val ) {
+ reverse_view_offset = val;
+ }
+ inline void set_geod_view_pos( double lon, double lat, double alt ) {
+ // data should be in radians and meters asl
+ set_dirty();
+ // cout << "set_geod_view_pos = " << lon << ", " << lat << ", " << alt
+ // << endl;
+ sgdSetVec3( geod_view_pos, lon, lat, alt );
+ }
+ inline void set_pilot_offset( float x, float y, float z ) {
+ set_dirty();
+ sgSetVec3( pilot_offset, x, y, z );
+ }
+ inline void set_sea_level_radius( double r ) {
+ // data should be in meters from the center of the earth
+ set_dirty();
+ sea_level_radius = r;
+ }