Back to Aurora Vision Library Lite website

You are here: Start » Geometry 2D » Geometry 2D Spatial Transforms » TranslateRectangle

TranslateRectangle


Header: AVL.h
Namespace: avl

Translates a rectangle by a vector.

Syntax

void avl::TranslateRectangle
(
	const avl::Rectangle2D& inRectangle,
	const avl::Vector2D& inDelta,
	bool inInverse,
	avl::Rectangle2D& outRectangle
)

Parameters

Name Type Default Description
Input value inRectangle const Rectangle2D&
Input value inDelta const Vector2D& Translation vector
Input value inInverse bool Switches to the inverse operation
Output value outRectangle Rectangle2D&

In-place Processing

This function supports in-place data processing - you can pass the same reference to inRectangle and outRectangle

Read more about In-place Computation.

Examples

TranslateRectangle performed on the sample rectangle, inDelta = (60.0, 80.0) and inInverse = False.