Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'drape_frontend/apply_feature_functors.hpp')
-rw-r--r--drape_frontend/apply_feature_functors.hpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/drape_frontend/apply_feature_functors.hpp b/drape_frontend/apply_feature_functors.hpp
index b2edc079bd..e95efe075c 100644
--- a/drape_frontend/apply_feature_functors.hpp
+++ b/drape_frontend/apply_feature_functors.hpp
@@ -31,7 +31,8 @@ using TInsertShapeFn = function<void(drape_ptr<MapShape> && shape)>;
class BaseApplyFeature
{
public:
- BaseApplyFeature(TInsertShapeFn const & insertShape, FeatureID const & id,
+ BaseApplyFeature(m2::PointD const & tileCenter,
+ TInsertShapeFn const & insertShape, FeatureID const & id,
int minVisibleScale, uint8_t rank, CaptionDescription const & captions);
virtual ~BaseApplyFeature() {}
@@ -58,6 +59,8 @@ protected:
int m_minVisibleScale;
uint8_t m_rank;
HotelData m_hotelData;
+
+ m2::PointD m_tileCenter;
};
class ApplyPointFeature : public BaseApplyFeature
@@ -65,7 +68,8 @@ class ApplyPointFeature : public BaseApplyFeature
using TBase = BaseApplyFeature;
public:
- ApplyPointFeature(TInsertShapeFn const & insertShape, FeatureID const & id,
+ ApplyPointFeature(m2::PointD const & tileCenter,
+ TInsertShapeFn const & insertShape, FeatureID const & id,
int minVisibleScale, uint8_t rank, CaptionDescription const & captions,
float posZ);
@@ -93,8 +97,11 @@ class ApplyAreaFeature : public ApplyPointFeature
using TBase = ApplyPointFeature;
public:
- ApplyAreaFeature(TInsertShapeFn const & insertShape, FeatureID const & id, m2::RectD tileRect, float minPosZ,
- float posZ, int minVisibleScale, uint8_t rank, CaptionDescription const & captions);
+ ApplyAreaFeature(m2::PointD const & tileCenter,
+ TInsertShapeFn const & insertShape, FeatureID const & id,
+ m2::RectD const & clipRect, float minPosZ,
+ float posZ, int minVisibleScale, uint8_t rank,
+ CaptionDescription const & captions);
using TBase::operator ();
@@ -112,13 +119,13 @@ private:
bool FindEdge(TEdge const & edge);
m2::PointD CalculateNormal(m2::PointD const & p1, m2::PointD const & p2, m2::PointD const & p3) const;
- vector<m2::PointF> m_triangles;
+ vector<m2::PointD> m_triangles;
unordered_map<int, m2::PointD> m_indices;
vector<pair<TEdge, int>> m_edges;
float const m_minPosZ;
bool const m_isBuilding;
- m2::RectD m_tileRect;
+ m2::RectD m_clipRect;
};
class ApplyLineFeature : public BaseApplyFeature
@@ -126,9 +133,10 @@ class ApplyLineFeature : public BaseApplyFeature
using TBase = BaseApplyFeature;
public:
- ApplyLineFeature(TInsertShapeFn const & insertShape, FeatureID const & id, m2::RectD tileRect,
- int minVisibleScale, uint8_t rank, CaptionDescription const & captions,
- double currentScaleGtoP, bool simplify, size_t pointsCount);
+ ApplyLineFeature(m2::PointD const & tileCenter, double currentScaleGtoP,
+ TInsertShapeFn const & insertShape, FeatureID const & id,
+ m2::RectD const & clipRect, int minVisibleScale, uint8_t rank,
+ CaptionDescription const & captions, bool simplify, size_t pointsCount);
void operator() (m2::PointD const & point);
bool HasGeometry() const;
@@ -145,7 +153,7 @@ private:
size_t m_initialPointsCount;
double m_shieldDepth;
ShieldRuleProto const * m_shieldRule;
- m2::RectD m_tileRect;
+ m2::RectD m_clipRect;
#ifdef CALC_FILTERED_POINTS
int m_readedCount;