mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 19:25:49 +08:00
refs #796, started to move rendering distance/max.aircraft to CInterpolationAndRenderingSetup
(this will allow to remove a lot of signatures in context/simulator interface)
This commit is contained in:
@@ -161,7 +161,7 @@ namespace BlackCore
|
|||||||
//! This shall only return true if the aircraft is really visible in the simulator
|
//! This shall only return true if the aircraft is really visible in the simulator
|
||||||
virtual bool isPhysicallyRenderedAircraft(const BlackMisc::Aviation::CCallsign &callsign) const = 0;
|
virtual bool isPhysicallyRenderedAircraft(const BlackMisc::Aviation::CCallsign &callsign) const = 0;
|
||||||
|
|
||||||
//! Physically rendered (displayed in simulator)?
|
//! Physically rendered (displayed in simulator)
|
||||||
//! This shall only return aircraft really visible in the simulator
|
//! This shall only return aircraft really visible in the simulator
|
||||||
virtual BlackMisc::Aviation::CCallsignSet physicallyRenderedAircraft() const = 0;
|
virtual BlackMisc::Aviation::CCallsignSet physicallyRenderedAircraft() const = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -229,27 +229,12 @@ namespace BlackCore
|
|||||||
|
|
||||||
int CSimulatorCommon::getMaxRenderedAircraft() const
|
int CSimulatorCommon::getMaxRenderedAircraft() const
|
||||||
{
|
{
|
||||||
return (m_maxRenderedAircraft <= MaxAircraftInfinite) ? m_maxRenderedAircraft : MaxAircraftInfinite;
|
return m_interpolationRenderingSetup.getMaxRenderedAircraft();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorCommon::setMaxRenderedAircraft(int maxRenderedAircraft)
|
void CSimulatorCommon::setMaxRenderedAircraft(int maxRenderedAircraft)
|
||||||
{
|
{
|
||||||
if (maxRenderedAircraft == m_maxRenderedAircraft) { return; }
|
if (!m_interpolationRenderingSetup.setMaxRenderedAircraft(maxRenderedAircraft)) { return; }
|
||||||
if (maxRenderedAircraft < 1)
|
|
||||||
{
|
|
||||||
// disable, we set both values to 0
|
|
||||||
m_maxRenderedAircraft = 0;
|
|
||||||
m_maxRenderedDistance = CLength(0.0, CLengthUnit::NM());
|
|
||||||
}
|
|
||||||
else if (maxRenderedAircraft >= MaxAircraftInfinite)
|
|
||||||
{
|
|
||||||
m_maxRenderedAircraft = MaxAircraftInfinite;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_maxRenderedAircraft = maxRenderedAircraft;
|
|
||||||
}
|
|
||||||
|
|
||||||
const bool r = isRenderingRestricted();
|
const bool r = isRenderingRestricted();
|
||||||
const bool e = isRenderingEnabled();
|
const bool e = isRenderingEnabled();
|
||||||
emit renderRestrictionsChanged(r, e, getMaxRenderedAircraft(), getMaxRenderedDistance(), getRenderedDistanceBoundary());
|
emit renderRestrictionsChanged(r, e, getMaxRenderedAircraft(), getMaxRenderedDistance(), getRenderedDistanceBoundary());
|
||||||
@@ -257,23 +242,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
void CSimulatorCommon::setMaxRenderedDistance(const CLength &distance)
|
void CSimulatorCommon::setMaxRenderedDistance(const CLength &distance)
|
||||||
{
|
{
|
||||||
if (distance == m_maxRenderedDistance) { return; }
|
if (!m_interpolationRenderingSetup.setMaxRenderedDistance(distance)) { return; }
|
||||||
if (distance.isNull() || distance > getRenderedDistanceBoundary() || distance.isNegativeWithEpsilonConsidered())
|
|
||||||
{
|
|
||||||
m_maxRenderedDistance = CLength(0.0, CLengthUnit::nullUnit());
|
|
||||||
}
|
|
||||||
else if (distance.isZeroEpsilonConsidered())
|
|
||||||
{
|
|
||||||
// zero means disabled, we disable max aircraft too
|
|
||||||
this->m_maxRenderedAircraft = 0;
|
|
||||||
this->m_maxRenderedDistance = CLength(0.0, CLengthUnit::NM());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Q_ASSERT(!distance.isNegativeWithEpsilonConsidered());
|
|
||||||
m_maxRenderedDistance = distance;
|
|
||||||
}
|
|
||||||
|
|
||||||
const bool r = isRenderingRestricted();
|
const bool r = isRenderingRestricted();
|
||||||
const bool e = isRenderingEnabled();
|
const bool e = isRenderingEnabled();
|
||||||
emit renderRestrictionsChanged(r, e, getMaxRenderedAircraft(), getMaxRenderedDistance(), getRenderedDistanceBoundary());
|
emit renderRestrictionsChanged(r, e, getMaxRenderedAircraft(), getMaxRenderedDistance(), getRenderedDistanceBoundary());
|
||||||
@@ -281,8 +250,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
CLength CSimulatorCommon::getMaxRenderedDistance() const
|
CLength CSimulatorCommon::getMaxRenderedDistance() const
|
||||||
{
|
{
|
||||||
if (m_maxRenderedDistance.isNull()) { return getRenderedDistanceBoundary(); }
|
return (m_interpolationRenderingSetup.getMaxRenderedDistance());
|
||||||
return m_maxRenderedDistance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const CSimulatorPluginInfo &CSimulatorCommon::getSimulatorPluginInfo() const
|
const CSimulatorPluginInfo &CSimulatorCommon::getSimulatorPluginInfo() const
|
||||||
@@ -308,12 +276,12 @@ namespace BlackCore
|
|||||||
|
|
||||||
bool CSimulatorCommon::isMaxAircraftRestricted() const
|
bool CSimulatorCommon::isMaxAircraftRestricted() const
|
||||||
{
|
{
|
||||||
return m_maxRenderedAircraft < MaxAircraftInfinite;
|
return m_interpolationRenderingSetup.isMaxAircraftRestricted();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimulatorCommon::isMaxDistanceRestricted() const
|
bool CSimulatorCommon::isMaxDistanceRestricted() const
|
||||||
{
|
{
|
||||||
return !m_maxRenderedDistance.isNull();
|
return m_interpolationRenderingSetup.isMaxDistanceRestricted();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorCommon::setInterpolationAndRenderingSetup(const CInterpolationAndRenderingSetup &setup)
|
void CSimulatorCommon::setInterpolationAndRenderingSetup(const CInterpolationAndRenderingSetup &setup)
|
||||||
@@ -336,9 +304,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
bool CSimulatorCommon::isRenderingEnabled() const
|
bool CSimulatorCommon::isRenderingEnabled() const
|
||||||
{
|
{
|
||||||
if (m_maxRenderedAircraft < 1) { return false; }
|
return m_interpolationRenderingSetup.isRenderingEnabled();
|
||||||
if (!isMaxDistanceRestricted()) { return true; }
|
|
||||||
return m_maxRenderedDistance.isPositiveWithEpsilonConsidered();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimulatorCommon::isRenderingRestricted() const
|
bool CSimulatorCommon::isRenderingRestricted() const
|
||||||
@@ -348,8 +314,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
void CSimulatorCommon::deleteAllRenderingRestrictions()
|
void CSimulatorCommon::deleteAllRenderingRestrictions()
|
||||||
{
|
{
|
||||||
this->m_maxRenderedDistance = CLength(0, CLengthUnit::nullUnit());
|
m_interpolationRenderingSetup.deleteAllRenderingRestrictions();
|
||||||
this->m_maxRenderedAircraft = MaxAircraftInfinite;
|
|
||||||
emit renderRestrictionsChanged(false, true, getMaxRenderedAircraft(), getMaxRenderedDistance(), getRenderedDistanceBoundary());
|
emit renderRestrictionsChanged(false, true, getMaxRenderedAircraft(), getMaxRenderedDistance(), getRenderedDistanceBoundary());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,16 +162,14 @@ namespace BlackCore
|
|||||||
void ps_allSwiftDataRead();
|
void ps_allSwiftDataRead();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_blinkCycle = false; //!< use for highlighting
|
bool m_blinkCycle = false; //!< use for highlighting
|
||||||
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
||||||
int m_timerCounter = 0; //!< allows to calculate n seconds
|
int m_timerCounter = 0; //!< allows to calculate n seconds
|
||||||
int m_maxRenderedAircraft = MaxAircraftInfinite; //!< max.rendered aircraft
|
QTimer m_oneSecondTimer {this}; //!< multi purpose timer
|
||||||
QTimer m_oneSecondTimer {this}; //!< multi purpose timer
|
BlackMisc::Simulation::CSimulatorPluginInfo m_simulatorPluginInfo; //!< info object
|
||||||
BlackMisc::Simulation::CSimulatorPluginInfo m_simulatorPluginInfo; //!< info object
|
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
||||||
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
BlackMisc::Aviation::CCallsignSet m_callsignsToBeRendered; //!< callsigns which will be rendered
|
||||||
BlackMisc::Aviation::CCallsignSet m_callsignsToBeRendered; //!< callsigns which will be rendered
|
BlackMisc::CConnectionGuard m_remoteAircraftProviderConnections; //!< connected signal/slots
|
||||||
BlackMisc::PhysicalQuantities::CLength m_maxRenderedDistance { 0.0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()}; //!< max.distance for rendering
|
|
||||||
BlackMisc::CConnectionGuard m_remoteAircraftProviderConnections; //!< connected signal/slots
|
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ namespace BlackGui
|
|||||||
void CSettingsSimulatorComponent::ps_onApplyMaxRenderedAircraft()
|
void CSettingsSimulatorComponent::ps_onApplyMaxRenderedAircraft()
|
||||||
{
|
{
|
||||||
// get initial aircraft to render
|
// get initial aircraft to render
|
||||||
int noRequested = ui->sb_MaxAircraft->value();
|
const int noRequested = ui->sb_MaxAircraft->value();
|
||||||
int oldValue = sGui->getIContextSimulator()->getMaxRenderedAircraft();
|
const int oldValue = sGui->getIContextSimulator()->getMaxRenderedAircraft();
|
||||||
if (oldValue == noRequested) { return; }
|
if (oldValue == noRequested) { return; }
|
||||||
|
|
||||||
// set value
|
// set value
|
||||||
|
|||||||
@@ -10,11 +10,93 @@
|
|||||||
#include "blackmisc/interpolationsetup.h"
|
#include "blackmisc/interpolationsetup.h"
|
||||||
#include "stringutils.h"
|
#include "stringutils.h"
|
||||||
|
|
||||||
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
{
|
{
|
||||||
CInterpolationAndRenderingSetup::CInterpolationAndRenderingSetup()
|
CInterpolationAndRenderingSetup::CInterpolationAndRenderingSetup()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
int CInterpolationAndRenderingSetup::InfiniteAircraft()
|
||||||
|
{
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CInterpolationAndRenderingSetup::isRenderingEnabled() const
|
||||||
|
{
|
||||||
|
if (m_maxRenderedAircraft < 1) { return false; }
|
||||||
|
if (!isMaxDistanceRestricted()) { return true; }
|
||||||
|
return m_maxRenderedDistance.isPositiveWithEpsilonConsidered();
|
||||||
|
}
|
||||||
|
|
||||||
|
int CInterpolationAndRenderingSetup::getMaxRenderedAircraft() const
|
||||||
|
{
|
||||||
|
return (m_maxRenderedAircraft <= InfiniteAircraft()) ? m_maxRenderedAircraft : InfiniteAircraft();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CInterpolationAndRenderingSetup::setMaxRenderedAircraft(int maxRenderedAircraft)
|
||||||
|
{
|
||||||
|
if (maxRenderedAircraft == m_maxRenderedAircraft) { return false; }
|
||||||
|
if (maxRenderedAircraft < 1)
|
||||||
|
{
|
||||||
|
// disable, we set both values to 0
|
||||||
|
m_maxRenderedAircraft = 0;
|
||||||
|
m_maxRenderedDistance = CLength(0.0, CLengthUnit::NM()); // real 0
|
||||||
|
}
|
||||||
|
else if (maxRenderedAircraft >= InfiniteAircraft())
|
||||||
|
{
|
||||||
|
m_maxRenderedAircraft = InfiniteAircraft();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_maxRenderedAircraft = maxRenderedAircraft;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CInterpolationAndRenderingSetup::setMaxRenderedDistance(const CLength &distance)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (distance == m_maxRenderedDistance) { return false; }
|
||||||
|
if (distance.isNull() || distance.isNegativeWithEpsilonConsidered())
|
||||||
|
{
|
||||||
|
m_maxRenderedDistance = CLength(0.0, CLengthUnit::nullUnit());
|
||||||
|
}
|
||||||
|
else if (distance.isZeroEpsilonConsidered())
|
||||||
|
{
|
||||||
|
// zero means disabled, we disable max aircraft too
|
||||||
|
this->m_maxRenderedAircraft = 0;
|
||||||
|
this->m_maxRenderedDistance = CLength(0.0, CLengthUnit::NM()); // real 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Q_ASSERT(!distance.isNegativeWithEpsilonConsidered());
|
||||||
|
m_maxRenderedDistance = distance;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CInterpolationAndRenderingSetup::disableMaxRenderedDistance()
|
||||||
|
{
|
||||||
|
this->setMaxRenderedDistance(CLength(0.0, CLengthUnit::nullUnit()));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CInterpolationAndRenderingSetup::isMaxAircraftRestricted() const
|
||||||
|
{
|
||||||
|
return m_maxRenderedAircraft < InfiniteAircraft();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CInterpolationAndRenderingSetup::deleteAllRenderingRestrictions()
|
||||||
|
{
|
||||||
|
this->m_maxRenderedDistance = CLength(0, CLengthUnit::nullUnit());
|
||||||
|
this->m_maxRenderedAircraft = InfiniteAircraft();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CInterpolationAndRenderingSetup::isMaxDistanceRestricted() const
|
||||||
|
{
|
||||||
|
return !m_maxRenderedDistance.isNull();
|
||||||
|
}
|
||||||
|
|
||||||
QString CInterpolationAndRenderingSetup::convertToQString(bool i18n) const
|
QString CInterpolationAndRenderingSetup::convertToQString(bool i18n) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(i18n);
|
Q_UNUSED(i18n);
|
||||||
@@ -24,6 +106,10 @@ namespace BlackMisc
|
|||||||
s += boolToYesNo(this->m_interpolatorDebugMessage);
|
s += boolToYesNo(this->m_interpolatorDebugMessage);
|
||||||
s += " force full interpolation: ";
|
s += " force full interpolation: ";
|
||||||
s += boolToYesNo(this->m_forceFullInterpolation);
|
s += boolToYesNo(this->m_forceFullInterpolation);
|
||||||
|
s += " max.aircraft:";
|
||||||
|
s += QString::number(m_maxRenderedAircraft);
|
||||||
|
s += " max.distance:";
|
||||||
|
s += m_maxRenderedDistance.valueRoundedWithUnit(CLengthUnit::NM(), 2);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,6 +125,10 @@ namespace BlackMisc
|
|||||||
return CVariant::fromValue(m_simulatorDebugMessages);
|
return CVariant::fromValue(m_simulatorDebugMessages);
|
||||||
case IndexForceFullInterpolation:
|
case IndexForceFullInterpolation:
|
||||||
return CVariant::fromValue(m_forceFullInterpolation);
|
return CVariant::fromValue(m_forceFullInterpolation);
|
||||||
|
case IndexMaxRenderedAircraft:
|
||||||
|
return CVariant::fromValue(m_maxRenderedAircraft);
|
||||||
|
case IndexMaxRenderedDistance:
|
||||||
|
return CVariant::fromValue(m_maxRenderedDistance);
|
||||||
default:
|
default:
|
||||||
return CValueObject::propertyByIndex(index);
|
return CValueObject::propertyByIndex(index);
|
||||||
}
|
}
|
||||||
@@ -63,6 +153,12 @@ namespace BlackMisc
|
|||||||
case IndexForceFullInterpolation:
|
case IndexForceFullInterpolation:
|
||||||
this->m_forceFullInterpolation = variant.toBool();
|
this->m_forceFullInterpolation = variant.toBool();
|
||||||
break;
|
break;
|
||||||
|
case IndexMaxRenderedAircraft:
|
||||||
|
this->m_maxRenderedAircraft = variant.toInt();
|
||||||
|
break;
|
||||||
|
case IndexMaxRenderedDistance:
|
||||||
|
this->m_maxRenderedDistance = variant.value<CLength>();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
CValueObject::setPropertyByIndex(index, variant);
|
CValueObject::setPropertyByIndex(index, variant);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -9,9 +9,10 @@
|
|||||||
|
|
||||||
//! \file
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKMISC_INTERPOLATION_SETUP_H
|
#ifndef BLACKMISC_INTERPOLATION_RENDERING_SETUP_H
|
||||||
#define BLACKMISC_INTERPOLATION_SETUP_H
|
#define BLACKMISC_INTERPOLATION_RENDERING_SETUP_H
|
||||||
|
|
||||||
|
#include "blackmisc/pq/length.h"
|
||||||
#include "blackmisc/blackmiscexport.h"
|
#include "blackmisc/blackmiscexport.h"
|
||||||
#include "blackmisc/propertyindex.h"
|
#include "blackmisc/propertyindex.h"
|
||||||
#include "blackmisc/valueobject.h"
|
#include "blackmisc/valueobject.h"
|
||||||
@@ -31,12 +32,17 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
IndexInterpolatorDebugMessages = BlackMisc::CPropertyIndex::GloablIndexInterpolatorSetup,
|
IndexInterpolatorDebugMessages = BlackMisc::CPropertyIndex::GloablIndexInterpolatorSetup,
|
||||||
IndexSimulatorDebugMessages,
|
IndexSimulatorDebugMessages,
|
||||||
IndexForceFullInterpolation
|
IndexForceFullInterpolation,
|
||||||
|
IndexMaxRenderedAircraft,
|
||||||
|
IndexMaxRenderedDistance
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Constructor.
|
//! Constructor.
|
||||||
CInterpolationAndRenderingSetup();
|
CInterpolationAndRenderingSetup();
|
||||||
|
|
||||||
|
//! Considered as "all aircraft"
|
||||||
|
static int InfiniteAircraft();
|
||||||
|
|
||||||
//! Debugging messages
|
//! Debugging messages
|
||||||
bool showInterpolatorDebugMessages() const { return m_interpolatorDebugMessage; }
|
bool showInterpolatorDebugMessages() const { return m_interpolatorDebugMessage; }
|
||||||
|
|
||||||
@@ -50,11 +56,38 @@ namespace BlackMisc
|
|||||||
void setDriverDebuggingMessages(bool debug) { m_simulatorDebugMessages = debug; }
|
void setDriverDebuggingMessages(bool debug) { m_simulatorDebugMessages = debug; }
|
||||||
|
|
||||||
//! Full interpolation
|
//! Full interpolation
|
||||||
bool forceFullInterpolation() const { return m_forceFullInterpolation; }
|
bool isForcingFullInterpolation() const { return m_forceFullInterpolation; }
|
||||||
|
|
||||||
//! Force full interpolation
|
//! Force full interpolation
|
||||||
void setForceFullInterpolation(bool force) { m_forceFullInterpolation = force; }
|
void setForceFullInterpolation(bool force) { m_forceFullInterpolation = force; }
|
||||||
|
|
||||||
|
//! Max. number of aircraft rendered
|
||||||
|
int getMaxRenderedAircraft() const;
|
||||||
|
|
||||||
|
//! Max. number of aircraft rendered
|
||||||
|
bool setMaxRenderedAircraft(int maxRenderedAircraft);
|
||||||
|
|
||||||
|
//! Max. distance for rendering
|
||||||
|
bool setMaxRenderedDistance(const BlackMisc::PhysicalQuantities::CLength &distance);
|
||||||
|
|
||||||
|
//! Disable
|
||||||
|
void disableMaxRenderedDistance();
|
||||||
|
|
||||||
|
//! Rendering enabled
|
||||||
|
bool isRenderingEnabled() const;
|
||||||
|
|
||||||
|
//! Max. distance for rendering
|
||||||
|
BlackMisc::PhysicalQuantities::CLength getMaxRenderedDistance() const { return m_maxRenderedDistance; }
|
||||||
|
|
||||||
|
//! Restricted by distance?
|
||||||
|
bool isMaxDistanceRestricted() const;
|
||||||
|
|
||||||
|
//! Restricted by quantity?
|
||||||
|
bool isMaxAircraftRestricted() const;
|
||||||
|
|
||||||
|
//! Disable all render restrictions
|
||||||
|
void deleteAllRenderingRestrictions();
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::String::toQString
|
//! \copydoc BlackMisc::Mixin::String::toQString
|
||||||
QString convertToQString(bool i18n = false) const;
|
QString convertToQString(bool i18n = false) const;
|
||||||
|
|
||||||
@@ -68,12 +101,16 @@ namespace BlackMisc
|
|||||||
bool m_interpolatorDebugMessage = false; //! Debug messages in interpolator
|
bool m_interpolatorDebugMessage = false; //! Debug messages in interpolator
|
||||||
bool m_simulatorDebugMessages = false; //! Debug messages of simulator (aka plugin)
|
bool m_simulatorDebugMessages = false; //! Debug messages of simulator (aka plugin)
|
||||||
bool m_forceFullInterpolation = false; //! always do a full interpolation, even if aircraft is not moving
|
bool m_forceFullInterpolation = false; //! always do a full interpolation, even if aircraft is not moving
|
||||||
|
int m_maxRenderedAircraft = InfiniteAircraft(); //!< max.rendered aircraft
|
||||||
|
BlackMisc::PhysicalQuantities::CLength m_maxRenderedDistance { 0.0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()}; //!< max.distance for rendering
|
||||||
|
|
||||||
BLACK_METACLASS(
|
BLACK_METACLASS(
|
||||||
CInterpolationAndRenderingSetup,
|
CInterpolationAndRenderingSetup,
|
||||||
BLACK_METAMEMBER(interpolatorDebugMessage),
|
BLACK_METAMEMBER(interpolatorDebugMessage),
|
||||||
BLACK_METAMEMBER(simulatorDebugMessages),
|
BLACK_METAMEMBER(simulatorDebugMessages),
|
||||||
BLACK_METAMEMBER(forceFullInterpolation)
|
BLACK_METAMEMBER(forceFullInterpolation),
|
||||||
|
BLACK_METAMEMBER(maxRenderedAircraft),
|
||||||
|
BLACK_METAMEMBER(maxRenderedDistance)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace BlackMisc
|
|||||||
+ oldAlt,
|
+ oldAlt,
|
||||||
oldAlt.getReferenceDatum()));
|
oldAlt.getReferenceDatum()));
|
||||||
|
|
||||||
if (!setup.forceFullInterpolation() && !vtolAiracraft && newVec == oldVec && oldAlt == newAlt)
|
if (!setup.isForcingFullInterpolation() && !vtolAiracraft && newVec == oldVec && oldAlt == newAlt)
|
||||||
{
|
{
|
||||||
// stop interpolation here, does not work for VTOL aircraft. We need a flag for VTOL aircraft
|
// stop interpolation here, does not work for VTOL aircraft. We need a flag for VTOL aircraft
|
||||||
return currentSituation;
|
return currentSituation;
|
||||||
|
|||||||
Reference in New Issue
Block a user