Back to Aurora Vision Library website

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

ResizeSegment


Header: AVL.h
Namespace: avl
Module: FoundationLite

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

Syntax

C++
C#
 
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.