2020-03-08 02:22:20 +01:00
|
|
|
#ifndef VIEW_H
|
|
|
|
#define VIEW_H
|
|
|
|
|
|
|
|
#include "AircraftData.h"
|
|
|
|
|
|
|
|
class View {
|
|
|
|
|
|
|
|
AircraftData *aircraftData;
|
|
|
|
|
|
|
|
public:
|
|
|
|
int screenDist(float d);
|
|
|
|
void pxFromLonLat(float *dx, float *dy, float lon, float lat);
|
|
|
|
void latLonFromScreenCoords(float *lat, float *lon, int x, int y);
|
|
|
|
void screenCoords(int *outX, int *outY, float dx, float dy);
|
|
|
|
int outOfBounds(int x, int y);
|
|
|
|
void drawPlaneOffMap(int x, int y, int *returnx, int *returny, SDL_Color planeColor);
|
|
|
|
void drawPlaneIcon(int x, int y, float heading, SDL_Color planeColor);
|
2020-03-13 00:56:26 +01:00
|
|
|
void drawTrail(Aircraft *p);
|
2020-03-08 02:22:20 +01:00
|
|
|
void drawScaleBars();
|
|
|
|
void drawPolys(QuadTree *tree, float screen_lat_min, float screen_lat_max, float screen_lon_min, float screen_lon_max);
|
|
|
|
void drawGeography();
|
|
|
|
void drawSignalMarks(Aircraft *p, int x, int y);
|
|
|
|
void drawPlaneText(Aircraft *p);
|
|
|
|
void drawSelectedAircraftText(Aircraft *p);
|
|
|
|
void resolveLabelConflicts();
|
|
|
|
void drawPlanes();
|
|
|
|
void animateCenterAbsolute(float x, float y);
|
|
|
|
void moveCenterAbsolute(float x, float y);
|
|
|
|
void moveCenterRelative(float dx, float dy);
|
|
|
|
void zoomMapToTarget();
|
|
|
|
void moveMapToTarget();
|
|
|
|
void drawMouse();
|
|
|
|
void registerClick();
|
|
|
|
void draw();
|
|
|
|
|
|
|
|
View(AircraftData *aircraftData);
|
2020-03-08 05:28:55 +01:00
|
|
|
|
|
|
|
bool metric;
|
2020-03-08 02:22:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|