#pragma once #include #include #include #include namespace mbgl { namespace style { template class CameraFunction { public: using Stops = std::conditional_t< util::Interpolatable, variant< ExponentialStops, IntervalStops>, variant< IntervalStops>>; CameraFunction(Stops stops_) : stops(std::move(stops_)) { } T evaluate(float zoom) const { return stops.match([&] (const auto& s) { return s.evaluate(zoom).value_or(T()); }); } friend bool operator==(const CameraFunction& lhs, const CameraFunction& rhs) { return lhs.stops == rhs.stops; } Stops stops; bool useIntegerZoom = false; }; } // namespace style } // namespace mbgl