CGAL 6.1.2 - Triangulated Surface Mesh Simplification: CGAL::Surface_mesh_simplification::Edge_length_cost< TriangleMesh > Class Template Reference

CGAL 6.1.2 - Triangulated Surface Mesh Simplification

Loading...
Searching...
No Matches
List of all members
CGAL::Surface_mesh_simplification::Edge_length_cost< TriangleMesh > Class Template Reference
Reference Manual

`#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h>`

## Definition

template<typename TriangleMesh>
class CGAL::Surface_mesh_simplification::Edge_length_cost< TriangleMesh >

The class `Edge_length_cost` is a model for the `GetCost` concept, which computes the collapse cost as the squared length of the edge.

Template Parameters

  TriangleMesh | is the type of surface mesh being simplified, and must be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts.

Is model of
  `GetCost`

## Creation
| Edge_length_cost ()
| Default constructor

## Operations
std::optional< typename Edge_profile::FT > | operator() (const Edge_profile &profile, const std::optional< typename Edge_profile::Point > &placement) const
| Returns the collapse cost as the squared distance between the points of the source and target vertices (that is, `profile.p0()` and `profile.p1()`.

## Member Function Documentation

## ◆ operator()()

template<typename TriangleMesh >

std::optional< typename Edge_profile::FT > CGAL::Surface_mesh_simplification::Edge_length_cost< TriangleMesh >::operator() | ( | const Edge_profile & | profile,
|  | const std::optional< typename Edge_profile::Point > & | placement
| ) |  | const

Returns the collapse cost as the squared distance between the points of the source and target vertices (that is, `profile.p0()` and `profile.p1()`.

The argument `placement` is unused.