GeoPoint3D.cpp 1.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#include "GeoPoint3D.h"

GeoPoint3D::GeoPoint3D(QObject *parent)
    : QObject(parent), ROSGeoPoint() {}

GeoPoint3D::GeoPoint3D(double latitude, double longitude, double altitude, QObject *parent)
    : QObject(parent), ROSGeoPoint(latitude, longitude, altitude)
{}

GeoPoint3D::GeoPoint3D(const GeoPoint3D &p, QObject *parent)
    : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
{}

GeoPoint3D::GeoPoint3D(const ROSGeoPoint &p, QObject *parent)
    : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
{}

GeoPoint3D::GeoPoint3D(const QGeoCoordinate &p, QObject *parent)
    : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
{}

GeoPoint3D *GeoPoint3D::Clone() const
{
    return new GeoPoint3D(*this);
}

GeoPoint3D &GeoPoint3D::operator=(const GeoPoint3D &p)
{
    this->setLatitude(p.latitude());
    this->setLongitude(p.longitude());
    this->setAltitude(p.altitude());

    return *this;
}
GeoPoint3D &GeoPoint3D::operator=(const QGeoCoordinate &p)
{
    this->setLatitude(p.latitude());
    this->setLongitude(p.longitude());
    this->setAltitude(p.altitude());

    return *this;
}