30 if (lhs.GetVertexRadius() != rhs.GetVertexRadius())
36 const auto lhr = lhs.GetVertices();
37 const auto rhr = rhs.GetVertices();
38 return std::equal(cbegin(lhr), cend(lhr), cbegin(rhr), cend(rhr));
43 if (
const auto numVertices =
size(vertices); numVertices > 0)
45 auto i0 = decltype(numVertices){0};
46 auto max_x =
GetX(vertices[0]);
47 for (
auto i = decltype(numVertices){1}; i < numVertices; ++i)
49 const auto x =
GetX(vertices[i]);
50 if ((max_x < x) || ((max_x == x) && (
GetY(vertices[i]) <
GetY(vertices[i0]))))
58 return GetInvalid<std::size_t>();
63 auto result = std::vector<Length2>{};
69 if (index0 != GetInvalid<std::size_t>())
71 const auto numVertices =
size(vertices);
72 auto hull = std::vector<decltype(size(vertices))>();
79 auto ie = decltype(numVertices){0};
80 for (
auto j = decltype(numVertices){1}; j < numVertices; ++j)
88 const auto r = vertices[ie] - vertices[ih];
89 const auto v = vertices[j] - vertices[ih];
90 const auto c =
Cross(r, v);
104 const auto count =
size(hull);
105 for (
auto i = decltype(count){0}; i < count; ++i)
107 result.emplace_back(vertices[hull[i]]);
116 const auto count = proxy.GetVertexCount();
117 const auto vr = proxy.GetVertexRadius();
125 const auto v0 = proxy.GetVertex(0);
126 const auto delta = point - v0;
134 auto maxIdx =
static_cast<decltype(count)
>(-1);
135 for (
auto i = decltype(count){0}; i < count; ++i)
137 const auto vi = proxy.GetVertex(i);
138 const auto delta = point - vi;
139 const auto dot =
Dot(proxy.GetNormal(i), delta);
150 assert(maxIdx < count);
152 const auto v0 = proxy.GetVertex(maxIdx);
153 const auto v1 = proxy.GetVertex(
GetModuloNext(maxIdx, count));
154 const auto edge = v1 - v0;
155 if (
const auto delta0 = v0 - point;
Dot(edge, delta0) >= 0_m2)
160 if (
const auto delta1 = point - v1;
Dot(edge, delta1) >= 0_m2)