[core] Fix readability-avoid-const-params-in-decls errors in header files
As reported by clang-tidy-8.
This commit is contained in:
@@ -152,7 +152,7 @@ public:
|
||||
/*
|
||||
* Update an offline region metadata in the database.
|
||||
*/
|
||||
virtual void updateOfflineMetadata(const int64_t regionID,
|
||||
virtual void updateOfflineMetadata(int64_t regionID,
|
||||
const OfflineRegionMetadata& metadata,
|
||||
std::function<void(expected<OfflineRegionMetadata, std::exception_ptr>)>);
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ namespace style {
|
||||
namespace expression {
|
||||
|
||||
// Return the smallest range of stops that covers the interval [lower, upper]
|
||||
Range<float> getCoveringStops(const std::map<double, std::unique_ptr<Expression>>& stops,
|
||||
const double lower, const double upper);
|
||||
Range<float> getCoveringStops(const std::map<double, std::unique_ptr<Expression>>& stops, double lower, double upper);
|
||||
|
||||
} // namespace expression
|
||||
} // namespace style
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
void eachStop(const std::function<void(double, const Expression&)>& visit) const;
|
||||
|
||||
const std::unique_ptr<Expression>& getInput() const { return input; }
|
||||
Range<float> getCoveringStops(const double lower, const double upper) const;
|
||||
Range<float> getCoveringStops(double lower, double upper) const;
|
||||
|
||||
bool operator==(const Expression& e) const override;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ struct ValueConverter<mbgl::Value> {
|
||||
template <>
|
||||
struct ValueConverter<float> {
|
||||
static type::Type expressionType() { return type::Number; }
|
||||
static Value toExpressionValue(const float value);
|
||||
static Value toExpressionValue(float value);
|
||||
static optional<float> fromExpressionValue(const Value& value);
|
||||
};
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ public:
|
||||
bool isZoomConstant() const noexcept;
|
||||
bool isFeatureConstant() const noexcept;
|
||||
bool isRuntimeConstant() const noexcept;
|
||||
float interpolationFactor(const Range<float>&, const float) const noexcept;
|
||||
Range<float> getCoveringStops(const float, const float) const noexcept;
|
||||
float interpolationFactor(const Range<float>&, float) const noexcept;
|
||||
Range<float> getCoveringStops(float, float) const noexcept;
|
||||
const expression::Expression& getExpression() const noexcept;
|
||||
|
||||
// Can be used for aggregating property expressions from multiple
|
||||
|
||||
@@ -49,10 +49,8 @@ public:
|
||||
virtual void getTile(const CanonicalTileID&, const std::function<void(TileFeatures)>&) = 0;
|
||||
|
||||
// SuperclusterData
|
||||
virtual Features getChildren(const std::uint32_t) = 0;
|
||||
virtual Features getLeaves(const std::uint32_t,
|
||||
const std::uint32_t limit = 10u,
|
||||
const std::uint32_t offset = 0u) = 0;
|
||||
virtual Features getChildren(std::uint32_t) = 0;
|
||||
virtual Features getLeaves(std::uint32_t, std::uint32_t limit = 10u, std::uint32_t offset = 0u) = 0;
|
||||
virtual std::uint8_t getClusterExpansionZoom(std::uint32_t) = 0;
|
||||
|
||||
virtual std::shared_ptr<Scheduler> getScheduler() { return nullptr; }
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace style {
|
||||
|
||||
class ImageSource final : public Source {
|
||||
public:
|
||||
ImageSource(std::string id, const std::array<LatLng, 4>);
|
||||
ImageSource(std::string id, std::array<LatLng, 4>);
|
||||
~ImageSource() override;
|
||||
|
||||
optional<std::string> getURL() const;
|
||||
|
||||
@@ -30,7 +30,7 @@ std::string iso8601(Timestamp);
|
||||
|
||||
Timestamp parseTimestamp(const char *);
|
||||
|
||||
Timestamp parseTimestamp(const int32_t timestamp);
|
||||
Timestamp parseTimestamp(int32_t timestamp);
|
||||
|
||||
// C++17 polyfill
|
||||
template <class Rep, class Period, class = std::enable_if_t<
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
bool contains(const LatLng& point, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
|
||||
bool contains(const LatLngBounds& area, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
|
||||
|
||||
bool intersects(const LatLngBounds area, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
|
||||
bool intersects(LatLngBounds area, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
|
||||
|
||||
private:
|
||||
LatLng sw;
|
||||
|
||||
@@ -68,8 +68,7 @@ public:
|
||||
expected<OfflineRegions, std::exception_ptr>
|
||||
mergeDatabase(const std::string& sideDatabasePath);
|
||||
|
||||
expected<OfflineRegionMetadata, std::exception_ptr>
|
||||
updateMetadata(const int64_t regionID, const OfflineRegionMetadata&);
|
||||
expected<OfflineRegionMetadata, std::exception_ptr> updateMetadata(int64_t regionID, const OfflineRegionMetadata&);
|
||||
|
||||
std::exception_ptr deleteRegion(OfflineRegion&&);
|
||||
std::exception_ptr invalidateRegion(int64_t regionID);
|
||||
|
||||
@@ -44,10 +44,10 @@ public:
|
||||
std::unique_ptr<GeometryTileFeature> getFeature(std::size_t i) const override;
|
||||
std::string getName() const override;
|
||||
|
||||
void addFeature(const AnnotationID,
|
||||
void addFeature(AnnotationID,
|
||||
FeatureType,
|
||||
GeometryCollection,
|
||||
std::unordered_map<std::string, std::string> properties = { {} });
|
||||
std::unordered_map<std::string, std::string> properties = {{}});
|
||||
|
||||
private:
|
||||
std::shared_ptr<AnnotationTileLayerData> layer;
|
||||
|
||||
@@ -17,7 +17,7 @@ class CanonicalTileID;
|
||||
|
||||
class ShapeAnnotationImpl {
|
||||
public:
|
||||
ShapeAnnotationImpl(const AnnotationID);
|
||||
ShapeAnnotationImpl(AnnotationID);
|
||||
virtual ~ShapeAnnotationImpl() = default;
|
||||
|
||||
virtual void updateStyle(style::Style::Impl&) const = 0;
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
DEMData(const PremultipliedImage& image, Tileset::DEMEncoding encoding);
|
||||
void backfillBorder(const DEMData& borderTileData, int8_t dx, int8_t dy);
|
||||
|
||||
int32_t get(const int32_t x, const int32_t y) const;
|
||||
int32_t get(int32_t x, int32_t y) const;
|
||||
const std::array<float, 4>& getUnpackVector() const;
|
||||
|
||||
const PremultipliedImage* getImage() const {
|
||||
|
||||
@@ -61,18 +61,23 @@ public:
|
||||
|
||||
void insert(const GeometryCollection&, std::size_t index, const std::string& sourceLayerName, const std::string& bucketLeaderID);
|
||||
|
||||
void query(std::unordered_map<std::string, std::vector<Feature>>& result, const GeometryCoordinates& queryGeometry,
|
||||
const TransformState&, const mat4& posMatrix, const double tileSize, const double scale,
|
||||
const RenderedQueryOptions& options, const UnwrappedTileID&,
|
||||
const std::unordered_map<std::string, const RenderLayer*>&, const float additionalQueryPadding,
|
||||
void query(std::unordered_map<std::string, std::vector<Feature>>& result,
|
||||
const GeometryCoordinates& queryGeometry,
|
||||
const TransformState&,
|
||||
const mat4& posMatrix,
|
||||
double tileSize,
|
||||
double scale,
|
||||
const RenderedQueryOptions& options,
|
||||
const UnwrappedTileID&,
|
||||
const std::unordered_map<std::string, const RenderLayer*>&,
|
||||
float additionalQueryPadding,
|
||||
const SourceFeatureState& sourceFeatureState) const;
|
||||
|
||||
static optional<GeometryCoordinates> translateQueryGeometry(
|
||||
const GeometryCoordinates& queryGeometry,
|
||||
const std::array<float, 2>& translate,
|
||||
const style::TranslateAnchorType,
|
||||
const float bearing,
|
||||
const float pixelsToTileUnits);
|
||||
static optional<GeometryCoordinates> translateQueryGeometry(const GeometryCoordinates& queryGeometry,
|
||||
const std::array<float, 2>& translate,
|
||||
style::TranslateAnchorType,
|
||||
float bearing,
|
||||
float pixelsToTileUnits);
|
||||
|
||||
void setBucketLayerIDs(const std::string& bucketLeaderID, const std::vector<std::string>& layerIDs);
|
||||
|
||||
@@ -84,11 +89,15 @@ public:
|
||||
const FeatureSortOrder& featureSortOrder) const;
|
||||
|
||||
private:
|
||||
void addFeature(std::unordered_map<std::string, std::vector<Feature>>& result, const IndexedSubfeature&,
|
||||
const RenderedQueryOptions& options, const CanonicalTileID&,
|
||||
void addFeature(std::unordered_map<std::string, std::vector<Feature>>& result,
|
||||
const IndexedSubfeature&,
|
||||
const RenderedQueryOptions& options,
|
||||
const CanonicalTileID&,
|
||||
const std::unordered_map<std::string, const RenderLayer*>&,
|
||||
const GeometryCoordinates& queryGeometry, const TransformState& transformState,
|
||||
const float pixelsToTileUnits, const mat4& posMatrix,
|
||||
const GeometryCoordinates& queryGeometry,
|
||||
const TransformState& transformState,
|
||||
float pixelsToTileUnits,
|
||||
const mat4& posMatrix,
|
||||
const SourceFeatureState* sourceFeatureState) const;
|
||||
|
||||
GridIndex<IndexedSubfeature> grid;
|
||||
|
||||
@@ -55,13 +55,15 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual std::unique_ptr<VertexBufferResource>
|
||||
createVertexBufferResource(const void* data, std::size_t size, const BufferUsageType) = 0;
|
||||
virtual std::unique_ptr<VertexBufferResource> createVertexBufferResource(const void* data,
|
||||
std::size_t size,
|
||||
BufferUsageType) = 0;
|
||||
virtual void
|
||||
updateVertexBufferResource(VertexBufferResource&, const void* data, std::size_t size) = 0;
|
||||
|
||||
virtual std::unique_ptr<IndexBufferResource>
|
||||
createIndexBufferResource(const void* data, std::size_t size, const BufferUsageType) = 0;
|
||||
virtual std::unique_ptr<IndexBufferResource> createIndexBufferResource(const void* data,
|
||||
std::size_t size,
|
||||
BufferUsageType) = 0;
|
||||
virtual void
|
||||
updateIndexBufferResource(IndexBufferResource&, const void* data, std::size_t size) = 0;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
using InType = std::conditional_t<std::is_same<std::underlying_type_t<T>, bool>::value, platform::GLboolean, platform::GLint>;
|
||||
using OutType = std::conditional_t<std::is_same<std::underlying_type_t<T>, bool>::value, platform::GLboolean, platform::GLenum>;
|
||||
|
||||
static T from(const InType);
|
||||
static T from(InType);
|
||||
static OutType to(T);
|
||||
};
|
||||
|
||||
|
||||
@@ -23,15 +23,25 @@ private:
|
||||
void popDebugGroup() override;
|
||||
|
||||
public:
|
||||
std::unique_ptr<gfx::VertexBufferResource> createVertexBufferResource(const void* data, std::size_t size, const gfx::BufferUsageType) override;
|
||||
std::unique_ptr<gfx::VertexBufferResource> createVertexBufferResource(const void* data,
|
||||
std::size_t size,
|
||||
gfx::BufferUsageType) override;
|
||||
void updateVertexBufferResource(gfx::VertexBufferResource&, const void* data, std::size_t size) override;
|
||||
std::unique_ptr<gfx::IndexBufferResource> createIndexBufferResource(const void* data, std::size_t size, const gfx::BufferUsageType) override;
|
||||
std::unique_ptr<gfx::IndexBufferResource> createIndexBufferResource(const void* data,
|
||||
std::size_t size,
|
||||
gfx::BufferUsageType) override;
|
||||
void updateIndexBufferResource(gfx::IndexBufferResource&, const void* data, std::size_t size) override;
|
||||
|
||||
public:
|
||||
std::unique_ptr<gfx::TextureResource> createTextureResource(Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
|
||||
void updateTextureResource(gfx::TextureResource&, Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
|
||||
void updateTextureResourceSub(gfx::TextureResource&, const uint16_t xOffset, const uint16_t yOffset, Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
|
||||
void updateTextureResourceSub(gfx::TextureResource&,
|
||||
uint16_t xOffset,
|
||||
uint16_t yOffset,
|
||||
Size,
|
||||
const void* data,
|
||||
gfx::TexturePixelType,
|
||||
gfx::TextureChannelDataType) override;
|
||||
|
||||
private:
|
||||
gl::CommandEncoder& commandEncoder;
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
|
||||
GeometryCollection clipLines(const GeometryCollection &lines,
|
||||
const int16_t x1, const int16_t y1, const int16_t x2, const int16_t y2);
|
||||
GeometryCollection clipLines(const GeometryCollection &lines, int16_t x1, int16_t y1, int16_t x2, int16_t y2);
|
||||
|
||||
} // end namespace util
|
||||
} // end namespace mbgl
|
||||
|
||||
@@ -20,8 +20,8 @@ public:
|
||||
virtual void createBucket(const ImagePositions&,
|
||||
std::unique_ptr<FeatureIndex>&,
|
||||
std::unordered_map<std::string, LayerRenderData>&,
|
||||
const bool,
|
||||
const bool,
|
||||
bool,
|
||||
bool,
|
||||
const CanonicalTileID&) = 0;
|
||||
|
||||
virtual void prepareSymbols(const GlyphMap&, const GlyphPositions&, const ImageMap&, const ImagePositions&){};
|
||||
|
||||
@@ -29,7 +29,7 @@ struct SymbolInstanceSharedData {
|
||||
const optional<PositionedIcon>& shapedIcon,
|
||||
const optional<PositionedIcon>& verticallyShapedIcon,
|
||||
const style::SymbolLayoutProperties::Evaluated& layout,
|
||||
const style::SymbolPlacementType textPlacement,
|
||||
style::SymbolPlacementType textPlacement,
|
||||
const std::array<float, 2>& textOffset,
|
||||
const ImageMap& imageMap,
|
||||
float iconRotation,
|
||||
@@ -54,23 +54,23 @@ public:
|
||||
const ShapedTextOrientations& shapedTextOrientations,
|
||||
const optional<PositionedIcon>& shapedIcon,
|
||||
const optional<PositionedIcon>& verticallyShapedIcon,
|
||||
const float textBoxScale,
|
||||
const float textPadding,
|
||||
const style::SymbolPlacementType textPlacement,
|
||||
float textBoxScale,
|
||||
float textPadding,
|
||||
style::SymbolPlacementType textPlacement,
|
||||
const std::array<float, 2>& textOffset,
|
||||
const float iconBoxScale,
|
||||
const float iconPadding,
|
||||
float iconBoxScale,
|
||||
float iconPadding,
|
||||
const std::array<float, 2>& iconOffset,
|
||||
const IndexedSubfeature& indexedFeature,
|
||||
const std::size_t layoutFeatureIndex,
|
||||
const std::size_t dataFeatureIndex,
|
||||
std::size_t layoutFeatureIndex,
|
||||
std::size_t dataFeatureIndex,
|
||||
std::u16string key,
|
||||
const float overscaling,
|
||||
const float iconRotation,
|
||||
const float textRotation,
|
||||
float overscaling,
|
||||
float iconRotation,
|
||||
float textRotation,
|
||||
const std::array<float, 2>& variableTextOffset,
|
||||
bool allowVerticalPlacement,
|
||||
const SymbolContent iconType = SymbolContent::None);
|
||||
SymbolContent iconType = SymbolContent::None);
|
||||
|
||||
optional<size_t> getDefaultHorizontalPlacedTextIndex() const;
|
||||
const GeometryCoordinates& line() const;
|
||||
|
||||
@@ -39,8 +39,8 @@ public:
|
||||
void createBucket(const ImagePositions&,
|
||||
std::unique_ptr<FeatureIndex>&,
|
||||
std::unordered_map<std::string, LayerRenderData>&,
|
||||
const bool firstLoad,
|
||||
const bool showCollisionBoxes,
|
||||
bool firstLoad,
|
||||
bool showCollisionBoxes,
|
||||
const CanonicalTileID& canonical) override;
|
||||
|
||||
bool hasSymbolInstances() const override;
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
static std::vector<float> calculateTileDistances(const GeometryCoordinates& line, const Anchor& anchor);
|
||||
|
||||
private:
|
||||
void addFeature(const size_t,
|
||||
void addFeature(size_t,
|
||||
const SymbolFeature&,
|
||||
const ShapedTextOrientations& shapedTextOrientations,
|
||||
optional<PositionedIcon> shapedIcon,
|
||||
@@ -73,22 +73,22 @@ private:
|
||||
std::array<float, 2> textOffset,
|
||||
float layoutTextSize,
|
||||
float layoutIconSize,
|
||||
const SymbolContent iconType);
|
||||
SymbolContent iconType);
|
||||
|
||||
bool anchorIsTooClose(const std::u16string& text, const float repeatDistance, const Anchor&);
|
||||
bool anchorIsTooClose(const std::u16string& text, float repeatDistance, const Anchor&);
|
||||
std::map<std::u16string, std::vector<Anchor>> compareText;
|
||||
|
||||
void addToDebugBuffers(SymbolBucket&);
|
||||
|
||||
// Adds placed items to the buffer.
|
||||
size_t addSymbol(SymbolBucket::Buffer&,
|
||||
const Range<float> sizeData,
|
||||
Range<float> sizeData,
|
||||
const SymbolQuad&,
|
||||
const Anchor& labelAnchor,
|
||||
PlacedSymbol& placedSymbol,
|
||||
float sortKey);
|
||||
size_t addSymbols(SymbolBucket::Buffer&,
|
||||
const Range<float> sizeData,
|
||||
Range<float> sizeData,
|
||||
const SymbolQuads&,
|
||||
const Anchor& labelAnchor,
|
||||
PlacedSymbol& placedSymbol,
|
||||
|
||||
@@ -38,30 +38,38 @@ namespace mbgl {
|
||||
};
|
||||
|
||||
float evaluateSizeForFeature(const ZoomEvaluatedSize& zoomEvaluatedSize, const PlacedSymbol& placedSymbol);
|
||||
mat4 getLabelPlaneMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits);
|
||||
mat4 getGlCoordMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits);
|
||||
|
||||
mat4 getLabelPlaneMatrix(const mat4& posMatrix,
|
||||
bool pitchWithMap,
|
||||
bool rotateWithMap,
|
||||
const TransformState& state,
|
||||
float pixelsToTileUnits);
|
||||
mat4 getGlCoordMatrix(const mat4& posMatrix,
|
||||
bool pitchWithMap,
|
||||
bool rotateWithMap,
|
||||
const TransformState& state,
|
||||
float pixelsToTileUnits);
|
||||
|
||||
using PointAndCameraDistance = std::pair<Point<float>,float>;
|
||||
PointAndCameraDistance project(const Point<float>& point, const mat4& matrix);
|
||||
|
||||
void reprojectLineLabels(gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>>&, const std::vector<PlacedSymbol>&,
|
||||
const mat4& posMatrix, bool pitchWithMap, bool rotateWithMap, bool keepUpright,
|
||||
const RenderTile&, const SymbolSizeBinder& sizeBinder, const TransformState&);
|
||||
|
||||
optional<std::pair<PlacedGlyph, PlacedGlyph>> placeFirstAndLastGlyph(const float fontScale,
|
||||
const float lineOffsetX,
|
||||
const float lineOffsetY,
|
||||
const bool flip,
|
||||
const Point<float>& anchorPoint,
|
||||
const Point<float>& tileAnchorPoint,
|
||||
const PlacedSymbol& symbol,
|
||||
const mat4& labelPlaneMatrix,
|
||||
const bool returnTileDistance);
|
||||
|
||||
optional<std::pair<PlacedGlyph, PlacedGlyph>> placeFirstAndLastGlyph(float fontScale,
|
||||
float lineOffsetX,
|
||||
float lineOffsetY,
|
||||
bool flip,
|
||||
const Point<float>& anchorPoint,
|
||||
const Point<float>& tileAnchorPoint,
|
||||
const PlacedSymbol& symbol,
|
||||
const mat4& labelPlaneMatrix,
|
||||
bool returnTileDistance);
|
||||
|
||||
void hideGlyphs(std::size_t numGlyphs,
|
||||
gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>>& dynamicVertexArray);
|
||||
void addDynamicAttributes(const Point<float>& anchorPoint,
|
||||
const float angle,
|
||||
float angle,
|
||||
gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>>& dynamicVertexArray);
|
||||
|
||||
} // end namespace mbgl
|
||||
|
||||
@@ -120,11 +120,11 @@ public:
|
||||
// North Orientation
|
||||
NorthOrientation getNorthOrientation() const;
|
||||
double getNorthOrientationAngle() const;
|
||||
void setNorthOrientation(const NorthOrientation);
|
||||
void setNorthOrientation(NorthOrientation);
|
||||
|
||||
// Constrain mode
|
||||
ConstrainMode getConstrainMode() const;
|
||||
void setConstrainMode(const ConstrainMode);
|
||||
void setConstrainMode(ConstrainMode);
|
||||
|
||||
// Viewport mode
|
||||
ViewportMode getViewportMode() const;
|
||||
@@ -243,7 +243,7 @@ private:
|
||||
mat4 coordinatePointMatrix(const mat4& projMatrix) const;
|
||||
mat4 getPixelMatrix() const;
|
||||
|
||||
void setScalePoint(const double scale, const ScreenCoordinate& point);
|
||||
void setScalePoint(double scale, const ScreenCoordinate& point);
|
||||
|
||||
void updateMatricesIfNeeded() const;
|
||||
bool needsMatricesUpdate() const { return requestMatricesUpdate; }
|
||||
|
||||
@@ -85,8 +85,8 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
static LayoutUniformValues
|
||||
layoutUniformValues(mat4, const TransformState&, const float opacity, const EvaluatedLight&, const float verticalGradient);
|
||||
static LayoutUniformValues layoutUniformValues(
|
||||
mat4, const TransformState&, float opacity, const EvaluatedLight&, float verticalGradient);
|
||||
};
|
||||
|
||||
class FillExtrusionPatternProgram : public Program<
|
||||
@@ -106,11 +106,11 @@ public:
|
||||
const CrossfadeParameters&,
|
||||
const UnwrappedTileID&,
|
||||
const TransformState&,
|
||||
const float opacity,
|
||||
const float heightFactor,
|
||||
const float pixelRatio,
|
||||
float opacity,
|
||||
float heightFactor,
|
||||
float pixelRatio,
|
||||
const EvaluatedLight&,
|
||||
const float verticalGradient);
|
||||
float verticalGradient);
|
||||
};
|
||||
|
||||
using FillExtrusionLayoutVertex = FillExtrusionProgram::LayoutVertex;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
const CrossfadeParameters& crossfade,
|
||||
const UnwrappedTileID&,
|
||||
const TransformState&,
|
||||
const float pixelRatio);
|
||||
float pixelRatio);
|
||||
};
|
||||
|
||||
class FillOutlineProgram : public Program<
|
||||
|
||||
@@ -88,12 +88,11 @@ public:
|
||||
*/
|
||||
static const int8_t extrudeScale = 63;
|
||||
|
||||
static LayoutUniformValues
|
||||
layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
const float pixelRatio);
|
||||
static LayoutUniformValues layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
float pixelRatio);
|
||||
};
|
||||
|
||||
class LinePatternProgram : public Program<
|
||||
@@ -115,14 +114,13 @@ class LinePatternProgram : public Program<
|
||||
public:
|
||||
using Program::Program;
|
||||
|
||||
static LayoutUniformValues
|
||||
layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
const float pixelRatio,
|
||||
Size atlasSize,
|
||||
const CrossfadeParameters& crossfade);
|
||||
static LayoutUniformValues layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
float pixelRatio,
|
||||
Size atlasSize,
|
||||
const CrossfadeParameters& crossfade);
|
||||
};
|
||||
|
||||
class LineSDFProgram : public Program<
|
||||
@@ -175,12 +173,11 @@ class LineGradientProgram : public Program<
|
||||
public:
|
||||
using Program::Program;
|
||||
|
||||
static LayoutUniformValues
|
||||
layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
const float pixelRatio);
|
||||
static LayoutUniformValues layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
float pixelRatio);
|
||||
};
|
||||
|
||||
using LineLayoutVertex = LineProgram::LayoutVertex;
|
||||
|
||||
@@ -73,9 +73,9 @@ public:
|
||||
uniforms::size>;
|
||||
using UniformValues = gfx::UniformValues<UniformList>;
|
||||
|
||||
static std::unique_ptr<SymbolSizeBinder> create(const float tileZoom,
|
||||
static std::unique_ptr<SymbolSizeBinder> create(float tileZoom,
|
||||
const style::PropertyValue<float>& sizeProperty,
|
||||
const float defaultValue);
|
||||
float defaultValue);
|
||||
|
||||
virtual Range<float> getVertexSizeData(const GeometryTileFeature& feature) = 0;
|
||||
virtual ZoomEvaluatedSize evaluateForZoom(float currentZoom) const = 0;
|
||||
@@ -406,15 +406,15 @@ class SymbolIconProgram : public SymbolProgram<
|
||||
public:
|
||||
using SymbolProgram::SymbolProgram;
|
||||
|
||||
static LayoutUniformValues layoutUniformValues(const bool isText,
|
||||
const bool hasVariablePacement,
|
||||
static LayoutUniformValues layoutUniformValues(bool isText,
|
||||
bool hasVariablePacement,
|
||||
const style::SymbolPropertyValues&,
|
||||
const Size& texsize,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
const bool alongLine,
|
||||
bool alongLine,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const float symbolFadeChange);
|
||||
float symbolFadeChange);
|
||||
};
|
||||
|
||||
enum class SymbolSDFPart {
|
||||
@@ -457,17 +457,17 @@ public:
|
||||
|
||||
using BaseProgram::BaseProgram;
|
||||
|
||||
static LayoutUniformValues layoutUniformValues(const bool isText,
|
||||
const bool hasVariablePacement,
|
||||
static LayoutUniformValues layoutUniformValues(bool isText,
|
||||
bool hasVariablePacement,
|
||||
const style::SymbolPropertyValues&,
|
||||
const Size& texsize,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
const float pixelRatio,
|
||||
const bool alongLine,
|
||||
float pixelRatio,
|
||||
bool alongLine,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const float SymbolFadeChange,
|
||||
const SymbolSDFPart);
|
||||
float SymbolFadeChange,
|
||||
SymbolSDFPart);
|
||||
};
|
||||
|
||||
using SymbolTextAndIconProgramUniforms = TypeList<uniforms::texsize_icon>;
|
||||
@@ -491,17 +491,17 @@ public:
|
||||
|
||||
using BaseProgram::BaseProgram;
|
||||
|
||||
static LayoutUniformValues layoutUniformValues(const bool hasVariablePacement,
|
||||
static LayoutUniformValues layoutUniformValues(bool hasVariablePacement,
|
||||
const style::SymbolPropertyValues&,
|
||||
const Size& texsize,
|
||||
const Size& texsize_icon,
|
||||
const std::array<float, 2>& pixelsToGLUnits,
|
||||
const float pixelRatio,
|
||||
const bool alongLine,
|
||||
float pixelRatio,
|
||||
bool alongLine,
|
||||
const RenderTile&,
|
||||
const TransformState&,
|
||||
const float SymbolFadeChange,
|
||||
const SymbolSDFPart);
|
||||
float SymbolFadeChange,
|
||||
SymbolSDFPart);
|
||||
};
|
||||
|
||||
class SymbolSDFIconProgram : public SymbolSDFProgram<SymbolSDFIconProgram, style::IconPaintProperties> {
|
||||
|
||||
@@ -18,8 +18,8 @@ public:
|
||||
using PossiblyEvaluatedLayoutProperties = style::CircleLayoutProperties::PossiblyEvaluated;
|
||||
|
||||
CircleBucket(const std::map<std::string, Immutable<style::LayerProperties>>& layerPaintProperties,
|
||||
const MapMode mode,
|
||||
const float zoom);
|
||||
MapMode mode,
|
||||
float zoom);
|
||||
~CircleBucket() override;
|
||||
|
||||
bool hasData() const override;
|
||||
|
||||
@@ -22,8 +22,8 @@ public:
|
||||
|
||||
FillBucket(const PossiblyEvaluatedLayoutProperties& layout,
|
||||
const std::map<std::string, Immutable<style::LayerProperties>>& layerPaintProperties,
|
||||
const float zoom,
|
||||
const uint32_t overscaling);
|
||||
float zoom,
|
||||
uint32_t overscaling);
|
||||
|
||||
void addFeature(const GeometryTileFeature&,
|
||||
const GeometryCollection&,
|
||||
|
||||
@@ -21,8 +21,8 @@ public:
|
||||
|
||||
FillExtrusionBucket(const PossiblyEvaluatedLayoutProperties&,
|
||||
const std::map<std::string, Immutable<style::LayerProperties>>&,
|
||||
const float,
|
||||
const uint32_t);
|
||||
float,
|
||||
uint32_t);
|
||||
|
||||
void addFeature(const GeometryTileFeature&,
|
||||
const GeometryCollection&,
|
||||
|
||||
@@ -21,8 +21,8 @@ public:
|
||||
|
||||
LineBucket(PossiblyEvaluatedLayoutProperties layout,
|
||||
const std::map<std::string, Immutable<style::LayerProperties>>& layerPaintProperties,
|
||||
const float zoom,
|
||||
const uint32_t overscaling);
|
||||
float zoom,
|
||||
uint32_t overscaling);
|
||||
~LineBucket() override;
|
||||
|
||||
void addFeature(const GeometryTileFeature&,
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
std::string bucketName_,
|
||||
const std::vector<SymbolInstance>&&,
|
||||
const std::vector<SortKeyRange>&&,
|
||||
const float tilePixelRatio,
|
||||
float tilePixelRatio,
|
||||
bool allowVerticalPlacement,
|
||||
std::vector<style::TextWritingModeType> placementModes,
|
||||
bool iconsInText);
|
||||
@@ -96,10 +96,9 @@ public:
|
||||
bool hasTextCollisionCircleData() const;
|
||||
bool hasFormatSectionOverrides() const;
|
||||
|
||||
|
||||
void sortFeatures(const float angle);
|
||||
void sortFeatures(float angle);
|
||||
// Returns references to the `symbolInstances` items, sorted by viewport Y.
|
||||
SymbolInstanceReferences getSortedSymbols(const float angle) const;
|
||||
SymbolInstanceReferences getSortedSymbols(float angle) const;
|
||||
// Returns references to the `symbolInstances` items, which belong to the `sortKeyRange` range;
|
||||
// returns references to all the symbols if |sortKeyRange| is `nullopt`.
|
||||
SymbolInstanceReferences getSymbols(const optional<SortKeyRange>& sortKeyRange = nullopt) const;
|
||||
|
||||
@@ -18,8 +18,13 @@ private:
|
||||
bool hasCrossfade() const override;
|
||||
void render(PaintParameters&) override;
|
||||
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
|
||||
const TransformState&, const float, const mat4&, const FeatureState&) const override;
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&,
|
||||
const GeometryTileFeature&,
|
||||
float,
|
||||
const TransformState&,
|
||||
float,
|
||||
const mat4&,
|
||||
const FeatureState&) const override;
|
||||
|
||||
// Paint properties
|
||||
style::CirclePaintProperties::Unevaluated unevaluated;
|
||||
|
||||
@@ -20,8 +20,13 @@ private:
|
||||
bool is3D() const override;
|
||||
void render(PaintParameters&) override;
|
||||
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
|
||||
const TransformState&, const float, const mat4&, const FeatureState&) const override;
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&,
|
||||
const GeometryTileFeature&,
|
||||
float,
|
||||
const TransformState&,
|
||||
float,
|
||||
const mat4&,
|
||||
const FeatureState&) const override;
|
||||
|
||||
// Paint properties
|
||||
style::FillExtrusionPaintProperties::Unevaluated unevaluated;
|
||||
|
||||
@@ -21,8 +21,13 @@ private:
|
||||
bool hasCrossfade() const override;
|
||||
void render(PaintParameters&) override;
|
||||
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
|
||||
const TransformState&, const float, const mat4&, const FeatureState&) const override;
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&,
|
||||
const GeometryTileFeature&,
|
||||
float,
|
||||
const TransformState&,
|
||||
float,
|
||||
const mat4&,
|
||||
const FeatureState&) const override;
|
||||
|
||||
// Paint properties
|
||||
style::FillPaintProperties::Unevaluated unevaluated;
|
||||
|
||||
@@ -23,8 +23,13 @@ private:
|
||||
void upload(gfx::UploadPass&) override;
|
||||
void render(PaintParameters&) override;
|
||||
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
|
||||
const TransformState&, const float, const mat4&, const FeatureState&) const override;
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&,
|
||||
const GeometryTileFeature&,
|
||||
float,
|
||||
const TransformState&,
|
||||
float,
|
||||
const mat4&,
|
||||
const FeatureState&) const override;
|
||||
void updateColorRamp();
|
||||
|
||||
// Paint properties
|
||||
|
||||
@@ -24,13 +24,18 @@ private:
|
||||
void upload(gfx::UploadPass&) override;
|
||||
void render(PaintParameters&) override;
|
||||
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
|
||||
const TransformState&, const float, const mat4&, const FeatureState&) const override;
|
||||
bool queryIntersectsFeature(const GeometryCoordinates&,
|
||||
const GeometryTileFeature&,
|
||||
float,
|
||||
const TransformState&,
|
||||
float,
|
||||
const mat4&,
|
||||
const FeatureState&) const override;
|
||||
|
||||
// Paint properties
|
||||
style::LinePaintProperties::Unevaluated unevaluated;
|
||||
|
||||
float getLineWidth(const GeometryTileFeature&, const float, const FeatureState&) const;
|
||||
float getLineWidth(const GeometryTileFeature&, float, const FeatureState&) const;
|
||||
void updateColorRamp();
|
||||
|
||||
PremultipliedImage colorRamp;
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
const std::array<float, 2>& translation,
|
||||
style::TranslateAnchorType anchor,
|
||||
const TransformState& state,
|
||||
const bool inViewportPixelUnits) const;
|
||||
bool inViewportPixelUnits) const;
|
||||
|
||||
void setFeatureState(const LayerFeatureStates&);
|
||||
|
||||
|
||||
@@ -6,10 +6,7 @@ namespace mbgl {
|
||||
|
||||
class Anchor;
|
||||
|
||||
bool checkMaxAngle(const GeometryCoordinates& line,
|
||||
const Anchor& anchor,
|
||||
const float labelLength,
|
||||
const float windowSize,
|
||||
const float maxAngle);
|
||||
bool checkMaxAngle(
|
||||
const GeometryCoordinates& line, const Anchor& anchor, float labelLength, float windowSize, float maxAngle);
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -122,17 +122,17 @@ public:
|
||||
|
||||
CollisionFeature(const GeometryCoordinates& line,
|
||||
const Anchor&,
|
||||
const float top,
|
||||
const float bottom,
|
||||
const float left,
|
||||
const float right,
|
||||
float top,
|
||||
float bottom,
|
||||
float left,
|
||||
float right,
|
||||
const optional<Padding>& collisionPadding,
|
||||
const float boxScale,
|
||||
const float padding,
|
||||
const style::SymbolPlacementType,
|
||||
float boxScale,
|
||||
float padding,
|
||||
style::SymbolPlacementType,
|
||||
IndexedSubfeature,
|
||||
const float overscaling,
|
||||
const float rotate);
|
||||
float overscaling,
|
||||
float rotate);
|
||||
|
||||
std::vector<CollisionBox> boxes;
|
||||
IndexedSubfeature indexedFeature;
|
||||
@@ -142,9 +142,9 @@ private:
|
||||
void bboxifyLabel(const GeometryCoordinates& line,
|
||||
GeometryCoordinate& anchorPoint,
|
||||
std::size_t segment,
|
||||
const float length,
|
||||
const float boxSize,
|
||||
const float overscaling);
|
||||
float length,
|
||||
float boxSize,
|
||||
float overscaling);
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -29,20 +29,20 @@ public:
|
||||
IntersectStatus intersectsTileEdges(const CollisionBox&,
|
||||
Point<float> shift,
|
||||
const mat4& posMatrix,
|
||||
const float textPixelRatio,
|
||||
float textPixelRatio,
|
||||
const CollisionBoundaries& tileEdges) const;
|
||||
std::pair<bool, bool> placeFeature(
|
||||
const CollisionFeature& feature,
|
||||
Point<float> shift,
|
||||
const mat4& posMatrix,
|
||||
const mat4& labelPlaneMatrix,
|
||||
const float textPixelRatio,
|
||||
float textPixelRatio,
|
||||
const PlacedSymbol& symbol,
|
||||
const float scale,
|
||||
const float fontSize,
|
||||
const bool allowOverlap,
|
||||
const bool pitchWithMap,
|
||||
const bool collisionDebug,
|
||||
float scale,
|
||||
float fontSize,
|
||||
bool allowOverlap,
|
||||
bool pitchWithMap,
|
||||
bool collisionDebug,
|
||||
const optional<CollisionBoundaries>& avoidEdges,
|
||||
const optional<std::function<bool(const IndexedSubfeature&)>>& collisionGroupPredicate,
|
||||
std::vector<ProjectedCollisionBox>& /*out*/);
|
||||
@@ -67,19 +67,23 @@ private:
|
||||
const CollisionFeature& feature,
|
||||
const mat4& posMatrix,
|
||||
const mat4& labelPlaneMatrix,
|
||||
const float textPixelRatio,
|
||||
float textPixelRatio,
|
||||
const PlacedSymbol& symbol,
|
||||
const float scale,
|
||||
const float fontSize,
|
||||
const bool allowOverlap,
|
||||
const bool pitchWithMap,
|
||||
const bool collisionDebug,
|
||||
float scale,
|
||||
float fontSize,
|
||||
bool allowOverlap,
|
||||
bool pitchWithMap,
|
||||
bool collisionDebug,
|
||||
const optional<CollisionBoundaries>& avoidEdges,
|
||||
const optional<std::function<bool(const IndexedSubfeature&)>>& collisionGroupPredicate,
|
||||
std::vector<ProjectedCollisionBox>& /*out*/);
|
||||
|
||||
float approximateTileDistance(const TileDistance& tileDistance, const float lastSegmentAngle, const float pixelsToTileUnits, const float cameraToAnchorDistance, const bool pitchWithMap);
|
||||
|
||||
float approximateTileDistance(const TileDistance& tileDistance,
|
||||
float lastSegmentAngle,
|
||||
float pixelsToTileUnits,
|
||||
float cameraToAnchorDistance,
|
||||
bool pitchWithMap);
|
||||
|
||||
std::pair<float,float> projectAnchor(const mat4& posMatrix, const Point<float>& point) const;
|
||||
std::pair<Point<float>,float> projectAndGetPerspectiveRatio(const mat4& posMatrix, const Point<float>& point) const;
|
||||
Point<float> projectPoint(const mat4& posMatrix, const Point<float>& point) const;
|
||||
|
||||
@@ -8,23 +8,22 @@ namespace mbgl {
|
||||
|
||||
Anchors getAnchors(const GeometryCoordinates& line,
|
||||
float spacing,
|
||||
const float maxAngle,
|
||||
const float textLeft,
|
||||
const float textRight,
|
||||
const float iconLeft,
|
||||
const float iconRight,
|
||||
const float glyphSize,
|
||||
const float boxScale,
|
||||
const float overscaling);
|
||||
float maxAngle,
|
||||
float textLeft,
|
||||
float textRight,
|
||||
float iconLeft,
|
||||
float iconRight,
|
||||
float glyphSize,
|
||||
float boxScale,
|
||||
float overscaling);
|
||||
|
||||
optional<Anchor> getCenterAnchor(const GeometryCoordinates& line,
|
||||
const float maxAngle,
|
||||
const float textLeft,
|
||||
const float textRight,
|
||||
const float iconLeft,
|
||||
const float iconRight,
|
||||
const float glyphSize,
|
||||
const float boxScale);
|
||||
|
||||
float maxAngle,
|
||||
float textLeft,
|
||||
float textRight,
|
||||
float iconLeft,
|
||||
float iconRight,
|
||||
float glyphSize,
|
||||
float boxScale);
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
void setPlacement(Immutable<Placement>);
|
||||
const Immutable<Placement>& getPlacement() const { return placement; }
|
||||
void setPlacementStale() { stale = true; }
|
||||
bool placementIsRecent(TimePoint now, const float zoom, optional<Duration> periodOverride = nullopt) const;
|
||||
bool placementIsRecent(TimePoint now, float zoom, optional<Duration> periodOverride = nullopt) const;
|
||||
bool hasTransitions(TimePoint now) const;
|
||||
|
||||
private:
|
||||
@@ -128,9 +128,9 @@ public:
|
||||
|
||||
const CollisionIndex& getCollisionIndex() const;
|
||||
TimePoint getCommitTime() const { return commitTime; }
|
||||
Duration getUpdatePeriod(const float zoom) const;
|
||||
Duration getUpdatePeriod(float zoom) const;
|
||||
|
||||
float zoomAdjustment(const float zoom) const;
|
||||
float zoomAdjustment(float zoom) const;
|
||||
const JointPlacement* getSymbolPlacement(const SymbolInstance&) const;
|
||||
|
||||
const RetainedQueryData& getQueryData(uint32_t bucketInstanceId) const;
|
||||
|
||||
@@ -63,7 +63,7 @@ SymbolQuads getIconQuads(const PositionedIcon& shapedIcon,
|
||||
bool hasIconTextFit);
|
||||
|
||||
SymbolQuads getGlyphQuads(const Shaping& shapedText,
|
||||
const std::array<float, 2> textOffset,
|
||||
std::array<float, 2> textOffset,
|
||||
const style::SymbolLayoutProperties::Evaluated&,
|
||||
style::SymbolPlacementType placement,
|
||||
const ImageMap& imageMap,
|
||||
|
||||
@@ -66,10 +66,10 @@ public:
|
||||
// Updates shaped icon's bounds based on shaped text's bounds and provided
|
||||
// layout properties.
|
||||
void fitIconToText(const Shaping& shapedText,
|
||||
const style::IconTextFitType textFit,
|
||||
style::IconTextFitType textFit,
|
||||
const std::array<float, 4>& padding,
|
||||
const std::array<float, 2>& iconOffset,
|
||||
const float fontScale);
|
||||
float fontScale);
|
||||
|
||||
const ImagePosition& image() const { return _image; }
|
||||
float top() const { return _top; }
|
||||
@@ -86,7 +86,7 @@ Shaping getShaping(const TaggedString& string,
|
||||
style::TextJustifyType textJustify,
|
||||
float spacing,
|
||||
const std::array<float, 2>& translate,
|
||||
const WritingModeType,
|
||||
WritingModeType,
|
||||
BiDi& bidi,
|
||||
const GlyphMap& glyphMap,
|
||||
const GlyphPositions& glyphPositions,
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
std::unique_ptr<TileRenderData> createRenderData() override;
|
||||
void setLayers(const std::vector<Immutable<style::LayerProperties>>&) override;
|
||||
void setShowCollisionBoxes(const bool showCollisionBoxes) override;
|
||||
void setShowCollisionBoxes(bool showCollisionBoxes) override;
|
||||
|
||||
void onGlyphsAvailable(GlyphMap) override;
|
||||
void onImagesAvailable(ImageMap, ImageMap, ImageVersionMap versionMap, uint64_t imageCorrelationID) override;
|
||||
|
||||
@@ -33,9 +33,9 @@ public:
|
||||
OverscaledTileID,
|
||||
std::string,
|
||||
const std::atomic<bool>&,
|
||||
const MapMode,
|
||||
const float pixelRatio,
|
||||
const bool showCollisionBoxes_);
|
||||
MapMode,
|
||||
float pixelRatio,
|
||||
bool showCollisionBoxes_);
|
||||
~GeometryTileWorker();
|
||||
|
||||
void setLayers(std::vector<Immutable<style::LayerProperties>>,
|
||||
|
||||
@@ -76,8 +76,8 @@ public:
|
||||
bool layerPropertiesUpdated(const Immutable<style::LayerProperties>& layerProperties) override;
|
||||
|
||||
HillshadeBucket* getBucket() const;
|
||||
void backfillBorder(const RasterDEMTile& borderTile, const DEMTileNeighbors mask);
|
||||
|
||||
void backfillBorder(const RasterDEMTile& borderTile, DEMTileNeighbors mask);
|
||||
|
||||
// neighboringTiles is a bitmask for which neighboring tiles have been backfilled
|
||||
// there are max 8 possible neighboring tiles, so each bit represents one neighbor
|
||||
DEMTileNeighbors neighboringTiles = DEMTileNeighbors::Empty;
|
||||
|
||||
@@ -56,8 +56,7 @@ constexpr bool operator!=(circle<T> const& lhs, circle<T> const& rhs)
|
||||
template <class T>
|
||||
class GridIndex {
|
||||
public:
|
||||
|
||||
GridIndex(const float width_, const float height_, const uint32_t cellSize_);
|
||||
GridIndex(float width_, float height_, uint32_t cellSize_);
|
||||
|
||||
using BBox = mapbox::geometry::box<float>;
|
||||
using BCircle = geometry::circle<float>;
|
||||
@@ -81,9 +80,9 @@ private:
|
||||
void query(const BBox&, std::function<bool (const T&, const BBox&)>) const;
|
||||
void query(const BCircle&, std::function<bool (const T&, const BBox&)>) const;
|
||||
|
||||
std::size_t convertToXCellCoord(const float x) const;
|
||||
std::size_t convertToYCellCoord(const float y) const;
|
||||
|
||||
std::size_t convertToXCellCoord(float x) const;
|
||||
std::size_t convertToYCellCoord(float y) const;
|
||||
|
||||
bool boxesCollide(const BBox&, const BBox&) const;
|
||||
bool circlesCollide(const BCircle&, const BCircle&) const;
|
||||
bool circleAndBoxCollide(const BCircle&, const BBox&) const;
|
||||
|
||||
Reference in New Issue
Block a user