17 auto join = [&](std::vector<FaceType>& existing,
18 const std::vector<FaceType>& additional) ->
void {
19 for (
const auto& aface : additional) {
22 [&](
size_t x) {
return (
x + cvert); });
23 existing.push_back(nface);
32 for_each(vertices.begin(), vertices.end(),
33 [&](
auto&
v) {
v = transform *
v; });
38 for (
const auto& vtx : vertices) {
39 extent.
check(transform * vtx);
45 for (
const auto& face : faces) {
46 std::vector<Vector3D> tface;
47 tface.reserve(face.size());
49 tface.push_back(transform * vertices[
f]);
57 auto radialDistance = [&](
const Vector3D& pos1,
64 double L = p1p2.norm();
71 double f = p1p2.dot(p1O) /
L;
76 Vector2D closest = f * p1p2.normalized() + p1;
77 double dist = (closest - O).
norm();
82 for (
size_t iv = 1; iv < vertices.size() + 1; ++iv) {
83 size_t fpoint = iv < vertices.size() ? iv : 0;
84 double testR = radialDistance(transform * vertices[fpoint],
85 transform * vertices[iv - 1]);