24 auto join = [&](std::vector<FaceType>& existing,
25 const std::vector<FaceType>& additional) ->
void {
26 for (
const auto& aface : additional) {
29 [&](
size_t x) {
return (
x + cvert); });
30 existing.push_back(nface);
40 [&](
auto&
v) {
v = transform *
v; });
47 auto vt = (transform *
v);
56 for (
const auto& face : faces) {
57 std::vector<Vector3> tface;
58 tface.reserve(face.size());
60 tface.push_back(vtxs[
f]);
70 auto radialDistance = [&](
const Vector3& pos1,
71 const Vector3& pos2) ->
double {
73 Vector2 p1p2 = (pos2.block<2, 1>(0, 0) - pos1.block<2, 1>(0, 0));
74 double L = p1p2.norm();
75 Vector2 p1O = (O - pos1.block<2, 1>(0, 0));
79 return std::numeric_limits<double>::max();
81 double f = p1p2.dot(p1O) /
L;
90 for (
size_t iv = 1; iv < vtxs.size() + 1; ++iv) {
91 size_t fpoint = iv < vtxs.size() ? iv : 0;
92 double testR = radialDistance(vtxs[fpoint], vtxs[iv - 1]);