mirror of https://github.com/CGAL/cgal
switch parameter order in ErrorMetricProxy concept
This commit is contained in:
parent
a8a0eb5aa8
commit
cfd47020bd
|
|
@ -29,11 +29,11 @@ public:
|
||||||
FT compute_error(const TriangleMesh &tm, const face_descriptor &f, const Proxy &proxy) const;
|
FT compute_error(const TriangleMesh &tm, const face_descriptor &f, const Proxy &proxy) const;
|
||||||
|
|
||||||
/// Computes and returns fitted proxy from a range of faces.
|
/// Computes and returns fitted proxy from a range of faces.
|
||||||
/// @tparam FaceRange range of
|
/// @tparam FaceRange a range of
|
||||||
/// `boost::graph_traits<TriangleMesh>::%face_descriptor`, model of `Range`.
|
/// `boost::graph_traits<TriangleMesh>::%face_descriptor` model of `ConstRange`
|
||||||
/// Its iterator type is `InputIterator`.
|
/// with iterator type being model of `InputIterator`.
|
||||||
template <typename FaceRange>
|
template <typename FaceRange>
|
||||||
Proxy fit_proxy(const TriangleMesh &tm, const FaceRange &faces) const;
|
Proxy fit_proxy(const FaceRange &faces, const TriangleMesh &tm) const;
|
||||||
|
|
||||||
/// }
|
/// }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ struct Compact_metric_point_proxy
|
||||||
// template functor to compute a best-fit
|
// template functor to compute a best-fit
|
||||||
// proxy from a range of faces
|
// proxy from a range of faces
|
||||||
template <typename FaceRange>
|
template <typename FaceRange>
|
||||||
Proxy fit_proxy(const Polyhedron &tm, const FaceRange &faces) const {
|
Proxy fit_proxy(const FaceRange &faces, const Polyhedron &tm) const {
|
||||||
(void)(tm);
|
(void)(tm);
|
||||||
// fitting center
|
// fitting center
|
||||||
Vector center = CGAL::NULL_VECTOR;
|
Vector center = CGAL::NULL_VECTOR;
|
||||||
|
|
|
||||||
|
|
@ -94,12 +94,12 @@ public:
|
||||||
/*!
|
/*!
|
||||||
* @brief Fits a proxy to a range of faces.
|
* @brief Fits a proxy to a range of faces.
|
||||||
* @tparam FaceRange range of face descriptors, model of Range.
|
* @tparam FaceRange range of face descriptors, model of Range.
|
||||||
* @param tm input triangle mesh
|
|
||||||
* @param faces the range of faces to be fitted
|
* @param faces the range of faces to be fitted
|
||||||
|
* @param tm input triangle mesh
|
||||||
* @return fitted proxy
|
* @return fitted proxy
|
||||||
*/
|
*/
|
||||||
template <typename FaceRange>
|
template <typename FaceRange>
|
||||||
Proxy fit_proxy(const TriangleMesh &tm, const FaceRange &faces) const {
|
Proxy fit_proxy(const FaceRange &faces, const TriangleMesh &tm) const {
|
||||||
(void)(tm);
|
(void)(tm);
|
||||||
CGAL_assertion(!faces.empty());
|
CGAL_assertion(!faces.empty());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,12 +100,12 @@ public:
|
||||||
* through the center of mass and is defined by the two principal
|
* through the center of mass and is defined by the two principal
|
||||||
* components of the integral covariance matrix.
|
* components of the integral covariance matrix.
|
||||||
* @tparam FaceRange range of face descriptors, model of Range.
|
* @tparam FaceRange range of face descriptors, model of Range.
|
||||||
* @param tm input triangle mesh
|
|
||||||
* @param faces the range of faces to be fitted
|
* @param faces the range of faces to be fitted
|
||||||
|
* @param tm input triangle mesh
|
||||||
* @return fitted proxy
|
* @return fitted proxy
|
||||||
*/
|
*/
|
||||||
template <typename FaceRange>
|
template <typename FaceRange>
|
||||||
Proxy fit_proxy(const TriangleMesh &tm, const FaceRange &faces) const {
|
Proxy fit_proxy(const FaceRange &faces, const TriangleMesh &tm) const {
|
||||||
(void)(tm);
|
(void)(tm);
|
||||||
CGAL_assertion(!faces.empty());
|
CGAL_assertion(!faces.empty());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1334,7 +1334,7 @@ private:
|
||||||
CGAL_assertion(!px_patch.empty());
|
CGAL_assertion(!px_patch.empty());
|
||||||
|
|
||||||
// use Proxy_fitting functor to fit proxy parameters
|
// use Proxy_fitting functor to fit proxy parameters
|
||||||
const Proxy px = m_metric->fit_proxy(*m_ptm, px_patch);
|
const Proxy px = m_metric->fit_proxy(px_patch, *m_ptm);
|
||||||
|
|
||||||
// find proxy seed and sum error
|
// find proxy seed and sum error
|
||||||
face_descriptor seed = *px_patch.begin();
|
face_descriptor seed = *px_patch.begin();
|
||||||
|
|
@ -1374,7 +1374,7 @@ private:
|
||||||
Proxy_wrapper fit_proxy_from_facet(const face_descriptor f, const std::size_t px_idx) {
|
Proxy_wrapper fit_proxy_from_facet(const face_descriptor f, const std::size_t px_idx) {
|
||||||
// fit proxy parameters
|
// fit proxy parameters
|
||||||
std::vector<face_descriptor> fvec(1, f);
|
std::vector<face_descriptor> fvec(1, f);
|
||||||
const Proxy px = m_metric->fit_proxy(*m_ptm, fvec);
|
const Proxy px = m_metric->fit_proxy(fvec, *m_ptm);
|
||||||
const FT err = m_metric->compute_error(*m_ptm, f, px);
|
const FT err = m_metric->compute_error(*m_ptm, f, px);
|
||||||
|
|
||||||
// original proxy map should always be falid
|
// original proxy map should always be falid
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ struct Compact_metric_point_proxy {
|
||||||
// template functor to compute a best-fit
|
// template functor to compute a best-fit
|
||||||
// proxy from a range of facets
|
// proxy from a range of facets
|
||||||
template <typename FaceRange>
|
template <typename FaceRange>
|
||||||
Proxy fit_proxy(const Polyhedron &tm, const FaceRange &faces) const {
|
Proxy fit_proxy(const FaceRange &faces, const Polyhedron &tm) const {
|
||||||
(void)(tm);
|
(void)(tm);
|
||||||
// fitting center
|
// fitting center
|
||||||
Vector center = CGAL::NULL_VECTOR;
|
Vector center = CGAL::NULL_VECTOR;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue