<commit_before>#ifndef SCENE_BUILDINGS_FACADES_LOWPOLYROOFBUILDER_HPP_DEFINED
#define SCENE_BUILDINGS_FACADES_LOWPOLYROOFBUILDER_HPP_DEFINED

#include "GeoCoordinate.hpp"
#include "builders/buildings/roofs/RoofBuilder.hpp"
#include "builders/generators/IcoSphereGenerator.hpp"
#include "utils/GeometryUtils.hpp"
#include "utils/GeoUtils.hpp"

#include <vector>

namespace utymap { namespace builders {

// Builds flat roof in low poly.
class DomeRoofBuilder : public RoofBuilder
{
public:
    DomeRoofBuilder(const utymap::builders::BuilderContext& builderContext,
                    utymap::builders::MeshContext& meshContext)
      : RoofBuilder(builderContext, meshContext)
    {
    }

    void build(utymap::meshing::Polygon& polygon)
    {
        utymap::meshing::Vector2 center2d;
        double radius;
        utymap::utils::getCircle(polygon.rectangle, center2d, radius);

        double heightInMeters = utymap::utils::GeoUtils::distance(
            utymap::GeoCoordinate(center2d.y, center2d.x),
            utymap::GeoCoordinate(center2d.y + radius, center2d.x));
        
        utymap::builders::IcoSphereGenerator generator(builderContext_, meshContext_, RoofColorKey);
        generator
            .setCenter(utymap::meshing::Vector3(center2d.x, minHeight_, center2d.y))
            .setRadius(radius, heightInMeters)
            .setRecursionLevel(2)
            .isSemiSphere(true)
            .setVertexNoiseFreq(0.0)
            .generate();
    }

private:

};

}}

#endif // SCENE_BUILDINGS_FACADES_LOWPOLYROOFBUILDER_HPP_DEFINED<commit_msg>core: fix namespace issue<commit_after>#ifndef SCENE_BUILDINGS_FACADES_DOMEROOFBUILDER_HPP_DEFINED
#define SCENE_BUILDINGS_FACADES_DOMEROOFBUILDER_HPP_DEFINED

#include "GeoCoordinate.hpp"
#include "builders/buildings/roofs/RoofBuilder.hpp"
#include "builders/generators/IcoSphereGenerator.hpp"
#include "utils/GeometryUtils.hpp"
#include "utils/GeoUtils.hpp"

#include <vector>

namespace utymap { namespace builders {

// Builds flat roof in low poly.
class DomeRoofBuilder : public RoofBuilder
{
public:
    DomeRoofBuilder(const utymap::builders::BuilderContext& builderContext,
                    utymap::builders::MeshContext& meshContext)
      : RoofBuilder(builderContext, meshContext)
    {
    }

    void build(utymap::meshing::Polygon& polygon)
    {
        utymap::meshing::Vector2 center2d;
        double radius;
        utymap::utils::getCircle(polygon.rectangle, center2d, radius);

        double heightInMeters = utymap::utils::GeoUtils::distance(
            utymap::GeoCoordinate(center2d.y, center2d.x),
            utymap::GeoCoordinate(center2d.y + radius, center2d.x));
        
        utymap::builders::IcoSphereGenerator generator(builderContext_, meshContext_, RoofColorKey);
        generator
            .setCenter(utymap::meshing::Vector3(center2d.x, minHeight_, center2d.y))
            .setRadius(radius, heightInMeters)
            .setRecursionLevel(2)
            .isSemiSphere(true)
            .setVertexNoiseFreq(0.0)
            .generate();
    }

private:

};

}}

#endif // SCENE_BUILDINGS_FACADES_DOMEROOFBUILDER_HPP_DEFINED
{'fraction_non_alphanumeric': 0.10283349251830627, 'fraction_numerical': 0.008277618592804839, 'mean_word_length': 3.7177177177177176, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2490895', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1051, 'n_words': 148}