Back to Aurora Vision Library Lite website
You are here: Start » Geometry 2D » Geometry 2D Constructions » CreateCoordinateSystemFromTwoPoints
CreateCoordinateSystemFromTwoPoints
Header: | AVL.h |
---|---|
Namespace: | avl |
Creates a coordinate system with two points on its axes.
Applications: Most often used to define an object alignment from results of two 1D Edge Detection scans, each of which locates one side of a rectangular object.
Syntax
void avl::CreateCoordinateSystemFromTwoPoints ( const avl::Point2D& inPoint1, const avl::Point2D& inPoint2, float inAngle, float inScale, float inScaleDivisor, avl::CoordinateSystem2D& outCoordinateSystem )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inPoint1 | const Point2D& | ||||
inPoint2 | const Point2D& | ||||
inAngle | float | ||||
inScale | float | 0.001 - | 1.0f | ||
inScaleDivisor | float | 0.001 - | 1.0f | ||
outCoordinateSystem | CoordinateSystem2D& |
Hints
- PassinPoint1 and inPoint2 to computed points lying on (respectively) the X and the Y axes of a new coordinate system.
- Optionally set inAngle to define the rotation.
- Optionally set inScale and inScaleDivisor to obtain a custom scale.