EMODnet Quantized Mesh Generator for Cesium
Public Member Functions | List of all members
CGAL::Polyline_simplification_2::PointSetFeaturesSimplificationCost Class Reference

Polyline simplification cost function used by point set simplification methods. More...

#include <point_set_features_simplification_cost.h>

Public Member Functions

 PointSetFeaturesSimplificationCost (const double &maxLength)
 Initializes the cost function.
 
template<class CDT >
boost::optional< typename CDT::Geom_traits::FT > operator() (const Constrained_triangulation_plus_2< CDT > &pct, typename Constrained_triangulation_plus_2< CDT >::Vertices_in_constraint_iterator vicq) const
 

Detailed Description

Polyline simplification cost function used by point set simplification methods.

This class is a cost function which calculates the cost as the square of the distance between the original and simplified polylines in height. It also allows to fix a maximum length on the XY plane for simplified edges To be used with Projection_traits_xy_3 class.

Member Function Documentation

◆ operator()()

template<class CDT >
boost::optional<typename CDT::Geom_traits::FT> CGAL::Polyline_simplification_2::PointSetFeaturesSimplificationCost::operator() ( const Constrained_triangulation_plus_2< CDT > &  pct,
typename Constrained_triangulation_plus_2< CDT >::Vertices_in_constraint_iterator  vicq 
) const
inline

Given a vertex in constraint iterator vicq computes vicp=std::prev(vicq) and vicr=std::next(vicq), returns the maximum of the square distances between each point along the original subpolyline, between vicp and vicr, and the straight line segment from *vicp->point() to *vicr->point().

Template Parameters
CDTmust be CGAL::Constrained_Delaunay_triangulation_2 with a vertex type that is model of PolylineSimplificationVertexBase_2.

The documentation for this class was generated from the following file: