remove unused headers.
clean up.
This commit is contained in:
parent
796e7daa96
commit
ae6006f350
1 changed files with 79 additions and 88 deletions
|
@ -1,9 +1,6 @@
|
|||
#ifndef _BEZNODE_H_
|
||||
#define _BEZNODE_H_
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
#include <memory>
|
||||
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
|
@ -11,6 +8,7 @@
|
|||
|
||||
#include "debug.hxx"
|
||||
|
||||
|
||||
inline double LinearDistance(const SGGeod& p0, const SGGeod& p1)
|
||||
{
|
||||
return SGGeodesy::distanceM(p0, p1);
|
||||
|
@ -18,7 +16,7 @@ inline double LinearDistance( const SGGeod& p0, const SGGeod& p1 )
|
|||
|
||||
inline SGGeod CalculateLinearLocation(const SGGeod& p0, const SGGeod& p1, double t)
|
||||
{
|
||||
// these are 2d approximations using lon, and lat as x,y cartesion coords
|
||||
// these are 2d approximations using lon, and lat as x,y cartesian coords
|
||||
// how expensive would this be to do in Geodetic math?
|
||||
SGVec2d v0 = SGVec2d(p0.getLongitudeDeg(), p0.getLatitudeDeg());
|
||||
SGVec2d v1 = SGVec2d(p1.getLongitudeDeg(), p1.getLatitudeDeg());
|
||||
|
@ -120,8 +118,7 @@ inline double CalculateTheta( const SGVec3d& dirCur, const SGVec3d& dirNext, con
|
|||
class BezNode
|
||||
{
|
||||
public:
|
||||
explicit BezNode( SGGeod l ) :
|
||||
loc(l)
|
||||
explicit BezNode(SGGeod l) : loc(l)
|
||||
{
|
||||
has_prev_cp = false;
|
||||
has_next_cp = false;
|
||||
|
@ -132,13 +129,11 @@ public:
|
|||
close = false;
|
||||
}
|
||||
|
||||
BezNode( double lat, double lon ) :
|
||||
BezNode(SGGeod::fromDeg(lon, lat))
|
||||
BezNode(double lat, double lon) : BezNode(SGGeod::fromDeg(lon, lat))
|
||||
{
|
||||
}
|
||||
|
||||
BezNode( SGGeod l, SGGeod cp ) :
|
||||
loc(l),
|
||||
BezNode(SGGeod l, SGGeod cp) : loc(l),
|
||||
prev_cp(Mirror(cp)),
|
||||
next_cp(cp)
|
||||
{
|
||||
|
@ -151,8 +146,7 @@ public:
|
|||
close = false;
|
||||
}
|
||||
|
||||
BezNode( double lat, double lon, double cp_lat, double cp_lon ) :
|
||||
BezNode(SGGeod::fromDeg(lon, lat), SGGeod::fromDeg(cp_lon, cp_lat))
|
||||
BezNode(double lat, double lon, double cp_lat, double cp_lon) : BezNode(SGGeod::fromDeg(lon, lat), SGGeod::fromDeg(cp_lon, cp_lat))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -241,9 +235,9 @@ public:
|
|||
void Print()
|
||||
{
|
||||
TG_LOG(SG_GENERAL, SG_DEBUG,
|
||||
"\tLoc: " << loc << "\n" <<
|
||||
"\tprev_cp: " << prev_cp << "\n" <<
|
||||
"\tnext_cp: " << next_cp << "\n" );
|
||||
"\tLoc: " << loc << "\n"
|
||||
<< "\tprev_cp: " << prev_cp << "\n"
|
||||
<< "\tnext_cp: " << next_cp << "\n");
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -263,6 +257,3 @@ private:
|
|||
// array of BezNodes make a contour
|
||||
typedef std::vector<std::shared_ptr<BezNode>> BezContour;
|
||||
typedef std::vector<BezContour> BezContourArray;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue