remove seed requirement from Proxy concept

This commit is contained in:
Lingjie Zhu 2017-08-26 23:46:39 +08:00
parent 1247d7dd86
commit d7bb0e1a68
8 changed files with 21 additions and 33 deletions

View File

@ -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.
/// }
};

View File

@ -25,7 +25,6 @@ typedef boost::associative_property_map<std::map<Facet_handle, Point> > FacetCen
// proxy
struct PointProxy {
Facet_handle seed;
Point center;
};

View File

@ -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_,

View File

@ -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`.
@ -58,7 +53,7 @@ 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;
@ -198,7 +193,7 @@ 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;
@ -362,7 +357,7 @@ 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;
@ -491,7 +486,7 @@ 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;

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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;
};