Back to Aurora Vision Library Lite website

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

ResizeSegment


Header: AVL.h
Namespace: avl

Lengthens or shortens a segment to a new length preserving its orientation and center point.

Syntax

void avl::ResizeSegment
(
	const avl::Segment2D& inSegment,
	float inNewLength,
	float inAnchor,
	avl::Segment2D& outSegment
)

Parameters

Name Type Range Default Description
Input value inSegment const Segment2D&
Input value inNewLength float 0.0 - 1.0f
Input value inAnchor float - - 0.5f
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.

Examples

ResizeSegment performed on the sample segment, inNewLength = 298.0.