Back to Aurora Vision Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » RotateSegment


Header: AVL.h
Namespace: avl
Module: FoundationLite

Rotates a segment clockwise around a center point.


void avl::RotateSegment
	const avl::Segment2D& inSegment,
	atl::Optional<const avl::Point2D&> inCenter,
	float inAngle,
	bool inInverse,
	avl::Segment2D& outSegment


Name Type Default Description
Input value
inSegment const Segment2D&
Input value
inCenter Optional<const Point2D&> NIL Center of rotation (by default the mass center)
Input value
inAngle float Clockwise angle of rotation
Input value
inInverse bool Switches to the inverse operation
Output value
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.


RotateSegment performed on the sample segment, inCenter = Auto, inAngle = 70.0 and inInverse = False.