本文整理汇总了C++中GeoDataLatLonAltBox::altitudeMode方法的典型用法代码示例。如果您正苦于以下问题:C++ GeoDataLatLonAltBox::altitudeMode方法的具体用法?C++ GeoDataLatLonAltBox::altitudeMode怎么用?C++ GeoDataLatLonAltBox::altitudeMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoDataLatLonAltBox
的用法示例。
在下文中一共展示了GeoDataLatLonAltBox::altitudeMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testPack
void TestGeoDataLatLonAltBox::testPack() {
QFETCH(GeoDataCoordinates, coordinates);
GeoDataLatLonAltBox const original = GeoDataLatLonAltBox(coordinates);
QBuffer buffer;
bool const isOpenForWriting = buffer.open(QBuffer::WriteOnly);
QVERIFY(isOpenForWriting);
QDataStream out(&buffer);
original.pack(out);
buffer.close();
bool const isOpenForReading = buffer.open(QBuffer::ReadOnly);
QVERIFY(isOpenForReading);
QDataStream in(&buffer);
GeoDataLatLonAltBox unpacked;
unpacked.unpack(in);
buffer.close();
#if 0
QCOMPARE(unpacked.north(), original.north());
QCOMPARE(unpacked.south(), original.south());
QCOMPARE(unpacked.east(), original.east());
QCOMPARE(unpacked.west(), original.west());
#endif
QCOMPARE(unpacked.maxAltitude(), original.maxAltitude());
QCOMPARE(unpacked.minAltitude(), original.minAltitude());
QCOMPARE(unpacked.altitudeMode(), original.altitudeMode());
}
示例2: testDefaultConstruction
void TestGeoDataLatLonAltBox::testDefaultConstruction()
{
GeoDataLatLonBox const latLonBox;
QCOMPARE( latLonBox.north(), 0.0 );
QCOMPARE( latLonBox.south(), 0.0 );
QCOMPARE( latLonBox.east(), 0.0 );
QCOMPARE( latLonBox.west(), 0.0 );
QCOMPARE( latLonBox.rotation(), 0.0 );
QCOMPARE( latLonBox.width(), 0.0 );
QCOMPARE( latLonBox.height(), 0.0 );
QVERIFY( !latLonBox.crossesDateLine() );
QCOMPARE( latLonBox.center(), GeoDataCoordinates( 0, 0 ) );
QVERIFY( latLonBox.isNull() );
QVERIFY( latLonBox.isEmpty() );
QVERIFY( (latLonBox|latLonBox).isNull() );
QVERIFY( (latLonBox|latLonBox).isEmpty() );
QVERIFY( !latLonBox.intersects( latLonBox ) );
GeoDataLatLonAltBox const latLonAltBox;
QCOMPARE( latLonAltBox.north(), 0.0 );
QCOMPARE( latLonAltBox.south(), 0.0 );
QCOMPARE( latLonAltBox.east(), 0.0 );
QCOMPARE( latLonAltBox.west(), 0.0 );
QCOMPARE( latLonAltBox.rotation(), 0.0 );
QCOMPARE( latLonAltBox.width(), 0.0 );
QCOMPARE( latLonAltBox.height(), 0.0 );
QVERIFY( !latLonAltBox.crossesDateLine() );
QCOMPARE( latLonAltBox.center(), GeoDataCoordinates( 0, 0, 0 ) );
QVERIFY( latLonAltBox.isNull() );
QVERIFY( latLonAltBox.isEmpty() );
QCOMPARE( latLonAltBox.minAltitude(), 0.0 );
QCOMPARE( latLonAltBox.maxAltitude(), 0.0 );
QCOMPARE( latLonAltBox.altitudeMode(), ClampToGround );
QVERIFY( (latLonAltBox|latLonAltBox).isNull() );
QVERIFY( (latLonAltBox|latLonAltBox).isEmpty() );
QVERIFY( !latLonAltBox.intersects( latLonAltBox ) );
}