Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D Relations » CreatePointGraph
CreatePointGraph
Header: | FIL.h |
---|---|
Namespace: | fil |
Creates a graph of points that lay close to each other.
Syntax
C++
C#
void fil::CreatePointGraph ( const ftl::Array<fil::Point2D>& inPoints, const int inMaxRank, ftl::Optional<float> inMaxDistance, ftl::Optional<float> inMaxRelativeDistance, ftl::Array<ftl::Array<int> >& outGraph, ftl::Array<ftl::Array<float> >& outDistances, ftl::Array<fil::Segment2D>& diagSegments )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inPoints | const Array<Point2D>& | Input points | ||
![]() |
inMaxRank | const int | 1 - ![]() |
8 | Maximum connections going out of one point |
![]() |
inMaxDistance | Optional<float> | 0.0 - ![]() |
10.0f | Maximum distance between adjacent point in the graph |
![]() |
inMaxRelativeDistance | Optional<float> | 1.0 - ![]() |
NIL | Maximum distance in relation to the shortest distance for a point |
![]() |
outGraph | Array<Array<int> >& | Graph of points (adjacency list) | ||
![]() |
outDistances | Array<Array<float> >& | Distances between adjacent points in the graph | ||
![]() |
diagSegments | Array<Segment2D>& | Graph edges, useful for visualization |