You are here: Start » AVL.NET » Function Reference » Path » Path Global Transforms » AVL.ReducePath

AVL.ReducePath

Reduces the number of points in a path preserving its shape with the specified precision.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void ReducePath
(
	AvlNet.Path inPath,
	float inMaxDistance,
	AvlNet.Path outPath
)

Parameters

Name Type Range Default Description
inPathAvlNet.PathInput path.
inMaxDistancefloat<0.0f, INF>0.5fMaximum distance between (possibly removed in the process) characteristic point of the input path and the output path. Default value: 0.5f.
outPathAvlNet.PathReduced path.

Description

The operation removes some of the characteristic points of the input path preserving its shape with the selected precision. The algorithm guarantees that each of the removed characteristic points lies within the inMaxDistance distance from the resulting path.

The operation works with open and closed paths as well.

Examples

ReducePath run on the sample path array with inMaxDistance = 0.5.

ReducePath run on the sample path array with inMaxDistance = 5.

Function Overrides

See also