Back to Aurora Vision Library Lite website
You are here: Start » Geometry 2D » Geometry 2D Constructions » CreateCoordinateSystemFromRectangle
CreateCoordinateSystemFromRectangle
Header: | AVL.h |
---|---|
Namespace: | avl |
Creates a coordinate system from a rectangle.
Applications: Most often used to define an object alignment from a filter like RegionBoundingRectangle.
Syntax
void avl::CreateCoordinateSystemFromRectangle ( const avl::Rectangle2D& inRectangle, const avl::Anchor2D::Type inPointAnchor, float inRelativeAngle, float inScale, float inScaleDivisor, avl::CoordinateSystem2D& outCoordinateSystem )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inRectangle | const Rectangle2D& | ||||
inPointAnchor | const Anchor2D::Type | TopLeft | |||
inRelativeAngle | float | ||||
inScale | float | 0.001 - | 1.0f | ||
inScaleDivisor | float | 0.001 - | 1.0f | ||
outCoordinateSystem | CoordinateSystem2D& |
Hints
- Pass inRectangle to a computed rectangle representing a new coordinate system.
- Optionally set inScale and inScaleDivisor to obtain a custom scale.
- Optionally set inRelativeAngle to modify the rotation.