mirror of https://github.com/CGAL/cgal
remove seed requirement from Proxy concept
This commit is contained in:
parent
1247d7dd86
commit
d7bb0e1a68
|
|
@ -10,14 +10,10 @@ It is nested within the `ErrorMetric` and `ProxyFitting` concepts.
|
|||
|
||||
class Proxy {
|
||||
public:
|
||||
/// Triangle mesh facet descriptor.
|
||||
typedef unspecified_type facet_descriptor;
|
||||
|
||||
/// @name Data members
|
||||
/// @{
|
||||
|
||||
/// Data member to store the proxy seed.
|
||||
facet_descriptor seed;
|
||||
/// Anything to store the proxy shape parameters.
|
||||
|
||||
/// }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ typedef boost::associative_property_map<std::map<Facet_handle, Point> > FacetCen
|
|||
|
||||
// proxy
|
||||
struct PointProxy {
|
||||
Facet_handle seed;
|
||||
Point center;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class VSA_approximation {
|
|||
typename boost::property_traits<VertexPointMap>::value_type
|
||||
>::Kernel >::type GeomTraits;
|
||||
typedef typename CGAL::Default::Get<Proxy_,
|
||||
CGAL::PlaneProxy<TriangleMesh, GeomTraits> >::type Proxy;
|
||||
CGAL::PlaneProxy<GeomTraits> >::type Proxy;
|
||||
typedef typename CGAL::Default::Get<ErrorMetric_,
|
||||
CGAL::L21Metric<TriangleMesh, VertexPointMap, GeomTraits, Proxy> >::type ErrorMetric;
|
||||
typedef typename CGAL::Default::Get<ProxyFitting_,
|
||||
|
|
|
|||
|
|
@ -20,20 +20,15 @@ namespace CGAL
|
|||
*
|
||||
* \cgalModels `Proxy`
|
||||
*
|
||||
* @tparam TriangleMesh a triangle `FaceGraph`
|
||||
* @tparam GeomTraits geometric traits
|
||||
*/
|
||||
template<typename TriangleMesh,
|
||||
typename GeomTraits = typename TriangleMesh::Traits>
|
||||
template <typename GeomTraits>
|
||||
class PlaneProxy
|
||||
{
|
||||
typedef typename GeomTraits::Vector_3 Vector_3;
|
||||
typedef typename GeomTraits::Plane_3 Plane_3;
|
||||
typedef typename boost::graph_traits<TriangleMesh>::face_descriptor face_descriptor;
|
||||
|
||||
public:
|
||||
// The proxy seed.
|
||||
face_descriptor seed;
|
||||
// The proxy normal used in the `L21Metric`.
|
||||
Vector_3 normal;
|
||||
// The fitting plane of the proxy used in the `L2Metric`.
|
||||
|
|
@ -54,11 +49,11 @@ public:
|
|||
* @tparam GeomTraits geometric traits
|
||||
* @tparam PlaneProxy a model of `PlaneProxy`
|
||||
*/
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename VertexPointMap
|
||||
= typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type,
|
||||
typename GeomTraits = typename TriangleMesh::Traits,
|
||||
typename PlaneProxy = CGAL::PlaneProxy<TriangleMesh, GeomTraits> >
|
||||
typename PlaneProxy = CGAL::PlaneProxy<GeomTraits> >
|
||||
class L21Metric
|
||||
{
|
||||
typedef typename GeomTraits::FT FT;
|
||||
|
|
@ -116,7 +111,7 @@ private:
|
|||
};
|
||||
|
||||
// specialization
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename GeomTraits,
|
||||
typename PlaneProxy>
|
||||
class L21Metric<TriangleMesh,
|
||||
|
|
@ -194,11 +189,11 @@ private:
|
|||
* @tparam GeomTraits geometric traits
|
||||
* @tparam PlaneProxy a model of `PlaneProxy`
|
||||
*/
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename VertexPointMap
|
||||
= typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type,
|
||||
typename GeomTraits = typename TriangleMesh::Traits,
|
||||
typename PlaneProxy = CGAL::PlaneProxy<TriangleMesh, GeomTraits> >
|
||||
typename PlaneProxy = CGAL::PlaneProxy<GeomTraits> >
|
||||
class L21ProxyFitting
|
||||
{
|
||||
typedef typename GeomTraits::FT FT;
|
||||
|
|
@ -238,7 +233,7 @@ public:
|
|||
}
|
||||
|
||||
// returns the proxy fitted from the facets from beg to end.
|
||||
template<typename FacetIterator>
|
||||
template <typename FacetIterator>
|
||||
Proxy operator()(const FacetIterator beg, const FacetIterator end) const {
|
||||
CGAL_assertion(beg != end);
|
||||
|
||||
|
|
@ -268,7 +263,7 @@ private:
|
|||
};
|
||||
|
||||
// specialization
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename GeomTraits,
|
||||
typename PlaneProxy>
|
||||
class L21ProxyFitting<TriangleMesh,
|
||||
|
|
@ -315,7 +310,7 @@ public:
|
|||
}
|
||||
|
||||
// returns the proxy fitted from the facets from beg to end.
|
||||
template<typename FacetIterator>
|
||||
template <typename FacetIterator>
|
||||
Proxy operator()(const FacetIterator beg, const FacetIterator end) const {
|
||||
CGAL_assertion(beg != end);
|
||||
|
||||
|
|
@ -358,11 +353,11 @@ private:
|
|||
* @tparam GeomTraits geometric traits
|
||||
* @tparam PlaneProxy a model of `PlaneProxy`
|
||||
*/
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename VertexPointMap
|
||||
= typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type,
|
||||
typename GeomTraits = typename TriangleMesh::Traits,
|
||||
typename PlaneProxy = CGAL::PlaneProxy<TriangleMesh, GeomTraits> >
|
||||
typename PlaneProxy = CGAL::PlaneProxy<GeomTraits> >
|
||||
class L2Metric
|
||||
{
|
||||
typedef typename GeomTraits::FT FT;
|
||||
|
|
@ -414,7 +409,7 @@ private:
|
|||
};
|
||||
|
||||
// specialization
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename GeomTraits,
|
||||
typename PlaneProxy>
|
||||
class L2Metric<TriangleMesh,
|
||||
|
|
@ -487,11 +482,11 @@ private:
|
|||
* @tparam GeomTraits geometric traits
|
||||
* @tparam PlaneProxy a model of `PlaneProxy`
|
||||
*/
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename VertexPointMap
|
||||
= typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type,
|
||||
typename GeomTraits = typename TriangleMesh::Traits,
|
||||
typename PlaneProxy = CGAL::PlaneProxy<TriangleMesh, GeomTraits> >
|
||||
typename PlaneProxy = CGAL::PlaneProxy<GeomTraits> >
|
||||
class L2ProxyFitting
|
||||
{
|
||||
typedef typename GeomTraits::Point_3 Point_3;
|
||||
|
|
@ -507,7 +502,7 @@ public:
|
|||
: mesh(&_mesh), point_pmap(_point_pmap) {}
|
||||
|
||||
// returns the proxy fitted from a range of facets.
|
||||
template<typename FacetIterator>
|
||||
template <typename FacetIterator>
|
||||
Proxy operator()(const FacetIterator beg, const FacetIterator end) const {
|
||||
CGAL_assertion(beg != end);
|
||||
|
||||
|
|
@ -539,7 +534,7 @@ private:
|
|||
/*!
|
||||
* Specialization.
|
||||
*/
|
||||
template<typename TriangleMesh,
|
||||
template <typename TriangleMesh,
|
||||
typename GeomTraits,
|
||||
typename PlaneProxy>
|
||||
class L2ProxyFitting<TriangleMesh,
|
||||
|
|
@ -564,7 +559,7 @@ public:
|
|||
point_pmap(get(boost::vertex_point, const_cast<TriangleMesh &>(_mesh))) {}
|
||||
|
||||
// returns the proxy fitted from a range of facets.
|
||||
template<typename FacetIterator>
|
||||
template <typename FacetIterator>
|
||||
Proxy operator()(const FacetIterator beg, const FacetIterator end) const {
|
||||
CGAL_assertion(beg != end);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ bool vsa_mesh_approximation(const TriangleMesh &tm_in,
|
|||
get(boost::vertex_point, const_cast<TriangleMesh &>(tm_in)));
|
||||
// get_property_map(vertex_point, tm_in));
|
||||
|
||||
typedef CGAL::PlaneProxy<TriangleMesh> PlaneProxy;
|
||||
typedef CGAL::PlaneProxy<GeomTraits> PlaneProxy;
|
||||
typedef CGAL::L21Metric<TriangleMesh> L21Metric;
|
||||
typedef CGAL::L21ProxyFitting<TriangleMesh> L21ProxyFitting;
|
||||
typedef CGAL::VSA_approximation<TriangleMesh, VPMap,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ typedef Polyhedron::Facet_handle Facet_handle;
|
|||
typedef boost::associative_property_map<std::map<Facet_handle, std::size_t> > FacetProxyMap;
|
||||
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::type VertexPointMap;
|
||||
|
||||
typedef CGAL::PlaneProxy<Polyhedron> PlaneProxy;
|
||||
typedef CGAL::PlaneProxy<Kernel> PlaneProxy;
|
||||
typedef CGAL::L2Metric<Polyhedron> L2Metric;
|
||||
typedef CGAL::L2ProxyFitting<Polyhedron> L2ProxyFitting;
|
||||
typedef CGAL::VSA_approximation<Polyhedron, VertexPointMap,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ typedef Kernel::FT FT;
|
|||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::type VertexPointMap;
|
||||
|
||||
typedef CGAL::PlaneProxy<Polyhedron> PlaneProxy;
|
||||
typedef CGAL::L21Metric<Polyhedron> L21Metric;
|
||||
typedef CGAL::L21ProxyFitting<Polyhedron> L21ProxyFitting;
|
||||
typedef CGAL::VSA_approximation<Polyhedron, VertexPointMap> VSAL21;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ typedef boost::associative_property_map<std::map<Facet_handle, Point_3> > FacetC
|
|||
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::type VertexPointMap;
|
||||
|
||||
struct PointProxy {
|
||||
Facet_handle seed;
|
||||
Point_3 center;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue