48 const auto btm_rgt =
Length2{+hx, -hy};
49 const auto top_rgt =
Length2{ hx, hy};
50 const auto top_lft =
Length2{-hx, +hy};
51 const auto btm_lft =
Length2{-hx, -hy};
54 m_vertices.emplace_back(btm_rgt);
55 m_vertices.emplace_back(top_rgt);
56 m_vertices.emplace_back(top_lft);
57 m_vertices.emplace_back(btm_lft);
84 for (
auto i = decltype(GetVertexCount()){0}; i < GetVertexCount(); ++i)
87 m_normals[i] =
Rotate(m_normals[i], xfm.q);
97 for (
const auto& v: m_vertices)
101 return Set(newPoints);
108 for (
auto&& p: points)
112 return Set(point_set);
118 assert(
size(m_vertices) < std::numeric_limits<VertexCounter>::max());
126 for (
auto i = decltype(count){0}; i < count; ++i)
128 const auto edge =
GetEdge(*
this, i);
134 m_normals.emplace_back(
UnitVec{});
141 m_centroid = GetInvalid<Length2>();
144 m_centroid = m_vertices[0];
147 m_centroid = (m_vertices[0] + m_vertices[1]) /
Real{2};
161 const auto i0 = index;
168 const auto count =
size(verts);
169 for (
auto i = decltype(count){0}; i < count; ++i)
173 const auto p = verts[i1];
174 const auto e = verts[i2] - p;
175 for (
auto j = decltype(count){0}; j < count; ++j)
177 if ((j == i1) || (j == i2))
181 const auto v = verts[j] - p;
182 const auto c =
Cross(e, v);