Back to FabImage Library Lite website
You are here: Start » Geometry 2D » Geometry 2D Constructions » ProjectPointsOnLine
ProjectPointsOnLine
| Header: | FIL.h |
|---|---|
| Namespace: | fil |
Projects points onto a line.
Syntax
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. |




