128 std::vector<MathLib::Point3d*>
const& points)
129 : _radius(-1), _center({0, 0, 0})
131 const std::vector<MathLib::Point3d*>& sphere_points(points);
133 recurseCalculation(sphere_points, 0, sphere_points.size(), 0);
139 std::vector<MathLib::Point3d*> sphere_points,
140 std::size_t start_idx,
142 std::size_t n_boundary_points)
145 switch (n_boundary_points)
155 *sphere_points[start_idx - 2]);
159 *sphere_points[start_idx - 2],
160 *sphere_points[start_idx - 3]);
164 *sphere_points[start_idx - 1], *sphere_points[start_idx - 2],
165 *sphere_points[start_idx - 3], *sphere_points[start_idx - 4]);
169 for (std::size_t i = 0; i < length; ++i)
177 std::vector<MathLib::Point3d*>::iterator::difference_type;
178 std::vector<MathLib::Point3d*>
const tmp_ps(
179 sphere_points.cbegin() +
static_cast<DiffType
>(start_idx),
180 sphere_points.cbegin() +
181 static_cast<DiffType
>(start_idx + i + 1));
182 std::copy(tmp_ps.cbegin(), --tmp_ps.cend(),
183 sphere_points.begin() +
184 static_cast<DiffType
>(start_idx + 1));
185 sphere_points[start_idx] = tmp_ps.back();
188 n_boundary_points + 1);
bool isCoplanar(const MathLib::Point3d &a, const MathLib::Point3d &b, const MathLib::Point3d &c, const MathLib::Point3d &d)
Checks if the four given points are located on a plane.