mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 21:44:04 +00:00
[test][algorithms][intersection] enable get_turns invariance checking only for
linear/linear geometry combinations
This commit is contained in:
parent
6054352dd1
commit
a5f0a565bc
@ -12,6 +12,8 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include "../test_set_ops_linear_linear.hpp"
|
||||
#include <from_wkt.hpp>
|
||||
@ -69,7 +71,7 @@ private:
|
||||
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
|
||||
std::cout << "intersection : " << bg::wkt(mls_output) << std::endl;
|
||||
std::cout << "expected intersection : " << bg::wkt(mls_int1)
|
||||
<< std::endl;
|
||||
<< " or: " << bg::wkt(mls_int2) << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "************************************" << std::endl;
|
||||
std::cout << std::endl;
|
||||
@ -120,8 +122,8 @@ private:
|
||||
std::cout << "Geometry #1: " << bg::wkt(geometry2) << std::endl;
|
||||
std::cout << "Geometry #2: " << bg::wkt(geometry1) << std::endl;
|
||||
std::cout << "intersection : " << bg::wkt(mls_output) << std::endl;
|
||||
std::cout << "expected intersection : " << bg::wkt(mls_int2)
|
||||
<< std::endl;
|
||||
std::cout << "expected intersection : " << bg::wkt(mls_int1)
|
||||
<< " or: " << bg::wkt(mls_int2) << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "************************************" << std::endl;
|
||||
std::cout << std::endl;
|
||||
@ -192,14 +194,27 @@ public:
|
||||
Geometry2 rg2(geometry2);
|
||||
bg::reverse<Geometry2>(rg2);
|
||||
|
||||
test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
|
||||
typedef typename bg::tag_cast
|
||||
<
|
||||
Geometry1, bg::linear_tag
|
||||
>::type tag1_type;
|
||||
|
||||
typedef typename bg::tag_cast
|
||||
<
|
||||
Geometry2, bg::linear_tag
|
||||
>::type tag2_type;
|
||||
|
||||
bool const are_linear
|
||||
= boost::is_same<tag1_type, bg::linear_tag>::value
|
||||
&& boost::is_same<tag2_type, bg::linear_tag>::value;
|
||||
|
||||
test_get_turns_ll_invariance<are_linear>::apply(geometry1, geometry2);
|
||||
#ifdef BOOST_GEOMETRY_TEST_DEBUG
|
||||
std::cout << std::endl
|
||||
<< "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
|
||||
<< std::endl << std::endl;
|
||||
#endif
|
||||
test_get_turns_ll_invariance<>::apply(rg1, geometry2);
|
||||
|
||||
test_get_turns_ll_invariance<are_linear>::apply(rg1, geometry2);
|
||||
|
||||
base_test(geometry1, geometry2, mls_int1, mls_int2, case_id, tolerance);
|
||||
// base_test(rg1, rg2, mls_int1, mls_int2);
|
||||
|
@ -32,6 +32,7 @@ namespace bg_turns = bg_detail::turns;
|
||||
|
||||
template
|
||||
<
|
||||
bool Enable = true,
|
||||
bool EnableRemoveDuplicateTurns = true,
|
||||
bool EnableDegenerateTurns = true
|
||||
>
|
||||
@ -166,6 +167,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <bool EnableRemoveDuplicateTurns, bool EnableDegenerateTurns>
|
||||
class test_get_turns_ll_invariance
|
||||
<
|
||||
false, EnableRemoveDuplicateTurns, EnableDegenerateTurns
|
||||
>
|
||||
{
|
||||
public:
|
||||
template <typename Linear1, typename Linear2>
|
||||
static inline void apply(Linear1 const&, Linear2 const&)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BOOST_GEOMETRY_TEST_GET_TURNS_LL_INVARIANCE_HPP
|
||||
|
Loading…
x
Reference in New Issue
Block a user