mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Rename xbus to xswiftbus
Summary: I wanted to rename xbus because its relation to //swift// is not immediately clear from the name. xswiftbus seems reasonable. Reviewers: #swift_pilot_client, kbasan Reviewed By: kbasan Subscribers: kbasan, jenkins Tags: #swift_pilot_client Differential Revision: https://dev.swift-project.org/D14
This commit is contained in:
45
src/xswiftbus/terrainprobe.h
Normal file
45
src/xswiftbus/terrainprobe.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef BLACKSIM_XSWIFTBUS_ELEVATIONPROVIDER_H
|
||||
#define BLACKSIM_XSWIFTBUS_ELEVATIONPROVIDER_H
|
||||
|
||||
#include <XPLM/XPLMScenery.h>
|
||||
|
||||
namespace XSwiftBus
|
||||
{
|
||||
/*!
|
||||
* Class based interface to X-Plane SDK terrain probe.
|
||||
*/
|
||||
class CTerrainProbe
|
||||
{
|
||||
public:
|
||||
//! Constructor.
|
||||
CTerrainProbe();
|
||||
|
||||
//! Destructor;
|
||||
~CTerrainProbe();
|
||||
|
||||
//! Not copyable.
|
||||
//! @{
|
||||
CTerrainProbe(const CTerrainProbe &) = delete;
|
||||
CTerrainProbe &operator =(const CTerrainProbe &) = delete;
|
||||
//! @}
|
||||
|
||||
//! Get the elevation in meters at the given point in OpenGL space.
|
||||
//! \note Due to the Earth's curvature, the OpenGL vertical axis may not be exactly perpendicular to the surface of the geoid.
|
||||
//! \return NaN if no ground was detected.
|
||||
double getElevation(double degreesLatitude, double degreesLongitude, double metersAltitude) const;
|
||||
|
||||
private:
|
||||
XPLMProbeRef m_ref = nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user