You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#ifndef SHOWPLANE3D_H
|
|
#define SHOWPLANE3D_H
|
|
|
|
#include <QObject>
|
|
#include <QVector>
|
|
#include <QTimer>
|
|
#include "scenecontrol.h"
|
|
#include "Engine/UGRecordset.h"
|
|
using namespace UGC;
|
|
|
|
class ShowPlane3D : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ShowPlane3D(QObject *parent = nullptr);
|
|
ShowPlane3D(SceneControl* m_pSceneControl,UGDatasetVector* dv);
|
|
|
|
//显示飞机模型
|
|
void displayPlane(QVector<double> lon,QVector<double> lat,QVector<double> height);
|
|
//设置显示的飞机数量
|
|
void setPlanesCount(int n);
|
|
|
|
void startFly(); //开始飞行
|
|
void stopFly(); //停止飞行
|
|
void setRefreshTime(int ms); //设置刷新间隔
|
|
|
|
signals:
|
|
|
|
private slots:
|
|
|
|
private:
|
|
SceneControl* m_pSceneControl;
|
|
UGDatasetVector* dv;
|
|
UGRecordsetPtr res;
|
|
QTimer m_timer;
|
|
int n_planes;
|
|
UGLayer3D* planeLayer;
|
|
|
|
QVector<double> lons;
|
|
QVector<double> lats;
|
|
QVector<double> heights;
|
|
|
|
void movePlane(QVector<double> lon, QVector<double> lat, QVector<double> height);
|
|
|
|
void deletePlane();
|
|
|
|
void addPlane();
|
|
};
|
|
|
|
#endif // SHOWPLANE3D_H
|