-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from Yvee1/SimpleSets
SimpleSets: basic implementation
- Loading branch information
Showing
72 changed files
with
5,763 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "function_painting.h" | ||
|
||
namespace cartocrow::renderer { | ||
FunctionPainting::FunctionPainting(const std::function<void(GeometryRenderer&)>& draw_function) | ||
: m_draw_function(draw_function) {} | ||
|
||
void FunctionPainting::paint(GeometryRenderer& renderer) const { | ||
m_draw_function(renderer); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef CARTOCROW_FUNCTION_PAINTING_H | ||
#define CARTOCROW_FUNCTION_PAINTING_H | ||
|
||
#include "geometry_renderer.h" | ||
#include "geometry_painting.h" | ||
|
||
namespace cartocrow::renderer { | ||
class FunctionPainting : public GeometryPainting { | ||
public: | ||
FunctionPainting(const std::function<void(GeometryRenderer&)>& draw_function); | ||
void paint(renderer::GeometryRenderer& renderer) const override; | ||
|
||
private: | ||
const std::function<void(GeometryRenderer&)> m_draw_function; | ||
}; | ||
} | ||
|
||
#endif //CARTOCROW_FUNCTION_PAINTING_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
set(SOURCES | ||
cat_point.cpp | ||
types.cpp | ||
parse_input.cpp | ||
patterns/pattern.cpp | ||
patterns/single_point.cpp | ||
patterns/matching.cpp | ||
patterns/island.cpp | ||
patterns/bank.cpp | ||
dilated/dilated_poly.cpp | ||
helpers/approximate_convex_hull.cpp | ||
helpers/cs_curve_helpers.cpp | ||
helpers/cs_polygon_helpers.cpp | ||
helpers/cs_polyline_helpers.cpp | ||
helpers/poly_line_gon_intersection.cpp | ||
partition_algorithm.cpp | ||
partition_painting.cpp | ||
drawing_algorithm.cpp | ||
grow_circles.cpp | ||
) | ||
set(HEADERS | ||
types.h | ||
settings.h | ||
cat_point.h | ||
parse_input.h | ||
patterns/pattern.h | ||
patterns/poly_pattern.h | ||
patterns/single_point.h | ||
patterns/matching.h | ||
patterns/island.h | ||
patterns/bank.h | ||
dilated/dilated_poly.h | ||
helpers/approximate_convex_hull.h | ||
helpers/arrangement_helpers.h | ||
helpers/point_voronoi_helpers.h | ||
helpers/poly_line_gon_intersection.h | ||
helpers/cropped_voronoi.h | ||
helpers/cs_curve_helpers.h | ||
helpers/cs_polygon_helpers.h | ||
helpers/cs_polyline_helpers.h | ||
partition_algorithm.h | ||
partition_painting.h | ||
partition.h | ||
drawing_algorithm.h | ||
general_polyline.h | ||
grow_circles.h | ||
) | ||
|
||
add_library(simplesets ${SOURCES}) | ||
target_link_libraries(simplesets | ||
PUBLIC core | ||
) | ||
|
||
cartocrow_install_module(simplesets) | ||
install(FILES ${HEADERS} DESTINATION ${CARTOCROW_INSTALL_DIR}/simplesets) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "cat_point.h" | ||
|
||
namespace cartocrow::simplesets { | ||
std::ostream& operator<<(std::ostream& os, CatPoint const& catPoint) { | ||
return os << catPoint.category << " " << catPoint.point; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef CARTOCROW_CAT_POINT_H | ||
#define CARTOCROW_CAT_POINT_H | ||
|
||
#include "types.h" | ||
|
||
namespace cartocrow::simplesets { | ||
/// Categorical point | ||
struct CatPoint { | ||
unsigned int category; | ||
Point<Inexact> point; | ||
CatPoint(unsigned int category, Point<Inexact> point) : category(category), point(point) {}; | ||
bool operator==(const CatPoint&) const = default; | ||
}; | ||
|
||
std::ostream& operator<<(std::ostream& os, CatPoint const& catPoint); | ||
} | ||
|
||
#endif //CARTOCROW_CAT_POINT_H |
Oops, something went wrong.