6#ifndef SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLATIONRENDERINGSETUP_H
7#define SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLATIONRENDERINGSETUP_H
36 IndexLogInterpolation = CPropertyIndexRef::GlobalIndexCInterpolatioRenderingSetup,
37 IndexSimulatorDebugMessages,
38 IndexForceFullInterpolation,
39 IndexSendGndFlagToSimulator,
40 IndexEnabledAircraftParts,
41 IndexInterpolatorMode,
42 IndexInterpolatorModeAsString,
43 IndexFixSceneryOffset,
64 bool setLogInterpolation(
bool log);
73 bool setEnabledAircraftParts(
bool enabled);
76 bool maskEnabledAircraftParts(
bool mask);
85 bool setSendingGndFlagToSimulator(
bool sendFLag);
109 bool setInterpolatorMode(InterpolatorMode mode);
112 bool setInterpolatorMode(
const QString &mode);
115 QString convertToQString(
bool i18n =
false)
const;
124 static const QString &modeToString(InterpolatorMode mode);
146 public CValueObject<CInterpolationAndRenderingSetupGlobal>,
153 IndexMaxRenderedAircraft = CInterpolationAndRenderingSetupBase::IndexFixSceneryOffset + 1,
154 IndexMaxRenderedDistance
185 bool isMaxDistanceRestricted()
const;
188 bool isMaxAircraftRestricted()
const;
191 void clearAllRenderingRestrictions();
194 void disableRendering();
197 QString getRenderRestrictionText()
const;
203 QString convertToQString(
bool i18n =
false)
const;
212 int m_maxRenderedAircraft = InfiniteAircraft();
216 CInterpolationAndRenderingSetupGlobal,
231 public CValueObject<CInterpolationAndRenderingSetupPerCallsign>,
238 IndexCallsign = CInterpolationAndRenderingSetupGlobal::IndexMaxRenderedDistance + 1
261 bool isNull()
const {
return m_callsign.isEmpty(); }
Value object encapsulating a list of property indexes.
Non-owning reference to a CPropertyIndex with a subset of its features.
Value object encapsulating information of a callsign.
Physical unit angle (radians, degrees).
Physical unit length (length).
static const CAngle & null()
Value object for interpolator and rendering base class.
const physical_quantities::CAngle & getPitchOnGround() const
Force a given pitch on ground.
ColumnIndex
Properties by index.
void setFixingSceneryOffset(bool fix)
Enable fix scenery offset if it has been detected.
bool m_enabledAircraftParts
Enable aircraft parts.
InterpolatorMode
Interpolator type.
physical_quantities::CAngle m_pitchOnGround
pitch angle on ground
bool logInterpolation() const
Log.interpolation.
bool isSendingGndFlagToSimulator() const
Send GND flag to simulator.
static const QString & modeToString(InterpolatorMode mode)
Interpolator mode as string.
int m_interpolatorMode
interpolator mode (spline, ...)
bool m_sendGndToSim
Send the gnd.flag to simulator.
static bool canHandleIndex(int index)
Can handle index?
bool isFixingSceneryOffset() const
Fix scenery offset if it has been detected.
const QString & getInterpolatorModeAsString() const
Interpolator mode.
bool m_simulatorDebugMessages
Debug messages of simulator (aka plugin).
CInterpolationAndRenderingSetupBase()=default
Constructor.
bool isAircraftPartsEnabled() const
Aircraft parts enabled (still requires the other aircraft to send parts).
InterpolatorMode getInterpolatorMode() const
Interpolator mode.
void setForceFullInterpolation(bool force)
Force full interpolation.
bool m_forceFullInterpolation
always do a full interpolation, even if aircraft is not moving
void setSimulatorDebuggingMessages(bool debug)
Debugging messages for simulation.
bool m_fixSceneryOffset
Fix.
bool m_logInterpolation
Debug messages in interpolator.
bool showSimulatorDebugMessages() const
Debugging messages for simulation.
bool isForcingFullInterpolation() const
Full interpolation (skip optimizations like checking if aircraft moves etc.).
Value object for interpolator and rendering.
bool setMaxRenderedDistance(const physical_quantities::CLength &distance)
Max.distance for rendering.
ColumnIndex
Properties by index.
CInterpolationAndRenderingSetupGlobal()=default
Constructor.
bool isRenderingEnabled() const
Rendering enabled (at all)?
int getMaxRenderedAircraft() const
Max.number of aircraft rendered.
physical_quantities::CLength getMaxRenderedDistance() const
Max.distance for rendering.
bool setMaxRenderedAircraft(int maxRenderedAircraft)
Max.number of aircraft rendered.
static int InfiniteAircraft()
Considered as "all aircraft".
bool isRenderingRestricted() const
Rendering enabled, but restricted.
void clearMaxRenderedDistance()
Disable.
Value object for interpolator and rendering per callsign.
bool isEqualToGlobal(const CInterpolationAndRenderingSetupGlobal &globalSetup) const
Equal to global setup?
const aviation::CCallsign & getCallsign() const
Get callsign.
ColumnIndex
Properties by index.
CInterpolationAndRenderingSetupPerCallsign()=default
Constructor.
void setCallsign(const aviation::CCallsign &callsign)
Set callsign.
CPropertyIndexList unequalToGlobal(const CInterpolationAndRenderingSetupGlobal &globalSetup) const
Properties unequal to global setup.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...