SFCGAL  2.3.0
Public Types | Static Public Member Functions | Public Attributes | List of all members
SFCGAL::algorithm::SimplificationStopPredicate Struct Reference

Stop predicate for surface mesh simplification. More...

#include <surfaceSimplification.h>

Public Types

enum  PredicateType : unsigned char { PredicateType::EDGE_COUNT, PredicateType::EDGE_COUNT_RATIO }
 Type of stop predicate. More...
 

Static Public Member Functions

static auto edgeCount (size_t count) -> SimplificationStopPredicate
 Create an edge count stop predicate. More...
 
static auto edgeCountRatio (double ratio) -> SimplificationStopPredicate
 Create an edge count ratio stop predicate. More...
 

Public Attributes

PredicateType type
 Type of stop predicate. More...
 
double value
 Target value (count or ratio) More...
 

Detailed Description

Stop predicate for surface mesh simplification.

Defines when the simplification process should stop.

Member Enumeration Documentation

Type of stop predicate.

Enumerator
EDGE_COUNT 

Stop when edge count reaches the specified value.

The simplification stops when the number of undirected edges left in the surface mesh drops below the specified number.

EDGE_COUNT_RATIO 

Stop when edge count ratio reaches the specified value.

The simplification stops when the number of undirected edges drops below a given ratio of the initial edge count. The ratio is calculated as: remaining_edges / original_edges.

Examples:
/tmp/B.oxclwyi3/BUILD/SFCGAL-2.3.0-build/SFCGAL-v2.3.0/src/algorithm/surfaceSimplification.h.

Member Function Documentation

static auto SFCGAL::algorithm::SimplificationStopPredicate::edgeCount ( size_t  count) -> SimplificationStopPredicate
inlinestatic

Create an edge count stop predicate.

Parameters
countTarget number of edges to keep
Returns
Stop predicate
Examples:
/tmp/B.oxclwyi3/BUILD/SFCGAL-2.3.0-build/SFCGAL-v2.3.0/src/algorithm/surfaceSimplification.h.
static auto SFCGAL::algorithm::SimplificationStopPredicate::edgeCountRatio ( double  ratio) -> SimplificationStopPredicate
inlinestatic

Create an edge count ratio stop predicate.

Parameters
ratioTarget ratio of edges to keep (0.0 to 1.0)
Returns
Stop predicate
Examples:
/tmp/B.oxclwyi3/BUILD/SFCGAL-2.3.0-build/SFCGAL-v2.3.0/src/algorithm/surfaceSimplification.h.

Member Data Documentation

PredicateType SFCGAL::algorithm::SimplificationStopPredicate::type
double SFCGAL::algorithm::SimplificationStopPredicate::value