Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ac1096c8
Commit
ac1096c8
authored
Jun 08, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scenario and various libs added
parent
c4c0f8c8
Changes
49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
4642 additions
and
713 deletions
+4642
-713
.gitmodules
.gitmodules
+6
-0
CMakeCache.txt
CMakeCache.txt
+297
-0
SurveyComplexItem_delLater.cc
SurveyComplexItem_delLater.cc
+0
-713
WGS84toCartesian
libs/WGS84toCartesian
+1
-0
1.0.0.tar.gz
libs/mason_packages/.binaries/headers/geometry/1.0.0.tar.gz
+0
-0
1.0.3.tar.gz
libs/mason_packages/.binaries/headers/polylabel/1.0.3.tar.gz
+0
-0
1.1.0.tar.gz
libs/mason_packages/.binaries/headers/variant/1.1.0.tar.gz
+0
-0
1.1.4.tar.gz
libs/mason_packages/.binaries/headers/variant/1.1.4.tar.gz
+0
-0
feature.hpp
...ackages/headers/geometry/1.0.0/include/mapbox/feature.hpp
+113
-0
geometry.hpp
...ckages/headers/geometry/1.0.0/include/mapbox/geometry.hpp
+12
-0
box.hpp
...es/headers/geometry/1.0.0/include/mapbox/geometry/box.hpp
+36
-0
empty.hpp
.../headers/geometry/1.0.0/include/mapbox/geometry/empty.hpp
+18
-0
envelope.hpp
...aders/geometry/1.0.0/include/mapbox/geometry/envelope.hpp
+33
-0
for_each_point.hpp
...geometry/1.0.0/include/mapbox/geometry/for_each_point.hpp
+51
-0
geometry.hpp
...aders/geometry/1.0.0/include/mapbox/geometry/geometry.hpp
+56
-0
line_string.hpp
...rs/geometry/1.0.0/include/mapbox/geometry/line_string.hpp
+28
-0
multi_line_string.hpp
...metry/1.0.0/include/mapbox/geometry/multi_line_string.hpp
+28
-0
multi_point.hpp
...rs/geometry/1.0.0/include/mapbox/geometry/multi_point.hpp
+28
-0
multi_polygon.hpp
.../geometry/1.0.0/include/mapbox/geometry/multi_polygon.hpp
+28
-0
point.hpp
.../headers/geometry/1.0.0/include/mapbox/geometry/point.hpp
+42
-0
point_arithmetic.hpp
...ometry/1.0.0/include/mapbox/geometry/point_arithmetic.hpp
+119
-0
polygon.hpp
...eaders/geometry/1.0.0/include/mapbox/geometry/polygon.hpp
+45
-0
geometry_io.hpp
...ges/headers/geometry/1.0.0/include/mapbox/geometry_io.hpp
+98
-0
mason.ini
libs/mason_packages/headers/geometry/1.0.0/mason.ini
+4
-0
LICENSE
libs/mason_packages/headers/polylabel/1.0.3/LICENSE
+14
-0
README.md
libs/mason_packages/headers/polylabel/1.0.3/README.md
+64
-0
polylabel.hpp
...ages/headers/polylabel/1.0.3/include/mapbox/polylabel.hpp
+178
-0
mason.ini
libs/mason_packages/headers/polylabel/1.0.3/mason.ini
+4
-0
LICENSE
libs/mason_packages/headers/variant/1.1.0/LICENSE
+25
-0
README.md
libs/mason_packages/headers/variant/1.1.0/README.md
+111
-0
optional.hpp
...ackages/headers/variant/1.1.0/include/mapbox/optional.hpp
+74
-0
recursive_wrapper.hpp
...eaders/variant/1.1.0/include/mapbox/recursive_wrapper.hpp
+122
-0
variant.hpp
...packages/headers/variant/1.1.0/include/mapbox/variant.hpp
+901
-0
variant_io.hpp
...kages/headers/variant/1.1.0/include/mapbox/variant_io.hpp
+45
-0
LICENSE
libs/mason_packages/headers/variant/1.1.4/LICENSE
+25
-0
README.md
libs/mason_packages/headers/variant/1.1.4/README.md
+258
-0
optional.hpp
...ackages/headers/variant/1.1.4/include/mapbox/optional.hpp
+74
-0
recursive_wrapper.hpp
...eaders/variant/1.1.4/include/mapbox/recursive_wrapper.hpp
+122
-0
variant.hpp
...packages/headers/variant/1.1.4/include/mapbox/variant.hpp
+1013
-0
variant_io.hpp
...kages/headers/variant/1.1.4/include/mapbox/variant_io.hpp
+45
-0
variant_visitor.hpp
.../headers/variant/1.1.4/include/mapbox/variant_visitor.hpp
+38
-0
mason.ini
libs/mason_packages/headers/variant/1.1.4/mason.ini
+4
-0
.gitignore
libs/snake/snake/.gitignore
+73
-0
CMakeLists.txt
libs/snake/snake/CMakeLists.txt
+29
-0
snake.cpp
libs/snake/snake/snake.cpp
+87
-0
snake.h
libs/snake/snake/snake.h
+66
-0
snake_geometry.cpp
libs/snake/snake/snake_geometry.cpp
+178
-0
snake_geometry.h
libs/snake/snake/snake_geometry.h
+31
-0
snake_global.h
libs/snake/snake/snake_global.h
+18
-0
No files found.
.gitmodules
View file @
ac1096c8
...
...
@@ -4,3 +4,9 @@
[submodule "libs/mavlink/include/mavlink/v2.0"]
path = libs/mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
[submodule "libs/WGS84toCartesian"]
path = libs/WGS84toCartesian
url = https://github.com/chrberger/WGS84toCartesian.git
[submodule "libs/polylabel"]
path = libs/polylabel
url = https://github.com/mapbox/polylabel.git
CMakeCache.txt
0 → 100644
View file @
ac1096c8
This diff is collapsed.
Click to expand it.
SurveyComplexItem_delLater.cc
deleted
100644 → 0
View file @
c4c0f8c8
This diff is collapsed.
Click to expand it.
WGS84toCartesian
@
15181a84
Subproject commit 15181a849968866efa5ac220d3f7c2e5ac281254
libs/mason_packages/.binaries/headers/geometry/1.0.0.tar.gz
0 → 100644
View file @
ac1096c8
File added
libs/mason_packages/.binaries/headers/polylabel/1.0.3.tar.gz
0 → 100644
View file @
ac1096c8
File added
libs/mason_packages/.binaries/headers/variant/1.1.0.tar.gz
0 → 100644
View file @
ac1096c8
File added
libs/mason_packages/.binaries/headers/variant/1.1.4.tar.gz
0 → 100644
View file @
ac1096c8
File added
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/feature.hpp
0 → 100644
View file @
ac1096c8
#pragma once
#include <mapbox/geometry.hpp>
#include <mapbox/variant.hpp>
#include <cstdint>
#include <string>
#include <vector>
#include <unordered_map>
namespace
mapbox
{
namespace
feature
{
struct
value
;
struct
null_value_t
{
};
constexpr
bool
operator
==
(
const
null_value_t
&
,
const
null_value_t
&
)
{
return
true
;
}
constexpr
bool
operator
!=
(
const
null_value_t
&
,
const
null_value_t
&
)
{
return
false
;
}
constexpr
bool
operator
<
(
const
null_value_t
&
,
const
null_value_t
&
)
{
return
false
;
}
constexpr
null_value_t
null_value
=
null_value_t
();
// Multiple numeric types (uint64_t, int64_t, double) are present in order to support
// the widest possible range of JSON numbers, which do not have a maximum range.
// Implementations that produce `value`s should use that order for type preference,
// using uint64_t for positive integers, int64_t for negative integers, and double
// for non-integers and integers outside the range of 64 bits.
using
value_base
=
mapbox
::
util
::
variant
<
null_value_t
,
bool
,
uint64_t
,
int64_t
,
double
,
std
::
string
,
mapbox
::
util
::
recursive_wrapper
<
std
::
vector
<
value
>>
,
mapbox
::
util
::
recursive_wrapper
<
std
::
unordered_map
<
std
::
string
,
value
>>>
;
struct
value
:
value_base
{
using
value_base
::
value_base
;
};
using
property_map
=
std
::
unordered_map
<
std
::
string
,
value
>
;
// The same considerations and requirement for numeric types apply as for `value_base`.
using
identifier
=
mapbox
::
util
::
variant
<
null_value_t
,
uint64_t
,
int64_t
,
double
,
std
::
string
>
;
template
<
class
T
>
struct
feature
{
using
coordinate_type
=
T
;
using
geometry_type
=
mapbox
::
geometry
::
geometry
<
T
>
;
// Fully qualified to avoid GCC -fpermissive error.
geometry_type
geometry
;
property_map
properties
;
identifier
id
;
feature
()
:
geometry
(),
properties
(),
id
()
{}
feature
(
geometry_type
const
&
geom_
)
:
geometry
(
geom_
),
properties
(),
id
()
{}
feature
(
geometry_type
&&
geom_
)
:
geometry
(
std
::
move
(
geom_
)),
properties
(),
id
()
{}
feature
(
geometry_type
const
&
geom_
,
property_map
const
&
prop_
)
:
geometry
(
geom_
),
properties
(
prop_
),
id
()
{}
feature
(
geometry_type
&&
geom_
,
property_map
&&
prop_
)
:
geometry
(
std
::
move
(
geom_
)),
properties
(
std
::
move
(
prop_
)),
id
()
{}
feature
(
geometry_type
const
&
geom_
,
property_map
const
&
prop_
,
identifier
const
&
id_
)
:
geometry
(
geom_
),
properties
(
prop_
),
id
(
id_
)
{}
feature
(
geometry_type
&&
geom_
,
property_map
&&
prop_
,
identifier
&&
id_
)
:
geometry
(
std
::
move
(
geom_
)),
properties
(
std
::
move
(
prop_
)),
id
(
std
::
move
(
id_
))
{}
};
template
<
class
T
>
constexpr
bool
operator
==
(
feature
<
T
>
const
&
lhs
,
feature
<
T
>
const
&
rhs
)
{
return
lhs
.
id
==
rhs
.
id
&&
lhs
.
geometry
==
rhs
.
geometry
&&
lhs
.
properties
==
rhs
.
properties
;
}
template
<
class
T
>
constexpr
bool
operator
!=
(
feature
<
T
>
const
&
lhs
,
feature
<
T
>
const
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
template
<
class
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
feature_collection
:
Cont
<
feature
<
T
>>
{
using
coordinate_type
=
T
;
using
feature_type
=
feature
<
T
>
;
using
container_type
=
Cont
<
feature_type
>
;
using
size_type
=
typename
container_type
::
size_type
;
template
<
class
...
Args
>
feature_collection
(
Args
&&
...
args
)
:
container_type
(
std
::
forward
<
Args
>
(
args
)...)
{
}
feature_collection
(
std
::
initializer_list
<
feature_type
>
args
)
:
container_type
(
std
::
move
(
args
))
{}
};
}
// namespace feature
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry.hpp
0 → 100644
View file @
ac1096c8
#pragma once
#include <mapbox/geometry/point.hpp>
#include <mapbox/geometry/line_string.hpp>
#include <mapbox/geometry/polygon.hpp>
#include <mapbox/geometry/multi_point.hpp>
#include <mapbox/geometry/multi_line_string.hpp>
#include <mapbox/geometry/multi_polygon.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/point_arithmetic.hpp>
#include <mapbox/geometry/for_each_point.hpp>
#include <mapbox/geometry/envelope.hpp>
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/box.hpp
0 → 100644
View file @
ac1096c8
#pragma once
#include <mapbox/geometry/point.hpp>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
>
struct
box
{
using
coordinate_type
=
T
;
using
point_type
=
point
<
coordinate_type
>
;
constexpr
box
(
point_type
const
&
min_
,
point_type
const
&
max_
)
:
min
(
min_
),
max
(
max_
)
{
}
point_type
min
;
point_type
max
;
};
template
<
typename
T
>
constexpr
bool
operator
==
(
box
<
T
>
const
&
lhs
,
box
<
T
>
const
&
rhs
)
{
return
lhs
.
min
==
rhs
.
min
&&
lhs
.
max
==
rhs
.
max
;
}
template
<
typename
T
>
constexpr
bool
operator
!=
(
box
<
T
>
const
&
lhs
,
box
<
T
>
const
&
rhs
)
{
return
lhs
.
min
!=
rhs
.
min
||
lhs
.
max
!=
rhs
.
max
;
}
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/empty.hpp
0 → 100644
View file @
ac1096c8
#pragma once
namespace
mapbox
{
namespace
geometry
{
struct
empty
{
};
// this Geometry type represents the empty point set, ∅, for the coordinate space (OGC Simple Features).
constexpr
bool
operator
==
(
empty
,
empty
)
{
return
true
;
}
constexpr
bool
operator
!=
(
empty
,
empty
)
{
return
false
;
}
constexpr
bool
operator
<
(
empty
,
empty
)
{
return
false
;
}
constexpr
bool
operator
>
(
empty
,
empty
)
{
return
false
;
}
constexpr
bool
operator
<=
(
empty
,
empty
)
{
return
true
;
}
constexpr
bool
operator
>=
(
empty
,
empty
)
{
return
true
;
}
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/envelope.hpp
0 → 100644
View file @
ac1096c8
#pragma once
#include <mapbox/geometry/box.hpp>
#include <mapbox/geometry/for_each_point.hpp>
#include <limits>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
G
,
typename
T
=
typename
G
::
coordinate_type
>
box
<
T
>
envelope
(
G
const
&
geometry
)
{
using
limits
=
std
::
numeric_limits
<
T
>
;
T
min_t
=
limits
::
has_infinity
?
-
limits
::
infinity
()
:
limits
::
min
();
T
max_t
=
limits
::
has_infinity
?
limits
::
infinity
()
:
limits
::
max
();
point
<
T
>
min
(
max_t
,
max_t
);
point
<
T
>
max
(
min_t
,
min_t
);
for_each_point
(
geometry
,
[
&
](
point
<
T
>
const
&
point
)
{
if
(
min
.
x
>
point
.
x
)
min
.
x
=
point
.
x
;
if
(
min
.
y
>
point
.
y
)
min
.
y
=
point
.
y
;
if
(
max
.
x
<
point
.
x
)
max
.
x
=
point
.
x
;
if
(
max
.
y
<
point
.
y
)
max
.
y
=
point
.
y
;
});
return
box
<
T
>
(
min
,
max
);
}
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/for_each_point.hpp
0 → 100644
View file @
ac1096c8
#pragma once
#include <mapbox/geometry/geometry.hpp>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
F
>
void
for_each_point
(
mapbox
::
geometry
::
empty
const
&
,
F
&&
)
{
}
template
<
typename
Point
,
typename
F
>
auto
for_each_point
(
Point
&&
point
,
F
&&
f
)
->
decltype
(
point
.
x
,
point
.
y
,
void
())
{
f
(
std
::
forward
<
Point
>
(
point
));
}
template
<
typename
Container
,
typename
F
>
auto
for_each_point
(
Container
&&
container
,
F
&&
f
)
->
decltype
(
container
.
begin
(),
container
.
end
(),
void
());
template
<
typename
...
Types
,
typename
F
>
void
for_each_point
(
mapbox
::
util
::
variant
<
Types
...
>
const
&
geom
,
F
&&
f
)
{
mapbox
::
util
::
variant
<
Types
...
>::
visit
(
geom
,
[
&
](
auto
const
&
g
)
{
for_each_point
(
g
,
f
);
});
}
template
<
typename
...
Types
,
typename
F
>
void
for_each_point
(
mapbox
::
util
::
variant
<
Types
...
>&
geom
,
F
&&
f
)
{
mapbox
::
util
::
variant
<
Types
...
>::
visit
(
geom
,
[
&
](
auto
&
g
)
{
for_each_point
(
g
,
f
);
});
}
template
<
typename
Container
,
typename
F
>
auto
for_each_point
(
Container
&&
container
,
F
&&
f
)
->
decltype
(
container
.
begin
(),
container
.
end
(),
void
())
{
for
(
auto
&
e
:
container
)
{
for_each_point
(
e
,
f
);
}
}
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/geometry.hpp
0 → 100644
View file @
ac1096c8
#pragma once
#include <mapbox/geometry/empty.hpp>
#include <mapbox/geometry/point.hpp>
#include <mapbox/geometry/line_string.hpp>
#include <mapbox/geometry/polygon.hpp>
#include <mapbox/geometry/multi_point.hpp>
#include <mapbox/geometry/multi_line_string.hpp>
#include <mapbox/geometry/multi_polygon.hpp>
#include <mapbox/variant.hpp>
// stl
#include <vector>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
geometry_collection
;
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
using
geometry_base
=
mapbox
::
util
::
variant
<
empty
,
point
<
T
>
,
line_string
<
T
,
Cont
>
,
polygon
<
T
,
Cont
>
,
multi_point
<
T
,
Cont
>
,
multi_line_string
<
T
,
Cont
>
,
multi_polygon
<
T
,
Cont
>
,
geometry_collection
<
T
,
Cont
>>
;
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
geometry
:
geometry_base
<
T
,
Cont
>
{
using
coordinate_type
=
T
;
using
geometry_base
<
T
>::
geometry_base
;
};
template
<
typename
T
,
template
<
typename
...
>
class
Cont
>
struct
geometry_collection
:
Cont
<
geometry
<
T
>>
{
using
coordinate_type
=
T
;
using
geometry_type
=
geometry
<
T
>
;
using
container_type
=
Cont
<
geometry_type
>
;
using
size_type
=
typename
container_type
::
size_type
;
template
<
class
...
Args
>
geometry_collection
(
Args
&&
...
args
)
:
container_type
(
std
::
forward
<
Args
>
(
args
)...)
{
}
geometry_collection
(
std
::
initializer_list
<
geometry_type
>
args
)
:
container_type
(
std
::
move
(
args
))
{}
};
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/line_string.hpp
0 → 100644
View file @
ac1096c8
#pragma once
// mapbox
#include <mapbox/geometry/point.hpp>
// stl
#include <vector>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
line_string
:
Cont
<
point
<
T
>>
{
using
coordinate_type
=
T
;
using
point_type
=
point
<
T
>
;
using
container_type
=
Cont
<
point_type
>
;
using
size_type
=
typename
container_type
::
size_type
;
template
<
class
...
Args
>
line_string
(
Args
&&
...
args
)
:
container_type
(
std
::
forward
<
Args
>
(
args
)...)
{
}
line_string
(
std
::
initializer_list
<
point_type
>
args
)
:
container_type
(
std
::
move
(
args
))
{}
};
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/multi_line_string.hpp
0 → 100644
View file @
ac1096c8
#pragma once
// mapbox
#include <mapbox/geometry/line_string.hpp>
// stl
#include <vector>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
multi_line_string
:
Cont
<
line_string
<
T
>>
{
using
coordinate_type
=
T
;
using
line_string_type
=
line_string
<
T
>
;
using
container_type
=
Cont
<
line_string_type
>
;
using
size_type
=
typename
container_type
::
size_type
;
template
<
class
...
Args
>
multi_line_string
(
Args
&&
...
args
)
:
container_type
(
std
::
forward
<
Args
>
(
args
)...)
{
}
multi_line_string
(
std
::
initializer_list
<
line_string_type
>
args
)
:
container_type
(
std
::
move
(
args
))
{}
};
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/multi_point.hpp
0 → 100644
View file @
ac1096c8
#pragma once
// mapbox
#include <mapbox/geometry/point.hpp>
// stl
#include <vector>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
multi_point
:
Cont
<
point
<
T
>>
{
using
coordinate_type
=
T
;
using
point_type
=
point
<
T
>
;
using
container_type
=
Cont
<
point_type
>
;
using
size_type
=
typename
container_type
::
size_type
;
template
<
class
...
Args
>
multi_point
(
Args
&&
...
args
)
:
container_type
(
std
::
forward
<
Args
>
(
args
)...)
{
}
multi_point
(
std
::
initializer_list
<
point_type
>
args
)
:
container_type
(
std
::
move
(
args
))
{}
};
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/multi_polygon.hpp
0 → 100644
View file @
ac1096c8
#pragma once
// mapbox
#include <mapbox/geometry/polygon.hpp>
// stl
#include <vector>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
multi_polygon
:
Cont
<
polygon
<
T
>>
{
using
coordinate_type
=
T
;
using
polygon_type
=
polygon
<
T
>
;
using
container_type
=
Cont
<
polygon_type
>
;
using
size_type
=
typename
container_type
::
size_type
;
template
<
class
...
Args
>
multi_polygon
(
Args
&&
...
args
)
:
container_type
(
std
::
forward
<
Args
>
(
args
)...)
{
}
multi_polygon
(
std
::
initializer_list
<
polygon_type
>
args
)
:
container_type
(
std
::
move
(
args
))
{}
};
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/point.hpp
0 → 100644
View file @
ac1096c8
#pragma once
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
>
struct
point
{
using
coordinate_type
=
T
;
constexpr
point
()
:
x
(),
y
()
{
}
constexpr
point
(
T
x_
,
T
y_
)
:
x
(
x_
),
y
(
y_
)
{
}
T
x
;
T
y
;
};
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
template
<
typename
T
>
constexpr
bool
operator
==
(
point
<
T
>
const
&
lhs
,
point
<
T
>
const
&
rhs
)
{
return
lhs
.
x
==
rhs
.
x
&&
lhs
.
y
==
rhs
.
y
;
}
#pragma GCC diagnostic pop
template
<
typename
T
>
constexpr
bool
operator
!=
(
point
<
T
>
const
&
lhs
,
point
<
T
>
const
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/point_arithmetic.hpp
0 → 100644
View file @
ac1096c8
#pragma once
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
>
point
<
T
>
operator
+
(
point
<
T
>
const
&
lhs
,
point
<
T
>
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
+
rhs
.
x
,
lhs
.
y
+
rhs
.
y
);
}
template
<
typename
T
>
point
<
T
>
operator
+
(
point
<
T
>
const
&
lhs
,
T
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
+
rhs
,
lhs
.
y
+
rhs
);
}
template
<
typename
T
>
point
<
T
>
operator
-
(
point
<
T
>
const
&
lhs
,
point
<
T
>
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
-
rhs
.
x
,
lhs
.
y
-
rhs
.
y
);
}
template
<
typename
T
>
point
<
T
>
operator
-
(
point
<
T
>
const
&
lhs
,
T
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
-
rhs
,
lhs
.
y
-
rhs
);
}
template
<
typename
T
>
point
<
T
>
operator
*
(
point
<
T
>
const
&
lhs
,
point
<
T
>
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
*
rhs
.
x
,
lhs
.
y
*
rhs
.
y
);
}
template
<
typename
T
>
point
<
T
>
operator
*
(
point
<
T
>
const
&
lhs
,
T
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
*
rhs
,
lhs
.
y
*
rhs
);
}
template
<
typename
T
>
point
<
T
>
operator
/
(
point
<
T
>
const
&
lhs
,
point
<
T
>
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
/
rhs
.
x
,
lhs
.
y
/
rhs
.
y
);
}
template
<
typename
T
>
point
<
T
>
operator
/
(
point
<
T
>
const
&
lhs
,
T
const
&
rhs
)
{
return
point
<
T
>
(
lhs
.
x
/
rhs
,
lhs
.
y
/
rhs
);
}
template
<
typename
T
>
point
<
T
>&
operator
+=
(
point
<
T
>&
lhs
,
point
<
T
>
const
&
rhs
)
{
lhs
.
x
+=
rhs
.
x
;
lhs
.
y
+=
rhs
.
y
;
return
lhs
;
}
template
<
typename
T
>
point
<
T
>&
operator
+=
(
point
<
T
>&
lhs
,
T
const
&
rhs
)
{
lhs
.
x
+=
rhs
;
lhs
.
y
+=
rhs
;
return
lhs
;
}
template
<
typename
T
>
point
<
T
>&
operator
-=
(
point
<
T
>&
lhs
,
point
<
T
>
const
&
rhs
)
{
lhs
.
x
-=
rhs
.
x
;
lhs
.
y
-=
rhs
.
y
;
return
lhs
;
}
template
<
typename
T
>
point
<
T
>&
operator
-=
(
point
<
T
>&
lhs
,
T
const
&
rhs
)
{
lhs
.
x
-=
rhs
;
lhs
.
y
-=
rhs
;
return
lhs
;
}
template
<
typename
T
>
point
<
T
>&
operator
*=
(
point
<
T
>&
lhs
,
point
<
T
>
const
&
rhs
)
{
lhs
.
x
*=
rhs
.
x
;
lhs
.
y
*=
rhs
.
y
;
return
lhs
;
}
template
<
typename
T
>
point
<
T
>&
operator
*=
(
point
<
T
>&
lhs
,
T
const
&
rhs
)
{
lhs
.
x
*=
rhs
;
lhs
.
y
*=
rhs
;
return
lhs
;
}
template
<
typename
T
>
point
<
T
>&
operator
/=
(
point
<
T
>&
lhs
,
point
<
T
>
const
&
rhs
)
{
lhs
.
x
/=
rhs
.
x
;
lhs
.
y
/=
rhs
.
y
;
return
lhs
;
}
template
<
typename
T
>
point
<
T
>&
operator
/=
(
point
<
T
>&
lhs
,
T
const
&
rhs
)
{
lhs
.
x
/=
rhs
;
lhs
.
y
/=
rhs
;
return
lhs
;
}
}
// namespace geometry
}
// namespace mapbox
libs/mason_packages/headers/geometry/1.0.0/include/mapbox/geometry/polygon.hpp
0 → 100644
View file @
ac1096c8
#pragma once
// mapbox
#include <mapbox/geometry/point.hpp>
// stl
#include <vector>
namespace
mapbox
{
namespace
geometry
{
template
<
typename
T
,
template
<
typename
...
>
class
Cont
=
std
::
vector
>
struct
linear_ring
:
Cont
<
point
<
T
>>
{
using
coordinate_type
=
T
;
using
point_type
=
point
<
T
>
;
using
container_type
=
Cont
<
point_type
>
;
using
size_type
=
typename
container_type
::
size_type
;
template
<
class
...
Args
>
linear_ring
(
Args
&&
...
args
)
:
container_type
(
std
::
forward
<
Args
>
(
args
)...)
{
}
linear_ring
(
std
::
initializer_list
<
point_type
>
args
)