Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Features » PointsBoundingParallelogram

PointsBoundingParallelogram
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Computes the smallest parallelogram containing an array of points.
Syntax
C++
C#
void fil::PointsBoundingParallelogram ( const ftl::Array<fil::Point2D>& inPoints, fil::BoundingRectangleFeature::Type inBoundingParallelogramFeature, fil::Path& outBoundingParallelogram, ftl::Optional<fil::Point2D&> outCenter = ftl::NIL, ftl::Optional<float&> outLongSide = ftl::NIL, ftl::Optional<float&> outShortSide = ftl::NIL, ftl::Optional<float&> outAngle = ftl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inPoints | const Array<Point2D>& | Input array of points | |
![]() |
inBoundingParallelogramFeature | BoundingRectangleFeature::Type | MinimalArea | Determines what kind of bounding parallelogram will be computed |
![]() |
outBoundingParallelogram | Path& | Smallest bounding parallelogram of the input points | |
![]() |
outCenter | Optional<Point2D&> | NIL | Center of the bounding parallelogram |
![]() |
outLongSide | Optional<float&> | NIL | Length of the bounding parallelogram long side |
![]() |
outShortSide | Optional<float&> | NIL | Length of the bounding parallelogram short side |
![]() |
outAngle | Optional<float&> | NIL | Angle of the bounding parallelogram |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outCenter, outLongSide, outShortSide, outAngle.
Read more about Optional Outputs.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | No points on input in PointsBoundingParallelogram. |
DomainError | Unknown parallelogram feature in PointsBoundingParallelogram. |