mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-10 11:32:15 +00:00
Merged 71027,71093,71117 (centroid nD plus convert to detail)
[SVN r71120]
This commit is contained in:
@@ -16,7 +16,6 @@ test-suite boost-geometry-algorithms
|
||||
[ run buffer.cpp ]
|
||||
[ run centroid.cpp ]
|
||||
[ run comparable_distance.cpp ]
|
||||
[ run convert.cpp ]
|
||||
[ run convex_hull.cpp ]
|
||||
[ run correct.cpp ]
|
||||
[ run difference.cpp ]
|
||||
|
||||
@@ -8,8 +8,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "assign", "assign.vcproj", "
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expand", "expand.vcproj", "{5330DAB1-DF27-44FC-971B-3C5094F82FA3}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convert", "convert.vcproj", "{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convex_hull", "convex_hull.vcproj", "{0AFF7A85-63A7-4178-92A5-CC692B09F5B9}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "distance", "distance.vcproj", "{347D08A4-22E9-45B1-A55B-AE84AA2EAA53}"
|
||||
@@ -78,10 +76,6 @@ Global
|
||||
{5330DAB1-DF27-44FC-971B-3C5094F82FA3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5330DAB1-DF27-44FC-971B-3C5094F82FA3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5330DAB1-DF27-44FC-971B-3C5094F82FA3}.Release|Win32.Build.0 = Release|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.Build.0 = Release|Win32
|
||||
{0AFF7A85-63A7-4178-92A5-CC692B09F5B9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0AFF7A85-63A7-4178-92A5-CC692B09F5B9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0AFF7A85-63A7-4178-92A5-CC692B09F5B9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
||||
@@ -78,6 +78,7 @@ void test_2d()
|
||||
template <typename P>
|
||||
void test_3d()
|
||||
{
|
||||
test_centroid<bg::model::linestring<P> >("LINESTRING(1 2 3,4 5 -6,7 -8 9,-10 11 12,13 -14 -15, 16 17 18)", 5.6748865168734692, 0.31974938587214002, 1.9915270387763671);
|
||||
test_centroid<bg::model::box<P> >("POLYGON((1 2 3,5 6 7))", 3, 4, 5);
|
||||
test_centroid<P>("POINT(1 2 3)", 1, 2, 3);
|
||||
}
|
||||
@@ -93,6 +94,7 @@ int test_main(int, char* [])
|
||||
|
||||
#if defined(HAVE_TTMATH)
|
||||
test_2d<bg::model::d2::point_xy<ttmath_big> >();
|
||||
test_3d<boost::tuple<ttmath_big, ttmath_big, ttmath_big> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
test-suite boost-geometry-algorithms-detail
|
||||
:
|
||||
[ run convert.cpp ]
|
||||
[ run partition.cpp ]
|
||||
;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
#include <boost/geometry/algorithms/assign.hpp>
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/algorithms/detail/convert.hpp>
|
||||
#include <boost/geometry/algorithms/make.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
|
||||
@@ -35,7 +35,7 @@ void test_all()
|
||||
bg::assign(p, 1, 2);
|
||||
|
||||
box_type b;
|
||||
bg::convert(p, b);
|
||||
bg::detail::convert(p, b);
|
||||
|
||||
BOOST_CHECK_CLOSE((bg::get<0, 0>(b)), 1.0, 0.001);
|
||||
BOOST_CHECK_CLOSE((bg::get<0, 1>(b)), 2.0, 0.001);
|
||||
@@ -59,7 +59,7 @@ void test_std()
|
||||
bg::set<bg::max_corner, 1>(b, 4);
|
||||
|
||||
ring_type ring;
|
||||
bg::convert(b, ring);
|
||||
bg::detail::convert(b, ring);
|
||||
|
||||
//std::cout << bg::wkt(b) << std::endl;
|
||||
//std::cout << bg::wkt(ring) << std::endl;
|
||||
@@ -85,10 +85,10 @@ void test_std()
|
||||
|
||||
polygon_type polygon;
|
||||
|
||||
bg::convert(ring, polygon);
|
||||
bg::detail::convert(ring, polygon);
|
||||
BOOST_CHECK_EQUAL(bg::num_points(polygon), 5u);
|
||||
|
||||
bg::convert(polygon, ring);
|
||||
bg::detail::convert(polygon, ring);
|
||||
BOOST_CHECK_EQUAL(bg::num_points(ring), 5u);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\convert"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
|
||||
InheritedPropertySheets="..\..\boost.vsprops;..\..\ttmath.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
@@ -41,7 +41,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../..;.."
|
||||
AdditionalIncludeDirectories="../../../../..;../.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="1"
|
||||
@@ -93,7 +93,7 @@
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\convert"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
|
||||
InheritedPropertySheets="..\..\boost.vsprops;..\..\ttmath.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
@@ -114,7 +114,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../../..;.."
|
||||
AdditionalIncludeDirectories="../../../../..;../.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
ExceptionHandling="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -2,6 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "partition", "partition.vcproj", "{5EF21715-DB87-41AB-9D0A-59ED04F316A1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convert", "convert.vcproj", "{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -12,6 +14,10 @@ Global
|
||||
{5EF21715-DB87-41AB-9D0A-59ED04F316A1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5EF21715-DB87-41AB-9D0A-59ED04F316A1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5EF21715-DB87-41AB-9D0A-59ED04F316A1}.Release|Win32.Build.0 = Release|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user