mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T259, Ref T243 removed interpolation hints
* no longer needed with providers in that form * pure refactoring commit, just guarantees compilation * already minor adjustments to use providers
This commit is contained in:
@@ -632,9 +632,6 @@ namespace BlackSimPlugin
|
||||
Q_ASSERT_X(CThreadUtils::isCurrentThreadObjectThread(this), Q_FUNC_INFO, "wrong thread");
|
||||
if (callsign.isEmpty()) { return false; } // can happen if an object is not an aircraft
|
||||
|
||||
// clean up anyway
|
||||
m_hints.remove(callsign);
|
||||
|
||||
// really remove from simulator
|
||||
if (!m_xplaneAircraftObjects.contains(callsign)) { return false; } // already fully removed or not yet added
|
||||
|
||||
@@ -837,10 +834,7 @@ namespace BlackSimPlugin
|
||||
|
||||
// get interpolated situation
|
||||
CInterpolationStatus interpolatorStatus;
|
||||
CInterpolationHints hints(m_hints[callsign]);
|
||||
hints.setAircraftParts(useAircraftParts ? parts : CAircraftParts(), useAircraftParts);
|
||||
hints.setLoggingInterpolation(logInterpolationAndParts);
|
||||
const CAircraftSituation interpolatedSituation = xplaneAircraft.getInterpolatedSituation(currentTimestamp, setup, hints, interpolatorStatus);
|
||||
const CAircraftSituation interpolatedSituation = xplaneAircraft.getInterpolatedSituation(currentTimestamp, setup, interpolatorStatus);
|
||||
|
||||
if (interpolatorStatus.hasValidSituation())
|
||||
{
|
||||
@@ -999,13 +993,8 @@ namespace BlackSimPlugin
|
||||
|
||||
CElevationPlane elevation(CLatitude(latitudeDeg, CAngleUnit::deg()), CLongitude(longitudeDeg, CAngleUnit::deg()), CAltitude(elevationMeters, CLengthUnit::m()));
|
||||
elevation.setSinglePointRadius();
|
||||
|
||||
// The entire vertical offset (CG offset) is still very experimental in X-Plane. Libxplanemp simply calculates the lowest Y
|
||||
// value from all the OpenGL model vertices. I assume its in meters.
|
||||
// The unit of modelVerticalOffset is still very unknown. This needs to be confirmed.
|
||||
CInterpolationHints &hints = m_hints[cs];
|
||||
hints.setElevationPlane(elevation); // update elevation
|
||||
hints.setCGAboveGround({ modelVerticalOffsetMeters, CLengthUnit::m() });
|
||||
this->rememberGroundElevation(elevation);
|
||||
this->insertCG(CLength(modelVerticalOffsetMeters, CLengthUnit::m()), callsign);
|
||||
|
||||
// set it in the remote aircraft provider
|
||||
this->updateAircraftGroundElevation(cs, elevation);
|
||||
|
||||
@@ -92,10 +92,10 @@ namespace BlackSimPlugin
|
||||
CAircraftSituation CXPlaneMPAircraft::getInterpolatedSituation(
|
||||
qint64 currentTimeSinceEpoc,
|
||||
const CInterpolationAndRenderingSetupPerCallsign &setup,
|
||||
const CInterpolationHints &hints, CInterpolationStatus &status) const
|
||||
CInterpolationStatus &status) const
|
||||
{
|
||||
Q_ASSERT(m_interpolator);
|
||||
return m_interpolator->getInterpolatedSituation(currentTimeSinceEpoc, setup, hints, status);
|
||||
return m_interpolator->getInterpolatedSituation(currentTimeSinceEpoc, setup, status);
|
||||
}
|
||||
|
||||
CAircraftParts CXPlaneMPAircraft::getInterpolatedParts(
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace BlackSimPlugin
|
||||
BlackMisc::Aviation::CAircraftSituation getInterpolatedSituation(
|
||||
qint64 currentTimeSinceEpoc,
|
||||
const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup,
|
||||
const BlackMisc::Simulation::CInterpolationHints &hints, BlackMisc::Simulation::CInterpolationStatus &status) const;
|
||||
BlackMisc::Simulation::CInterpolationStatus &status) const;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolatedParts
|
||||
BlackMisc::Aviation::CAircraftParts getInterpolatedParts(
|
||||
|
||||
Reference in New Issue
Block a user