Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Constructions » ProjectPointsOnLine
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Projects points onto a line.
Syntax
C++
C#
void fil::ProjectPointsOnLine ( const ftl::Array<fil::Point2D>& inPoints, const fil::Line2D& inLine, ftl::Array<fil::Point2D>& outProjectionPoints, ftl::Optional<ftl::Conditional<fil::Segment2D>&> outProjectionSegment = ftl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inPoints | const Array<Point2D>& | ||
![]() |
inLine | const Line2D& | ||
![]() |
outProjectionPoints | Array<Point2D>& | ||
![]() |
outProjectionSegment | Optional<Conditional<Segment2D>&> | NIL |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outProjectionSegment.
Read more about Optional Outputs.
Description
The orientation of the resulting outProjectionSegment is always between 0 and 180 degrees.
Examples
![]() |
![]() |
ProjectPointsOnLine performed on points and line.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Indefinite line on input in ProjectPointsOnLine. |