| 841 | } |
| 842 | |
| 843 | void ApplyAreaFeature::ProcessRule(AreaRuleProto const & areaRule, double areaDepth, bool isHatching) |
| 844 | { |
| 845 | AreaViewParams params; |
| 846 | params.m_tileCenter = m_tileRect.Center(); |
| 847 | params.m_depth = PriorityToDepth(areaRule.priority(), drule::area, areaDepth); |
| 848 | params.m_color = ToDrapeColor(areaRule.color()); |
| 849 | params.m_rank = m_f.GetRank(); |
| 850 | params.m_minPosZ = m_minPosZ; |
| 851 | params.m_posZ = m_posZ; |
| 852 | params.m_hatching = isHatching; |
| 853 | params.m_baseGtoPScale = m_currentScaleGtoP; |
| 854 | |
| 855 | BuildingOutline outline; |
| 856 | if (m_isBuilding && !isHatching) |
| 857 | { |
| 858 | /// @todo Make borders work for non-building areas too. |
| 859 | outline.m_generateOutline = |
| 860 | areaRule.has_border() && areaRule.color() != areaRule.border().color() && areaRule.border().width() > 0.0; |
| 861 | if (outline.m_generateOutline) |
| 862 | params.m_outlineColor = ToDrapeColor(areaRule.border().color()); |
| 863 | |
| 864 | bool const calculateNormals = m_posZ > 0.0; |
| 865 | if (calculateNormals || outline.m_generateOutline) |
| 866 | CalculateBuildingOutline(calculateNormals, outline); |
| 867 | |
| 868 | params.m_is3D = !outline.m_indices.empty() && calculateNormals; |
| 869 | } |
| 870 | |
| 871 | // see ProcessAreaRules: isHatching first, - !isHatching last. |
| 872 | m_insertShape( |
| 873 | make_unique_dp<AreaShape>(!isHatching ? std::move(m_triangles) : m_triangles, std::move(outline), params)); |
| 874 | } |
| 875 | |
| 876 | ApplyLineFeatureGeometry::ApplyLineFeatureGeometry(TileKey const & tileKey, TInsertShapeFn const & insertShape, |
| 877 | FeatureType & f, double currentScaleGtoP) |
nothing calls this directly
no test coverage detected