Back to Aurora Vision Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Constructions » CreateCoordinateSystemFromSegment


Header: AVL.h
Namespace: avl
Module: FoundationLite

Creates a coordinate system with the origin on a given segment.


void avl::CreateCoordinateSystemFromSegment
	const avl::Segment2D& inSegment,
	float inPointAnchor,
	float inRelativeAngle,
	float inScale,
	float inScaleDivisor,
	avl::CoordinateSystem2D& outCoordinateSystem


Name Type Range Default Description
Input value
inSegment const Segment2D&
Input value
inPointAnchor float -1.0 - 1.0 0.0f
Input value
inRelativeAngle float
Input value
inScale float 0.001 - 1.0f
Input value
inScaleDivisor float 0.001 - 1.0f
Output value
outCoordinateSystem CoordinateSystem2D&


  • Pass inSegment to a computed segment representing the origin and the rotation of a new coordinate system.
  • Optionally set inScale and inScaleDivisor to obtain a custom scale.
  • Optionally set inPointAnchor and/or inRelativeAngle to modify the origin and the rotation.


Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.