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