Kill off many Point3D includes, and a couple of uses in the HUD code.
Requires a SimGear update to get some new SGGeodesy helpers.
This commit is contained in:
parent
82bfb6a08d
commit
0f4f044a94
22 changed files with 17 additions and 55 deletions
|
@ -22,7 +22,6 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/route/waypoint.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <Main/globals.hxx>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/sg_random.h>
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/scene/model/modellib.hxx>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/math/SGMath.hxx>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/scene/model/placement.hxx>
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <Main/globals.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <Main/globals.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <Main/globals.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <Main/globals.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
#include <string>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include <Main/globals.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/sound/soundmgr_openal.hxx>
|
||||
#include <math.h>
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#ifndef _FG_AI_PLANE_HXX
|
||||
#define _FG_AI_PLANE_HXX
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
|
||||
#include "AIEntity.hxx"
|
||||
#include "ATC.hxx"
|
||||
|
||||
|
|
|
@ -386,12 +386,10 @@ bool runway_instr::boundOutsidePoints(sgdVec3& v, sgdVec3& m)
|
|||
|
||||
void runway_instr::drawArrow()
|
||||
{
|
||||
Point3D ac(0.0), rwy(0.0);
|
||||
ac.setlat(current_aircraft.fdm_state->get_Latitude_deg());
|
||||
ac.setlon(current_aircraft.fdm_state->get_Longitude_deg());
|
||||
rwy.setlat(runway->latitude());
|
||||
rwy.setlon(runway->longitude());
|
||||
float theta = GetHeadingFromTo(ac, rwy);
|
||||
SGGeod acPos(SGGeod::fromDeg(
|
||||
fgGetDouble("/position/longitude-deg"),
|
||||
fgGetDouble("/position/latitude-deg")));
|
||||
float theta = SGGeodesy::courseDeg(acPos, runway->geod());
|
||||
theta -= fgGetDouble("/orientation/heading-deg");
|
||||
theta = -theta;
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
@ -419,13 +417,11 @@ void runway_instr::drawArrow()
|
|||
void runway_instr::setLineWidth()
|
||||
{
|
||||
//Calculate the distance from the runway, A
|
||||
double course, distance;
|
||||
calc_gc_course_dist(Point3D(runway->longitude() * SGD_DEGREES_TO_RADIANS,
|
||||
runway->latitude() * SGD_DEGREES_TO_RADIANS, 0.0),
|
||||
Point3D(current_aircraft.fdm_state->get_Longitude(),
|
||||
current_aircraft.fdm_state->get_Latitude(), 0.0 ),
|
||||
&course, &distance);
|
||||
distance *= SG_METER_TO_NM;
|
||||
SGGeod acPos(SGGeod::fromDeg(
|
||||
fgGetDouble("/position/longitude-deg"),
|
||||
fgGetDouble("/position/latitude-deg")));
|
||||
double distance = SGGeodesy::distanceNm(acPos, runway->geod());
|
||||
|
||||
//Get altitude above runway, B
|
||||
double alt_nm = get_agl();
|
||||
static const SGPropertyNode *startup_units_node = fgGetNode("/sim/startup/units");
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#endif
|
||||
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
|
||||
#include <Aircraft/controls.hxx>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#endif
|
||||
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
|
||||
#include <Aircraft/controls.hxx>
|
||||
|
|
|
@ -377,12 +377,10 @@ bool HUD::Runway::boundOutsidePoints(sgdVec3& v, sgdVec3& m)
|
|||
|
||||
void HUD::Runway::drawArrow()
|
||||
{
|
||||
Point3D ac(0.0), rwy(0.0);
|
||||
ac.setlat(current_aircraft.fdm_state->get_Latitude_deg());
|
||||
ac.setlon(current_aircraft.fdm_state->get_Longitude_deg());
|
||||
rwy.setlat(_runway->latitude());
|
||||
rwy.setlon(_runway->longitude());
|
||||
float theta = GetHeadingFromTo(ac, rwy);
|
||||
SGGeod acPos(SGGeod::fromDeg(
|
||||
fgGetDouble("/position/longitude-deg"),
|
||||
fgGetDouble("/position/latitude-deg")));
|
||||
float theta = SGGeodesy::courseDeg(acPos, _runway->geod());
|
||||
theta -= fgGetDouble("/orientation/heading-deg");
|
||||
theta = -theta;
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
@ -411,13 +409,10 @@ void HUD::Runway::drawArrow()
|
|||
void HUD::Runway::setLineWidth()
|
||||
{
|
||||
//Calculate the distance from the runway, A
|
||||
double course, distance;
|
||||
calc_gc_course_dist(Point3D(_runway->longitude() * SGD_DEGREES_TO_RADIANS,
|
||||
_runway->latitude() * SGD_DEGREES_TO_RADIANS, 0.0),
|
||||
Point3D(current_aircraft.fdm_state->get_Longitude(),
|
||||
current_aircraft.fdm_state->get_Latitude(), 0.0 ),
|
||||
&course, &distance);
|
||||
distance *= SG_METER_TO_NM;
|
||||
SGGeod acPos(SGGeod::fromDeg(
|
||||
fgGetDouble("/position/longitude-deg"),
|
||||
fgGetDouble("/position/latitude-deg")));
|
||||
double distance = SGGeodesy::distanceNm(acPos, _runway->geod());
|
||||
//Get altitude above runway, B
|
||||
double alt_nm = _agl->getDoubleValue();
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/props/props.hxx>
|
||||
|
||||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
#ifndef __INSTRUMENTS_DME_HXX
|
||||
#define __INSTRUMENTS_DME_HXX 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error This library requires C++
|
||||
#endif
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/props/props.hxx>
|
||||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
#ifndef __INSTRUMENTS_TACAN_HXX
|
||||
#define __INSTRUMENTS_TACAN_HXX 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error This library requires C++
|
||||
#endif
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/props/props.hxx>
|
||||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/structure/exception.hxx>
|
||||
#include <simgear/structure/event_mgr.hxx>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/scene/model/location.hxx>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
using std::vector;
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/props/props.hxx>
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
#include <simgear/math/vector.hxx>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#define _TILEMGR_HXX
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/scene/model/location.hxx>
|
||||
|
||||
#include <simgear/bucket/newbucket.hxx>
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
#include <simgear/math/interpolater.hxx>
|
||||
#include <simgear/math/point3d.hxx>
|
||||
|
||||
|
||||
// Define a structure containing the global lighting parameters
|
||||
|
|
Loading…
Add table
Reference in a new issue