Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » RotateSegment
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Rotates a segment clockwise around a center point.
Syntax
C++
C#
void fil::RotateSegment ( const fil::Segment2D& inSegment, ftl::Optional<const fil::Point2D&> inCenter, float inAngle, bool inInverse, fil::Segment2D& outSegment )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inSegment | const Segment2D& | ||
![]() |
inCenter | Optional<const Point2D&> | NIL | Center of rotation (by default the mass center) |
![]() |
inAngle | float | Clockwise angle of rotation | |
![]() |
inInverse | bool | Switches to the inverse operation | |
![]() |
outSegment | Segment2D& |
In-place Processing
This function supports in-place data processing - you can pass the same reference to inSegment and outSegment
Read more about In-place Computation.
Examples
![]() |
![]() |
RotateSegment performed on the sample segment, inCenter = Auto, inAngle = 70.0 and inInverse = False.